summaryrefslogtreecommitdiff
path: root/openbox/event.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-08 00:40:01 +0000
committerDana Jansens <danakj@orodu.net>2007-05-08 00:40:01 +0000
commit5945d2e9c851a03d58ab364fe93136cbe5079c2b (patch)
tree2182a3b6fb01279aedb0b49660f81cd84dce8aea /openbox/event.c
parent26fc54c9a3d7ef92ef3748b7d4d57e57a71ea798 (diff)
ok, so, back out the last commit. owner events are passed thru so we get enter/leave notify events.
dont change frame decor from button presses during an interactive grab or while a menu is open
Diffstat (limited to 'openbox/event.c')
-rw-r--r--openbox/event.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/openbox/event.c b/openbox/event.c
index bb6a42f9..a3ca5585 100644
--- a/openbox/event.c
+++ b/openbox/event.c
@@ -709,8 +709,15 @@ static void event_handle_client(ObClient *client, XEvent *e)
case ButtonPress:
case ButtonRelease:
/* Wheel buttons don't draw because they are an instant click, so it
- is a waste of resources to go drawing it. */
- if (!(e->xbutton.button == 4 || e->xbutton.button == 5)) {
+ is a waste of resources to go drawing it.
+ if the user is doing an intereactive thing, or has a menu open then
+ the mouse is grabbed (possibly) and if we get these events we don't
+ want to deal with them
+ */
+ if (!(e->xbutton.button == 4 || e->xbutton.button == 5) &&
+ !keyboard_interactively_grabbed() &&
+ !menu_frame_visible)
+ {
con = frame_context(client, e->xbutton.window);
con = mouse_button_frame_context(con, e->xbutton.button);
switch (con) {