mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 12:58:08 +01:00
fixed the 'focus flicker' problem, seen with GTK2 applications
This commit is contained in:
@@ -110,6 +110,7 @@ Changes since version 0.80.2:
|
||||
(Marcelo E. Magallon <marcelo.magallon@bigfoot.com>)
|
||||
- Do not use the disabled clip color for the clip's workspace navigation arrows
|
||||
when the clip is collapsed (it made them look like disabled)
|
||||
- Fixed the 'focus flicker' problem, seen with GTK2 applications.
|
||||
|
||||
|
||||
Changes since version 0.80.1:
|
||||
|
||||
@@ -144,14 +144,21 @@ 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)
|
||||
*/
|
||||
if (ignoreTimestamp)
|
||||
timestamp = CurrentTime;
|
||||
|
||||
if (old_focused)
|
||||
|
||||
@@ -403,7 +403,10 @@ handleDeadProcess(void *foo)
|
||||
static void
|
||||
saveTimestamp(XEvent *event)
|
||||
{
|
||||
LastTimestamp = CurrentTime;
|
||||
/*
|
||||
* Never save CurrentTime as LastTimestamp because CurrentTime
|
||||
* it's not a real timestamp (it's the 0L constant)
|
||||
*/
|
||||
|
||||
switch (event->type) {
|
||||
case ButtonRelease:
|
||||
|
||||
Reference in New Issue
Block a user