summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2011-02-01 17:39:35 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-02-01 17:39:59 +0800
commitb680db31f6ee77b74eddc00e925c76eabf928a86 (patch)
treef0844ba6e70ddd71fde3d87a2fe7e94d90699fa6
parent99e32cdefe080cd383c07dda716d7676916aeb18 (diff)
downloadunity-window-decorator-b680db31f6ee77b74eddc00e925c76eabf928a86.tar.gz
unity-window-decorator-b680db31f6ee77b74eddc00e925c76eabf928a86.tar.bz2
Support semantic difference between frame extents and frame geometry
-rw-r--r--src/decorator.c5
-rw-r--r--src/decorprops.c3
-rw-r--r--src/metacity.c18
3 files changed, 15 insertions, 11 deletions
diff --git a/src/decorator.c b/src/decorator.c
index 3a9e56e..294c935 100644
--- a/src/decorator.c
+++ b/src/decorator.c
@@ -749,6 +749,7 @@ update_default_decorations (GdkScreen *screen)
decor_quads_to_property (data, no_border_shadow->pixmap,
&_shadow_extents, &_shadow_extents,
+ &_shadow_extents, &_shadow_extents,
0, 0, quads, nQuad);
XChangeProperty (xdisplay, xroot,
@@ -830,7 +831,7 @@ update_default_decorations (GdkScreen *screen)
XRenderFreePicture (xdisplay, d.picture);
decor_quads_to_property (data, GDK_PIXMAP_XID (d.pixmap),
- &extents, &extents, 0, 0, quads, nQuad);
+ &extents, &extents, &extents, &extents, 0, 0, quads, nQuad);
XChangeProperty (xdisplay, xroot,
normalAtom,
@@ -857,7 +858,7 @@ update_default_decorations (GdkScreen *screen)
XRenderFreePicture (xdisplay, d.picture);
decor_quads_to_property (data, GDK_PIXMAP_XID (d.pixmap),
- &extents, &extents, 0, 0, quads, nQuad);
+ &extents, &extents, &extents, &extents, 0, 0, quads, nQuad);
XChangeProperty (xdisplay, xroot,
activeAtom,
diff --git a/src/decorprops.c b/src/decorprops.c
index 68b6ed5..b6b3820 100644
--- a/src/decorprops.c
+++ b/src/decorprops.c
@@ -36,7 +36,7 @@ decor_update_window_property (decor_t *d)
else
{
decor_quads_to_property (data, GDK_PIXMAP_XID (d->pixmap),
- &extents, &extents,
+ &extents, &extents, &extents, &extents,
ICON_SPACE + d->button_width,
0,
quads, nQuad);
@@ -111,6 +111,7 @@ decor_update_switcher_property (decor_t *d)
decor_quads_to_property (data, GDK_PIXMAP_XID (d->pixmap),
&_switcher_extents, &_switcher_extents,
+ &_switcher_extents, &_switcher_extents,
0, 0, quads, nQuad);
style = gtk_widget_get_style (style_window_rgba);
diff --git a/src/metacity.c b/src/metacity.c
index a20458e..dd8d6c1 100644
--- a/src/metacity.c
+++ b/src/metacity.c
@@ -23,7 +23,7 @@ decor_update_meta_window_property (decor_t *d,
Display *xdisplay =
GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
gint nQuad;
- decor_extents_t extents, max_extents;
+ decor_extents_t extents, max_extents, frame_extents, frame_max_extents;
decor_quad_t quads[N_QUADS_MAX];
gint w, lh, rh;
gint top_stretch_offset;
@@ -61,8 +61,8 @@ decor_update_meta_window_property (decor_t *d,
top_stretch_offset,
bottom_stretch_offset);
- extents = _win_extents;
- max_extents = _max_win_extents;
+ extents = frame_extents = _win_extents;
+ max_extents = frame_max_extents = _max_win_extents;
/* Add the invisible grab area padding, but only for
* pixmap type decorations */
@@ -76,19 +76,21 @@ decor_update_meta_window_property (decor_t *d,
if (!d->frame_window && invisible_grab_area_properties)
{
- extents.left += invisible_grab_area_properties->left;
- extents.right += invisible_grab_area_properties->right;
- extents.bottom += invisible_grab_area_properties->bottom;
+ frame_extents.left += invisible_grab_area_properties->left;
+ frame_extents.right += invisible_grab_area_properties->right;
+ frame_extents.bottom += invisible_grab_area_properties->bottom;
}
extents.top += titlebar_height;
+ frame_extents.top += titlebar_height;
max_extents.top += max_titlebar_height;
+ frame_max_extents.top += max_titlebar_height;
if (d->frame_window)
decor_gen_window_property (data, &extents, &max_extents, 20, 20);
else
decor_quads_to_property (data, GDK_PIXMAP_XID (d->pixmap),
- &extents, &max_extents,
+ &frame_extents, &extents, &frame_max_extents, &max_extents,
ICON_SPACE + d->button_width,
0,
quads, nQuad);
@@ -1322,7 +1324,7 @@ meta_get_event_window_position (decor_t *d,
switch (j) {
case 2: /* right */
*x = width - fgeom.right_width;
- *y = fgeom.top_height + RESIZE_EXTENDS;
+ *y = fgeom.top_height + RESIZE_EXTENDS;
if (d->frame_window)
*x += _win_extents.left + 2;
*w = fgeom.right_width;