X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient_menu.c;h=ce29db10b5945d0ad0220a507391b8103b74a4bd;hb=7a6a516b8e3d8ad6b15379eabf6652a6f43eab27;hp=499bb9128ad8375d8ce414731c3d43fca1cfee3f;hpb=11df262d7eb56ae6af98af86cbfee8226107114d;p=chaz%2Fopenbox diff --git a/openbox/client_menu.c b/openbox/client_menu.c index 499bb912..ce29db10 100644 --- a/openbox/client_menu.c +++ b/openbox/client_menu.c @@ -19,11 +19,13 @@ #include "debug.h" #include "menu.h" #include "menuframe.h" +#include "config.h" #include "screen.h" #include "client.h" #include "openbox.h" #include "frame.h" #include "moveresize.h" +#include "event.h" #include "prop.h" #include "gettext.h" @@ -90,7 +92,7 @@ static gboolean client_menu_update(ObMenuFrame *frame, gpointer data) *en = c->functions & OB_CLIENT_FUNC_CLOSE; break; case CLIENT_DECORATE: - *en = client_normal(c); + *en = c->functions & OB_CLIENT_FUNC_UNDECORATE; break; default: *en = TRUE; @@ -105,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 */ @@ -153,6 +159,9 @@ static void client_menu_execute(ObMenuEntry *e, ObMenuFrame *f, g_assert_not_reached(); } + if (!config_focus_under_mouse) + event_end_ignore_all_enters(ignore_start); + /* update the menu cuz stuff can have changed */ if (f) { client_menu_update(f, NULL); @@ -196,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); @@ -212,6 +226,9 @@ static void layer_menu_execute(ObMenuEntry *e, ObMenuFrame *f, g_assert_not_reached(); } + if (!config_focus_under_mouse) + event_end_ignore_all_enters(ignore_start); + /* update the menu cuz stuff can have changed */ if (f) { layer_menu_update(f, NULL);