#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"
*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;
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 */
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);
if (e->type == OB_MENU_ENTRY_TYPE_NORMAL) {
switch (e->id) {
case LAYER_TOP:
- *en = !c->above;
+ *en = !c->above && (c->functions & OB_CLIENT_FUNC_ABOVE);
break;
case LAYER_NORMAL:
*en = c->above || c->below;
break;
case LAYER_BOTTOM:
- *en = !c->below;
+ *en = !c->below && (c->functions & OB_CLIENT_FUNC_BELOW);
break;
default:
*en = TRUE;
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);
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);