diff options
author | okan <okan> | 2016-10-03 13:41:30 +0000 |
---|---|---|
committer | okan <okan> | 2016-10-03 13:41:30 +0000 |
commit | a8a111dffd2752fc5be7773a67d03306dd92d05e (patch) | |
tree | 058072f7e9624fae10bc8cd38ee29fa2a47f70f7 | |
parent | 1d3a6905f13d83e61cf5b7403a09d6899cd067e3 (diff) | |
download | cwm-a8a111dffd2752fc5be7773a67d03306dd92d05e.tar.gz cwm-a8a111dffd2752fc5be7773a67d03306dd92d05e.tar.xz cwm-a8a111dffd2752fc5be7773a67d03306dd92d05e.zip |
client_ptrwarp should not deal with unhiding or raising clients (non ptr
requests); most callers do this already - deal with the few that do not. client_ptrwarp becomes a simple wrapper (setpos) but it will be expanded.
-rw-r--r-- | client.c | 6 | ||||
-rw-r--r-- | kbfunc.c | 2 | ||||
-rw-r--r-- | xevents.c | 4 |
3 files changed, 7 insertions, 5 deletions
diff --git a/client.c b/client.c index 6e91ea5..4aa69b9 100644 --- a/client.c +++ b/client.c @@ -469,11 +469,6 @@ client_config(struct client_ctx *cc) void client_ptrwarp(struct client_ctx *cc) { - if (cc->flags & CLIENT_HIDDEN) - client_unhide(cc); - else - client_raise(cc); - xu_ptr_setpos(cc->win, cc->ptr.x, cc->ptr.y); } @@ -686,6 +681,7 @@ client_cycle(struct screen_ctx *sc, int flags) /* reset when cycling mod is released. XXX I hate this hack */ sc->cycling = 1; client_ptrsave(oldcc); + client_raise(newcc); client_ptrwarp(newcc); } diff --git a/kbfunc.c b/kbfunc.c index efcfd3c..c5b0083 100644 --- a/kbfunc.c +++ b/kbfunc.c @@ -187,6 +187,8 @@ kbfunc_menu_client(struct client_ctx *cc, union arg *arg) cc = (struct client_ctx *)mi->ctx; if (cc->flags & CLIENT_HIDDEN) client_unhide(cc); + else + client_raise(cc); if (old_cc) client_ptrsave(old_cc); client_ptrwarp(cc); diff --git a/xevents.c b/xevents.c index 582f839..a4ff04d 100644 --- a/xevents.c +++ b/xevents.c @@ -344,6 +344,10 @@ xev_handle_clientmessage(XEvent *ee) if ((cc = client_find(e->window)) != NULL) { if ((old_cc = client_current()) != NULL) client_ptrsave(old_cc); + if (cc->flags & CLIENT_HIDDEN) + client_unhide(cc); + else + client_raise(cc); client_ptrwarp(cc); } } else if (e->message_type == ewmh[_NET_WM_DESKTOP]) { |