diff options
| author | moetunes <moetunes111@gmail.com> | 2011-10-24 06:32:35 +1000 |
|---|---|---|
| committer | moetunes <moetunes111@gmail.com> | 2011-10-24 06:32:35 +1000 |
| commit | 3ed782435326ed8ecb917305721b1b297c607531 (patch) | |
| tree | 8f7f30f9b4e3bf1b4d619379aada320a8ab8ad1c /src | |
| parent | 2aa7e4d8a07d18b0ad3f22d3adc9bfba0a79a4d3 (diff) | |
Fix for some apps not returning keyboard control
Diffstat (limited to 'src')
| -rw-r--r-- | src/dminiwm.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/dminiwm.c b/src/dminiwm.c index 0c6dd24..e23cd2c 100644 --- a/src/dminiwm.c +++ b/src/dminiwm.c @@ -696,6 +696,16 @@ void configurerequest(XEvent *e) { void maprequest(XEvent *e) { XMapRequestEvent *ev = &e->xmaprequest; + // For fullscreen mplayer (and maybe some other program) + client *c; + + for(c=head;c;c=c->next) + if(ev->window == c->win) { + XMapWindow(dis,ev->window); + XMoveResizeWindow(dis,c->win,-BORDER_WIDTH,-BORDER_WIDTH,sw+BORDER_WIDTH,sh+BORDER_WIDTH); + return; + } + unsigned long count, j, extra; Atom realType; int realFormat; @@ -707,10 +717,10 @@ void maprequest(XEvent *e) { type = (unsigned long*)temp; for(j=0; j<count; j++) { if((type[j] == atoms[ATOM_NET_WM_WINDOW_TYPE_UTILITY]) || - (type[j] == atoms[ATOM_NET_WM_WINDOW_TYPE_DOCK]) || + (type[j] == atoms[ATOM_NET_WM_WINDOW_TYPE_NOTIFICATION]) || (type[j] == atoms[ATOM_NET_WM_WINDOW_TYPE_SPLASH]) || (type[j] == atoms[ATOM_NET_WM_WINDOW_TYPE_DIALOG]) || - (type[j] == atoms[ATOM_NET_WM_WINDOW_TYPE_NOTIFICATION])) { + (type[j] == atoms[ATOM_NET_WM_WINDOW_TYPE_DOCK])) { add_window(ev->window); XMapWindow(dis, ev->window); XSetInputFocus(dis,ev->window,RevertToParent,CurrentTime); @@ -723,16 +733,6 @@ void maprequest(XEvent *e) { XFree(temp); } - // For fullscreen mplayer (and maybe some other program) - client *c; - - for(c=head;c;c=c->next) - if(ev->window == c->win) { - XMapWindow(dis,ev->window); - XMoveResizeWindow(dis,c->win,-BORDER_WIDTH,-BORDER_WIDTH,sw+BORDER_WIDTH,sh+BORDER_WIDTH); - return; - } - XClassHint ch = {0}; static unsigned int len = sizeof convenience / sizeof convenience[0]; int i = 0; @@ -783,6 +783,7 @@ void destroynotify(XEvent *e) { if(i != 0) { remove_window(ev->window); + grabkeys(); select_desktop(tmp); return; } |
