#include "menu.h"
#include "openbox.h"
#include "stacking.h"
+#include "client.h"
#include "grab.h"
#include "screen.h"
#include "geom.h"
g_free(title);
}
-void menu_control_show(Menu *self, int x, int y, Client *client);
+void menu_control_show(Menu *self, int x, int y, ObClient *client);
void menu_destroy_hash_key(Menu *menu)
{
attrib.override_redirect = TRUE;
attrib.event_mask = FRAME_EVENTMASK;
- self->frame = createWindow(ob_root,
+ self->frame = createWindow(RootWindow(ob_display, ob_screen),
CWOverrideRedirect|CWEventMask, &attrib);
attrib.event_mask = TITLE_EVENTMASK;
self->title = createWindow(self->frame, CWEventMask, &attrib);
g_hash_table_insert(window_map, &entry->item, menu);
}
-void menu_show(char *name, int x, int y, Client *client)
+void menu_show(char *name, int x, int y, ObClient *client)
{
Menu *self;
menu_show_full(self, x, y, client);
}
-void menu_show_full(Menu *self, int x, int y, Client *client)
+void menu_show_full(Menu *self, int x, int y, ObClient *client)
{
g_assert(self != NULL);
Default menu controller action for showing.
*/
-void menu_control_show(Menu *self, int x, int y, Client *client) {
+void menu_control_show(Menu *self, int x, int y, ObClient *client) {
guint i;
Rect *a = NULL;
g_assert(!self->invalid);
- for (i = 0; i < screen_num_xin_areas; ++i) {
- a = screen_physical_area_xinerama(i);
+ for (i = 0; i < screen_num_monitors; ++i) {
+ a = screen_physical_area_monitor(i);
if (RECT_CONTAINS(*a, x, y))
break;
}
/* need to get the width. is this bad?*/
menu_render(self->submenu);
- a = screen_physical_area_xinerama(self->parent->xin_area);
+ a = screen_physical_area_monitor(self->parent->xin_area);
if (self->submenu->size.width + x >= a->x + a->width)
x = self->parent->location.x - self->submenu->size.width -