summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2010-01-15 15:07:42 -0500
committerDana Jansens <danakj@orodu.net>2010-01-15 15:14:58 -0500
commit0e3ce9e407ed8e3fb554c0b25b65c0e8146bd1c6 (patch)
tree992ce7daf322fd8ae4bab67ea12267b1565b3ab5 /openbox
parentd3ca5d5b4c36f6b3e5f64e5332e907471ee2196e (diff)
if we get an event on a subwindow of root that we don't know about, but it is related to a press we received on the root window, then process the event (Fixes bug #3702)
Diffstat (limited to 'openbox')
-rw-r--r--openbox/event.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/openbox/event.c b/openbox/event.c
index 45ae101e..51cfc658 100644
--- a/openbox/event.c
+++ b/openbox/event.c
@@ -719,22 +719,27 @@ static void event_process(const XEvent *ec, gpointer data)
#endif
if (e->type == ButtonPress || e->type == ButtonRelease) {
+ ObWindow *w;
+ static guint pressed = 0;
+ static Window pressed_win = None;
+
/* If the button press was on some non-root window, or was physically
- on the root window, then process it */
+ on the root window... */
if (window != obt_root(ob_screen) ||
- e->xbutton.subwindow == None)
+ e->xbutton.subwindow == None ||
+ /* ...or if it is related to the last button press we handled... */
+ pressed == e->xbutton.button ||
+ /* ...or it if it was physically on an openbox
+ internal window... */
+ ((w = window_find(e->xbutton.subwindow)) &&
+ WINDOW_IS_INTERNAL(w)))
+ /* ...then process the event, otherwise ignore it */
{
used = event_handle_user_input(client, e);
- }
- /* Otherwise only process it if it was physically on an openbox
- internal window */
- else {
- ObWindow *w;
- if ((w = window_find(e->xbutton.subwindow)) &&
- WINDOW_IS_INTERNAL(w))
- {
- used = event_handle_user_input(client, e);
+ if (e->type == ButtonPress) {
+ pressed = e->xbutton.button;
+ pressed_win = e->xbutton.subwindow;
}
}
}