mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
screen_fromroot -> screen_find
This commit is contained in:
parent
78e0f21225
commit
be091b3523
2
calmwm.h
2
calmwm.h
@ -430,9 +430,9 @@ void search_match_text(struct menu_q *, struct menu_q *,
|
|||||||
char *);
|
char *);
|
||||||
void search_print_client(struct menu *, int);
|
void search_print_client(struct menu *, int);
|
||||||
|
|
||||||
|
struct screen_ctx *screen_find(Window);
|
||||||
struct geom screen_find_xinerama(struct screen_ctx *,
|
struct geom screen_find_xinerama(struct screen_ctx *,
|
||||||
int, int, int);
|
int, int, int);
|
||||||
struct screen_ctx *screen_fromroot(Window);
|
|
||||||
void screen_init(int);
|
void screen_init(int);
|
||||||
void screen_update_geometry(struct screen_ctx *);
|
void screen_update_geometry(struct screen_ctx *);
|
||||||
void screen_updatestackingorder(struct screen_ctx *);
|
void screen_updatestackingorder(struct screen_ctx *);
|
||||||
|
2
client.c
2
client.c
@ -68,7 +68,7 @@ client_init(Window win, struct screen_ctx *sc)
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
if (sc == NULL) {
|
if (sc == NULL) {
|
||||||
sc = screen_fromroot(wattr.root);
|
sc = screen_find(wattr.root);
|
||||||
mapped = 1;
|
mapped = 1;
|
||||||
} else {
|
} else {
|
||||||
if (wattr.override_redirect || wattr.map_state != IsViewable)
|
if (wattr.override_redirect || wattr.map_state != IsViewable)
|
||||||
|
4
screen.c
4
screen.c
@ -79,12 +79,12 @@ screen_init(int which)
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct screen_ctx *
|
struct screen_ctx *
|
||||||
screen_fromroot(Window rootwin)
|
screen_find(Window win)
|
||||||
{
|
{
|
||||||
struct screen_ctx *sc;
|
struct screen_ctx *sc;
|
||||||
|
|
||||||
TAILQ_FOREACH(sc, &Screenq, entry)
|
TAILQ_FOREACH(sc, &Screenq, entry)
|
||||||
if (sc->rootwin == rootwin)
|
if (sc->rootwin == win)
|
||||||
return (sc);
|
return (sc);
|
||||||
|
|
||||||
/* XXX FAIL HERE */
|
/* XXX FAIL HERE */
|
||||||
|
@ -239,7 +239,7 @@ xev_handle_buttonpress(XEvent *ee)
|
|||||||
if (e->window != e->root)
|
if (e->window != e->root)
|
||||||
return;
|
return;
|
||||||
cc = &fakecc;
|
cc = &fakecc;
|
||||||
cc->sc = screen_fromroot(e->window);
|
cc->sc = screen_find(e->window);
|
||||||
}
|
}
|
||||||
|
|
||||||
(*mb->callback)(cc, &mb->argument);
|
(*mb->callback)(cc, &mb->argument);
|
||||||
@ -289,7 +289,7 @@ xev_handle_keypress(XEvent *ee)
|
|||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
cc = &fakecc;
|
cc = &fakecc;
|
||||||
cc->sc = screen_fromroot(e->window);
|
cc->sc = screen_find(e->window);
|
||||||
}
|
}
|
||||||
|
|
||||||
(*kb->callback)(cc, &kb->argument);
|
(*kb->callback)(cc, &kb->argument);
|
||||||
@ -306,7 +306,7 @@ xev_handle_keyrelease(XEvent *ee)
|
|||||||
KeySym keysym;
|
KeySym keysym;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
sc = screen_fromroot(e->root);
|
sc = screen_find(e->root);
|
||||||
|
|
||||||
keysym = XkbKeycodeToKeysym(X_Dpy, e->keycode, 0, 0);
|
keysym = XkbKeycodeToKeysym(X_Dpy, e->keycode, 0, 0);
|
||||||
for (i = 0; i < nitems(modkeys); i++) {
|
for (i = 0; i < nitems(modkeys); i++) {
|
||||||
@ -324,7 +324,7 @@ xev_handle_clientmessage(XEvent *ee)
|
|||||||
struct client_ctx *cc, *old_cc;
|
struct client_ctx *cc, *old_cc;
|
||||||
struct screen_ctx *sc;
|
struct screen_ctx *sc;
|
||||||
|
|
||||||
sc = screen_fromroot(e->window);
|
sc = screen_find(e->window);
|
||||||
|
|
||||||
if ((cc = client_find(e->window)) == NULL && e->window != sc->rootwin)
|
if ((cc = client_find(e->window)) == NULL && e->window != sc->rootwin)
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user