X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=plugins%2Fmenu%2Fclient_menu.c;h=50ebc7cf6fa379bad2f1f81b3b3af55e3d10381f;hb=7af1c6a9c3a57f3ded34fad3f9f4a30fe377a65e;hp=b092e6a607fba659947214f34c7187e09a96371e;hpb=4160963ca4f0aebb2f8bf69d0bd6ff349ac48e28;p=chaz%2Fopenbox diff --git a/plugins/menu/client_menu.c b/plugins/menu/client_menu.c index b092e6a6..50ebc7cf 100644 --- a/plugins/menu/client_menu.c +++ b/plugins/menu/client_menu.c @@ -47,14 +47,14 @@ void client_menu_show(Menu *self, int x, int y, Client *client) g_assert(!self->invalid); g_assert(client); - newy = client->frame->area.y + client->frame->a_focused_title->area.height - + theme_bwidth; + newy = MAX(client->frame->area.y + client->frame->size.top, y); + newy -= ob_rr_theme->bwidth; POINT_SET(self->location, MIN(x, screen_physical_size.width - self->size.width - - theme_bwidth * 2), + ob_rr_theme->bwidth * 2), MIN(newy, screen_physical_size.height - self->size.height - - theme_bwidth * 2)); + ob_rr_theme->bwidth * 2)); XMoveWindow(ob_display, self->frame, self->location.x, self->location.y); if (!self->shown) { @@ -77,7 +77,7 @@ void plugin_destroy (Menu *m) void *plugin_create() /* TODO: need config */ { Menu *m = menu_new_full(NULL, "client-menu", NULL, - client_menu_show, NULL); + /*client_menu_show*/NULL, NULL); menu_add_entry(m, menu_entry_new_submenu("Send To Workspace", send_to_menu)); send_to_menu->parent = m;