1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-04 06:15:24 +00:00

Add a patch to fix a periodic focus bug

Bump PORTREVISION

PR:		ports/140755
Submitted by:	Dmitry <dmitry2006@yandex.ru>
This commit is contained in:
Doug Barton 2009-12-14 21:42:25 +00:00
parent 4094bfea10
commit 89da9581eb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=245801
2 changed files with 36 additions and 1 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= windowmaker
PORTVERSION= 0.92.0
PORTREVISION= 6
PORTREVISION= 7
CATEGORIES= x11-wm windowmaker
MASTER_SITES= ${MASTER_SITE_WINDOWMAKER} \
http://dougbarton.us/Downloads/

View File

@ -0,0 +1,35 @@
--- 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)