summaryrefslogtreecommitdiff
blob: 188c6e3a031d930c0ff8214a67963339ab75d261 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
diff -urN WindowMaker-0.80.2/src/actions.c WindowMaker-0.80.2-modified/src/actions.c
--- WindowMaker-0.80.2/src/actions.c	2002-07-02 01:30:25.000000000 +0100
+++ WindowMaker-0.80.2-modified/src/actions.c	2004-01-08 20:52:01.384657458 +0000
@@ -144,14 +144,21 @@
       old_scr=scr;
     old_focused=old_scr->focused_window;
 
+    /*
+     * Safeguard: make sure the timestamp is monotonically increasing
+     * (very unlikely that this will be needed, 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)
diff -urN WindowMaker-0.80.2/src/event.c WindowMaker-0.80.2-modified/src/event.c
--- WindowMaker-0.80.2/src/event.c	2002-01-08 13:45:13.000000000 +0000
+++ WindowMaker-0.80.2-modified/src/event.c	2004-01-08 20:52:35.321986539 +0000
@@ -402,7 +402,6 @@
 static void
 saveTimestamp(XEvent *event)
 {
-    LastTimestamp = CurrentTime;
 
     switch (event->type) {
      case ButtonRelease:
diff -urN WindowMaker-0.80.2/src/workspace.c WindowMaker-0.80.2-modified/src/workspace.c
--- WindowMaker-0.80.2/src/workspace.c	2002-01-08 13:45:33.000000000 +0000
+++ WindowMaker-0.80.2-modified/src/workspace.c	2004-01-08 20:55:00.691545736 +0000
@@ -574,11 +574,13 @@
                               &foo, &foo, &foo, &foo, &mask)) {
 		tmp = wWindowFor(win);
 	    }
-	    if (!tmp && wPreferences.focus_mode == WKF_SLOPPY) {
-		wSetFocusTo(scr, foc);
-	    } else {
-		wSetFocusTo(scr, tmp);
-	    }
+	    if (!tmp) {
+		if (wPreferences.focus_mode == WKF_SLOPPY) {
+		    wSetFocusTo(scr, foc);
+	        } else {
+		    wSetFocusTo(scr, tmp);
+		}
+            }
 	}
     }