Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
spectrwm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
022ca33
)
Enforce ordering on focusevent types.
author
Ryan McBride
<mcbride@countersiege.com>
Fri, 30 Oct 2009 01:56:00 +0000
(
01:56
+0000)
committer
Ryan McBride
<mcbride@countersiege.com>
Fri, 30 Oct 2009 01:56:00 +0000
(
01:56
+0000)
scrotwm.c
patch
|
blob
|
history
diff --git
a/scrotwm.c
b/scrotwm.c
index
a1df7b4
..
a2099df
100644
(file)
--- a/
scrotwm.c
+++ b/
scrotwm.c
@@
-161,7
+161,7
@@
Atom adelete;
Atom takefocus;
volatile sig_atomic_t running = 1;
int outputs = 0;
Atom takefocus;
volatile sig_atomic_t running = 1;
int outputs = 0;
-int last_focus_event = 0;
+int last_focus_event = FocusOut;
int (*xerrorxlib)(Display *, XErrorEvent *);
int other_wm;
int ss_enabled = 0;
int (*xerrorxlib)(Display *, XErrorEvent *);
int other_wm;
int ss_enabled = 0;
@@
-4033,6
+4033,11
@@
focusevent(XEvent *e)
ev->type == FocusIn ? "entering" : "leaving",
ev->window, ev->mode, ev->detail);
ev->type == FocusIn ? "entering" : "leaving",
ev->window, ev->mode, ev->detail);
+ if (last_focus_event == ev->type) {
+ DNPRINTF(SWM_D_FOCUS, "ignoring focusevent: bad ordering\n");
+ return;
+ }
+
last_focus_event = ev->type;
mode_detail = MERGE_MEMBERS(ev->mode, ev->detail);
last_focus_event = ev->type;
mode_detail = MERGE_MEMBERS(ev->mode, ev->detail);