mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 21:08:08 +01:00
fixed the 'focus flicker' problem, seen with GTK2 applications
This commit is contained in:
@@ -144,15 +144,22 @@ wSetFocusTo(WScreen *scr, WWindow *wwin)
|
||||
old_scr=scr;
|
||||
old_focused=old_scr->focused_window;
|
||||
|
||||
/*
|
||||
* Safeguard: make sure the timestamp is monotonically increasing
|
||||
* (very unlikely that this will ever be used, still a safeguard)
|
||||
*/
|
||||
if (timestamp <= LastFocusChange)
|
||||
timestamp = LastFocusChange + 1;
|
||||
|
||||
LastFocusChange = timestamp;
|
||||
|
||||
/*
|
||||
* This is a hack, because XSetInputFocus() should have a proper
|
||||
* timestamp instead of CurrentTime but it seems that some times
|
||||
* clients will not receive focus properly that way.
|
||||
if (ignoreTimestamp)
|
||||
*/
|
||||
timestamp = CurrentTime;
|
||||
if (ignoreTimestamp)
|
||||
timestamp = CurrentTime;
|
||||
|
||||
if (old_focused)
|
||||
oapp = wApplicationOf(old_focused->main_window);
|
||||
|
||||
Reference in New Issue
Block a user