Send last event timestamp with WM_TAKE_FOCUS msg
According to 4.1.7 of the iccm spec http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.7 > Windows with the atom WM_TAKE_FOCUS in their WM_PROTOCOLS property may > receive a ClientMessage event from the window manager (as described in > section 4.2.8) with WM_TAKE_FOCUS in its data[0] field and a valid > timestamp (i.e. not CurrentTime ) in its data[1] field. Adds the timestamp parameter to send_take_focus to avoid the dangerous use of a global variable.
This commit is contained in:
committed by
Michael Stapelberg
parent
2ba0d1ea49
commit
4ded44d18a
2
src/x.c
2
src/x.c
@ -992,7 +992,7 @@ void x_push_changes(Con *con) {
|
||||
focused->window->needs_take_focus) {
|
||||
DLOG("Updating focus by sending WM_TAKE_FOCUS to window 0x%08x (focused: %p / %s)\n",
|
||||
to_focus, focused, focused->name);
|
||||
send_take_focus(to_focus);
|
||||
send_take_focus(to_focus, last_timestamp);
|
||||
set_focus = !focused->window->doesnt_accept_focus;
|
||||
DLOG("set_focus = %d\n", set_focus);
|
||||
|
||||
|
Reference in New Issue
Block a user