From f249e01616f6b18dc56a4367ecdf22698476bfbf Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 22 May 2003 21:29:56 +0000 Subject: [PATCH] watch out for border widths --- plugins/menu/client_menu.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/plugins/menu/client_menu.c b/plugins/menu/client_menu.c index 2578129e..230012d7 100644 --- a/plugins/menu/client_menu.c +++ b/plugins/menu/client_menu.c @@ -7,6 +7,8 @@ #include "kernel/frame.h" +#include "render/theme.h" + static char *PLUGIN_NAME = "client_menu"; static Menu *send_to_menu; @@ -45,14 +47,15 @@ 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; + newy = client->frame->area.y + client->frame->a_focused_title->area.height + + theme_bwidth; - XMoveWindow(ob_display, self->frame, - MIN(x, screen_physical_size.width - self->size.width), - MIN(newy, screen_physical_size.height - self->size.height)); POINT_SET(self->location, - MIN(x, screen_physical_size.width - self->size.width), - MIN(newy, screen_physical_size.height - self->size.height)); + MIN(x, screen_physical_size.width - self->size.width - + theme_bwidth * 2), + MIN(newy, screen_physical_size.height - self->size.height - + theme_bwidth * 2)); + XMoveWindow(ob_display, self->frame, self->location.x, self->location.y); if (!self->shown) { XMapWindow(ob_display, self->frame); -- 2.45.2