mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
handle _NET_ACTIVE_WINDOW ClientMessage; from Alexander Polakov.
This commit is contained in:
parent
284af4ca0c
commit
ad8020e17d
10
xevents.c
10
xevents.c
@ -340,7 +340,7 @@ static void
|
||||
xev_handle_clientmessage(XEvent *ee)
|
||||
{
|
||||
XClientMessageEvent *e = &ee->xclient;
|
||||
struct client_ctx *cc;
|
||||
struct client_ctx *cc, *old_cc;
|
||||
|
||||
if ((cc = client_find(e->window)) == NULL)
|
||||
return;
|
||||
@ -351,6 +351,14 @@ xev_handle_clientmessage(XEvent *ee)
|
||||
|
||||
if (e->message_type == ewmh[_NET_CLOSE_WINDOW].atom)
|
||||
client_send_delete(cc);
|
||||
|
||||
if (e->message_type == ewmh[_NET_ACTIVE_WINDOW].atom &&
|
||||
e->format == 32) {
|
||||
old_cc = client_current();
|
||||
if (old_cc)
|
||||
client_ptrsave(old_cc);
|
||||
client_ptrwarp(cc);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user