diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-06-03 19:09:32 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-06-03 19:09:32 +0000 |
| commit | 4940d007cce43a135f1b448902f5a3571dbce62a (patch) | |
| tree | 4c5c0a9e25dc7f8b9c55634df3ccaa6fe816ddf7 /openbox/client_menu.c | |
| parent | 097d02d9d3d4b2eeea11084c54812de9cd7d14c0 (diff) | |
super amazing enter event skipping.
also mucho fixed for <underMouse>
Diffstat (limited to 'openbox/client_menu.c')
| -rw-r--r-- | openbox/client_menu.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/openbox/client_menu.c b/openbox/client_menu.c index f538eafd..ce29db10 100644 --- a/openbox/client_menu.c +++ b/openbox/client_menu.c @@ -19,6 +19,7 @@ #include "debug.h" #include "menu.h" #include "menuframe.h" +#include "config.h" #include "screen.h" #include "client.h" #include "openbox.h" @@ -106,9 +107,13 @@ static void client_menu_execute(ObMenuEntry *e, ObMenuFrame *f, Time time) { gint x, y; + gulong ignore_start; g_assert(c); + if (!config_focus_under_mouse) + ignore_start = event_start_ignore_all_enters(); + switch (e->id) { case CLIENT_ICONIFY: /* the client won't be on screen anymore so hide the menu */ @@ -154,7 +159,8 @@ static void client_menu_execute(ObMenuEntry *e, ObMenuFrame *f, g_assert_not_reached(); } - event_ignore_all_queued_enters(); + if (!config_focus_under_mouse) + event_end_ignore_all_enters(ignore_start); /* update the menu cuz stuff can have changed */ if (f) { @@ -199,8 +205,13 @@ static void layer_menu_execute(ObMenuEntry *e, ObMenuFrame *f, ObClient *c, guint state, gpointer data, Time time) { + gulong ignore_start; + g_assert(c); + if (!config_focus_under_mouse) + ignore_start = event_start_ignore_all_enters(); + switch (e->id) { case LAYER_TOP: client_set_layer(c, 1); @@ -215,7 +226,8 @@ static void layer_menu_execute(ObMenuEntry *e, ObMenuFrame *f, g_assert_not_reached(); } - event_ignore_all_queued_enters(); + if (!config_focus_under_mouse) + event_end_ignore_all_enters(ignore_start); /* update the menu cuz stuff can have changed */ if (f) { |
