ports/140755: x11-wm/windowmaker Fix periodic focus bug [PATCH]
Dmitry
dmitry2006 at yandex.ru
Sat Nov 21 16:30:02 UTC 2009
>Number: 140755
>Category: ports
>Synopsis: x11-wm/windowmaker Fix periodic focus bug [PATCH]
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Nov 21 16:30:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Dmitry
>Release: 8.0-PRERELEASE
>Organization:
>Environment:
FreeBSD *** 8.0-PRERELEASE FreeBSD 8.0-PRERELEASE #0: Wed Nov 18 23:50:05 YEKT 2009 root@***:/usr/obj/usr/src/sys/GENERIC_ amd64
>Description:
sometimes cannot click in window to focus window
http://repo.or.cz/w/wmaker-crm.git/commit/c91bb1ba
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=102314
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
--- src/actions.c.orig
+++ src/actions.c
@@ -78,6 +78,16 @@
#define SHADE_STEPS shadePars[(int)wPreferences.shade_speed].steps
#define SHADE_DELAY shadePars[(int)wPreferences.shade_speed].delay
+static int
+compareTimes(Time t1, Time t2)
+{
+ Time diff;
+
+ if (t1 == t2)
+ return 0;
+ diff = t1 - t2;
+ return (diff < 60000) ? 1 : -1;
+}
/*
*----------------------------------------------------------------------
@@ -99,11 +109,11 @@
WWindow *old_focused;
WWindow *focused=scr->focused_window;
- int timestamp=LastTimestamp;
+ Time timestamp=LastTimestamp;
WApplication *oapp=NULL, *napp=NULL;
int wasfocused;
- if (scr->flags.ignore_focus_events || LastFocusChange > timestamp)
+ if (scr->flags.ignore_focus_events || compareTimes(LastFocusChange, timestamp) > 0)
return;
if (!old_scr)
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list