mirror of https://github.com/0intro/wmii
Fix some focus bugs pending a rewrite of the focus system.
This commit is contained in:
parent
e8fbdc8846
commit
500af3016f
3
client.c
3
client.c
|
@ -546,8 +546,9 @@ match_sizehints(Client *c, XRectangle *r, Bool floating, BlitzAlign sticky) {
|
|||
|
||||
void
|
||||
focus_client(Client *c) {
|
||||
if(verbose)
|
||||
fprintf(stderr, "focus_client(%p)\n", c);
|
||||
if(screen->focus != c) {
|
||||
screen->focus = c;
|
||||
if(c)
|
||||
XSetInputFocus(blz.dpy, c->win, RevertToParent, CurrentTime);
|
||||
else
|
||||
|
|
13
event.c
13
event.c
|
@ -259,6 +259,19 @@ unmapnotify(XEvent *e) {
|
|||
|
||||
static void
|
||||
focusin(XEvent *e) {
|
||||
Client *c;
|
||||
XFocusChangeEvent *ev = &e->xfocus;
|
||||
|
||||
c = client_of_win(ev->window);
|
||||
if(c) {
|
||||
if(verbose)
|
||||
fprintf(stderr, "screen->focus: %p => %p\n", screen->focus, c);
|
||||
screen->focus = c;
|
||||
}else if(ev->window == screen->barwin) {
|
||||
if(verbose)
|
||||
fprintf(stderr, "screen->focus: %p => %p\n", screen->focus, nil);
|
||||
screen->focus = nil;
|
||||
}
|
||||
#if 0
|
||||
Client *c;
|
||||
XFocusChangeEvent *ev = &e->xfocus;
|
||||
|
|
Loading…
Reference in New Issue