Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37725965
en ru br
ALT Linux repositórios
S:0.96.0-alt1
5.0: 0.92.0-alt5
4.1: 0.92.0-alt2
4.0: 0.92.0-alt2
3.0: 0.91.0-alt1
+backports:0.92.0-alt0.M30.1

Group :: Desktop gráfico/Window Maker
RPM: WindowMaker

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: WindowMaker-0.92.0-crm-focus.patch
Download


 src/actions.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/actions.c b/src/actions.c
index 46dc788..4437a1c 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -78,6 +78,15 @@ static struct {
 #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 +108,11 @@ wSetFocusTo(WScreen *scr, WWindow  *wwin)
 
     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)
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009