summaryrefslogtreecommitdiff
path: root/openbox/menu.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-08-14 07:04:40 +0000
committerDana Jansens <danakj@orodu.net>2003-08-14 07:04:40 +0000
commitd61edbe2190ab05fdb305b01e70b29904287ab77 (patch)
treeded401e3bf0afecb3bcbd56f9ce7ca0357c14df5 /openbox/menu.c
parent948c549d9df7c1bf54e8ae487cb96a9ae413c2cf (diff)
fix the offsets used to keep the menus on screen
Diffstat (limited to 'openbox/menu.c')
-rw-r--r--openbox/menu.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/openbox/menu.c b/openbox/menu.c
index 0c285cbf..c66a1b0d 100644
--- a/openbox/menu.c
+++ b/openbox/menu.c
@@ -20,6 +20,8 @@ GList *menu_visible = NULL;
#define ENTRY_EVENTMASK (EnterWindowMask | LeaveWindowMask | \
ButtonPressMask | ButtonReleaseMask)
+void menu_control_show(ObMenu *self, int x, int y, ObClient *client);
+
static void parse_menu(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
gpointer data)
{
@@ -106,8 +108,6 @@ parse_menu_fail:
g_free(title);
}
-void menu_control_show(ObMenu *self, int x, int y, ObClient *client);
-
void menu_destroy_hash_key(ObMenu *menu)
{
g_free(menu);
@@ -523,11 +523,12 @@ void menu_control_mouseover(ObMenuEntry *self, gboolean enter)
a = screen_physical_area_monitor(self->parent->xin_area);
- if (self->submenu->size.width + x >= a->x + a->width) {
+ if (self->submenu->size.width + x + ob_rr_theme->bwidth >=
+ a->x + a->width) {
int newparentx = a->x + a->width
- self->submenu->size.width
- self->parent->size.width
- - ob_rr_theme->bwidth
+ - ob_rr_theme->bwidth * 2
- ob_rr_theme->menu_overlap;
x = a->x + a->width - self->submenu->size.width
@@ -540,7 +541,8 @@ void menu_control_mouseover(ObMenuEntry *self, gboolean enter)
}
menu_show_full(self->submenu, x,
- self->parent->location.y + self->y,
+ self->parent->location.y + self->y +
+ self->parent->title_h + ob_rr_theme->bwidth,
self->parent->client);
}
self->hilite = TRUE;