g_message("BUTTON PRESS");
if (e->xbutton.button == 3)
menu_hide(menu);
+ else if (e->xbutton.button == 1) {
+ entry = menu_find_entry(menu, e->xbutton.window);
+ if (!entry)
+ stacking_raise(MENU_AS_WINDOW(menu));
+ }
break;
case ButtonRelease:
g_message("BUTTON RELEASED");
e->xbutton.y < (signed)(h+b)) {
menu_entry_fire(entry);
}
+ }
break;
case EnterNotify:
menu_entry_render(entry);
}
break;
- }
}
}
g_hash_table_remove(menu_map, &self->frame);
g_hash_table_remove(menu_map, &self->items);
+ stacking_remove(self);
+
appearance_free(self->a_title);
XDestroyWindow(ob_display, self->title);
XDestroyWindow(ob_display, self->frame);
g_hash_table_insert(menu_map, &self->title, self);
g_hash_table_insert(menu_map, &self->items, self);
g_hash_table_insert(menu_hash, g_strdup(name), self);
+
+ stacking_add(self);
+
return self;
}
stacking_raise(MENU_AS_WINDOW(self));
*/
XMapWindow(ob_display, self->frame);
+ stacking_raise(MENU_AS_WINDOW(self));
self->shown = TRUE;
} else if (self->shown && self->open_submenu) {
menu_hide(self->open_submenu);