mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
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.
This commit is contained in:
parent
1d3a6905f1
commit
a8a111dffd
6
client.c
6
client.c
@ -469,11 +469,6 @@ client_config(struct client_ctx *cc)
|
|||||||
void
|
void
|
||||||
client_ptrwarp(struct client_ctx *cc)
|
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);
|
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 */
|
/* reset when cycling mod is released. XXX I hate this hack */
|
||||||
sc->cycling = 1;
|
sc->cycling = 1;
|
||||||
client_ptrsave(oldcc);
|
client_ptrsave(oldcc);
|
||||||
|
client_raise(newcc);
|
||||||
client_ptrwarp(newcc);
|
client_ptrwarp(newcc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
kbfunc.c
2
kbfunc.c
@ -187,6 +187,8 @@ kbfunc_menu_client(struct client_ctx *cc, union arg *arg)
|
|||||||
cc = (struct client_ctx *)mi->ctx;
|
cc = (struct client_ctx *)mi->ctx;
|
||||||
if (cc->flags & CLIENT_HIDDEN)
|
if (cc->flags & CLIENT_HIDDEN)
|
||||||
client_unhide(cc);
|
client_unhide(cc);
|
||||||
|
else
|
||||||
|
client_raise(cc);
|
||||||
if (old_cc)
|
if (old_cc)
|
||||||
client_ptrsave(old_cc);
|
client_ptrsave(old_cc);
|
||||||
client_ptrwarp(cc);
|
client_ptrwarp(cc);
|
||||||
|
@ -344,6 +344,10 @@ xev_handle_clientmessage(XEvent *ee)
|
|||||||
if ((cc = client_find(e->window)) != NULL) {
|
if ((cc = client_find(e->window)) != NULL) {
|
||||||
if ((old_cc = client_current()) != NULL)
|
if ((old_cc = client_current()) != NULL)
|
||||||
client_ptrsave(old_cc);
|
client_ptrsave(old_cc);
|
||||||
|
if (cc->flags & CLIENT_HIDDEN)
|
||||||
|
client_unhide(cc);
|
||||||
|
else
|
||||||
|
client_raise(cc);
|
||||||
client_ptrwarp(cc);
|
client_ptrwarp(cc);
|
||||||
}
|
}
|
||||||
} else if (e->message_type == ewmh[_NET_WM_DESKTOP]) {
|
} else if (e->message_type == ewmh[_NET_WM_DESKTOP]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user