{
ObMenu *self;
ObMenuFrame *frame;
+ guint i;
if (!(self = menu_from_name(name))) return;
else
menu_frame_move(frame,
x - ob_rr_theme->bwidth, y - ob_rr_theme->bwidth);
+ frame->monitor = 0;
+ for (i = 0; i < screen_num_monitors; ++i) {
+ Rect *a = screen_physical_area_monitor(i);
+ if (RECT_CONTAINS(*a, frame->area.x, frame->area.y)) {
+ frame->monitor = i;
+ break;
+ }
+ }
if (!menu_frame_show(frame, NULL))
menu_frame_free(frame);
}
gint dx = 0, dy = 0;
gint pos, half;
- for (i = 0; i < screen_num_monitors; ++i) {
- a = screen_physical_area_monitor(i);
- if (RECT_INTERSECTS_RECT(*a, self->area))
- break;
- }
- if (!a) a = screen_physical_area_monitor(0);
+ a = screen_physical_area_monitor(self->monitor);
half = g_list_length(self->entries) / 2;
pos = g_list_index(self->entries, self->selected);
gint text_x; /* offset at which the text appears in the items */
gint text_w; /* width of the text area in the items */
+ gint monitor; /* monitor on which to show the menu in xinerama */
+
Window title;
Window items;