summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/metacity.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/metacity.c b/src/metacity.c
index a971a84..4be97c7 100644
--- a/src/metacity.c
+++ b/src/metacity.c
@@ -966,6 +966,8 @@ meta_get_button_position (decor_t *d,
MetaFrameGeometry fgeom;
MetaFrameFlags flags;
MetaTheme *theme;
+ MetaFrameStyle *frame_style;
+ MetaInvisibleGrabAreaProperties *invisible_grab_area_properties;
GdkRectangle clip;
#ifdef HAVE_METACITY_2_15_21
@@ -985,6 +987,14 @@ meta_get_button_position (decor_t *d,
meta_get_decoration_geometry (d, theme, &flags, &fgeom, &button_layout,
&clip);
+ frame_style = meta_theme_get_frame_style (theme, META_FRAME_TYPE_NORMAL, flags);
+
+ if (!frame_style)
+ return;
+
+ invisible_grab_area_properties =
+ meta_frame_style_get_invisible_grab_area_properties (frame_style);
+
switch (i) {
case BUTTON_MENU:
if (!meta_button_present (&button_layout, META_BUTTON_FUNCTION_MENU))
@@ -1079,6 +1089,10 @@ meta_get_button_position (decor_t *d,
*x += _win_extents.left + 4;
*y += _win_extents.top + 2;
}
+ else if (invisible_grab_area_properties)
+ {
+ *x += invisible_grab_area_properties->left;
+ }
return TRUE;
}