X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmenu.c;h=a2902ed82400f6a74ebcffb569a5abc59178e8a9;hb=6372bd7c0d68793c2371ce7b6c1aa8017f913aee;hp=462b92fe75f36f996eaef39f6ff4311cb951d1d6;hpb=3678f8df8a3d2f5fb20d07d9124c3f0b8618ca5d;p=chaz%2Fopenbox diff --git a/openbox/menu.c b/openbox/menu.c index 462b92fe..a2902ed8 100644 --- a/openbox/menu.c +++ b/openbox/menu.c @@ -291,7 +291,6 @@ void menu_show(gchar *name, gint x, gint y, ObClient *client) { ObMenu *self; ObMenuFrame *frame; - guint i; if (!(self = menu_from_name(name)) || keyboard_interactively_grabbed()) return; @@ -307,21 +306,7 @@ void menu_show(gchar *name, gint x, gint y, ObClient *client) menu_frame_hide_all(); frame = menu_frame_new(self, client); - if (client && x < 0 && y < 0) { - x = client->frame->area.x + client->frame->size.left; - y = client->frame->area.y + client->frame->size.top; - menu_frame_move(frame, x, y); - } else - menu_frame_move(frame, - x - ob_rr_theme->mbwidth, y - ob_rr_theme->mbwidth); - for (i = 0; i < screen_num_monitors; ++i) { - Rect *a = screen_physical_area_monitor(i); - if (RECT_CONTAINS(*a, x, y)) { - frame->monitor = i; - break; - } - } - if (!menu_frame_show(frame, NULL)) + if (!menu_frame_show_topmenu(frame, x, y)) menu_frame_free(frame); else if (frame->entries) { ObMenuEntryFrame *e = frame->entries->data;