[metacity/wip/test-3-18: 3/8] compositor: rename border_size to frame_region
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [metacity/wip/test-3-18: 3/8] compositor: rename border_size to frame_region
- Date: Thu, 14 Apr 2016 17:33:17 +0000 (UTC)
commit 2c7088e1f3b5daf30c1f4fdf637a662ccdfddec5
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Thu Apr 14 13:58:23 2016 +0300
compositor: rename border_size to frame_region
src/compositor/compositor-xrender.c | 55 ++++++++++++++++++++--------------
1 files changed, 32 insertions(+), 23 deletions(-)
---
diff --git a/src/compositor/compositor-xrender.c b/src/compositor/compositor-xrender.c
index 3e1eb5e..0a7ead4 100644
--- a/src/compositor/compositor-xrender.c
+++ b/src/compositor/compositor-xrender.c
@@ -173,7 +173,8 @@ typedef struct _MetaCompWindow
MetaShadowType shadow_type;
Picture shadow_pict;
- XserverRegion border_size;
+ XserverRegion frame_region;
+
XserverRegion window_size;
XserverRegion extents;
@@ -1107,24 +1108,30 @@ win_extents (MetaCompWindow *cw)
}
static XserverRegion
-border_size (MetaCompWindow *cw)
+get_frame_region (MetaCompWindow *cw)
{
- MetaScreen *screen = cw->screen;
- MetaDisplay *display = meta_screen_get_display (screen);
- Display *xdisplay = meta_display_get_xdisplay (display);
- XserverRegion border;
+ MetaScreen *screen;
+ MetaDisplay *display;
+ Display *xdisplay;
+ XserverRegion frame_region;
+
+ screen = cw->screen;
+ display = meta_screen_get_display (screen);
+ xdisplay = meta_display_get_xdisplay (display);
meta_error_trap_push (display);
- border = XFixesCreateRegionFromWindow (xdisplay, cw->id,
- WindowRegionBounding);
+ frame_region = XFixesCreateRegionFromWindow (xdisplay, cw->id,
+ WindowRegionBounding);
+
meta_error_trap_pop (display, FALSE);
+ if (frame_region == None)
+ return None;
- g_return_val_if_fail (border != None, None);
- XFixesTranslateRegion (xdisplay, border,
+ XFixesTranslateRegion (xdisplay, frame_region,
cw->attrs.x + cw->attrs.border_width,
cw->attrs.y + cw->attrs.border_width);
- return border;
+ return frame_region;
}
static XserverRegion
@@ -1145,7 +1152,7 @@ window_size (MetaCompWindow *cw)
visible = cairo_region_to_xserver_region (xdisplay, visible_region);
}
- border = border_size (cw);
+ border = get_frame_region (cw);
if (visible != None)
{
@@ -1331,10 +1338,10 @@ paint_windows (MetaScreen *screen,
then we need to recreate the extents of the window */
if (info->clip_changed)
{
- if (cw->border_size)
+ if (cw->frame_region)
{
- XFixesDestroyRegion (xdisplay, cw->border_size);
- cw->border_size = None;
+ XFixesDestroyRegion (xdisplay, cw->frame_region);
+ cw->frame_region = None;
}
if (cw->window_size)
@@ -1352,8 +1359,8 @@ paint_windows (MetaScreen *screen,
#endif
}
- if (cw->border_size == None)
- cw->border_size = border_size (cw);
+ if (cw->frame_region == None)
+ cw->frame_region = get_frame_region (cw);
if (cw->window_size == None)
cw->window_size = window_size (cw);
@@ -1383,7 +1390,7 @@ paint_windows (MetaScreen *screen,
}
XFixesSubtractRegion (xdisplay, paint_region,
- paint_region, cw->border_size);
+ paint_region, cw->frame_region);
}
if (!cw->border_clip)
@@ -1438,7 +1445,7 @@ paint_windows (MetaScreen *screen,
}
XFixesIntersectRegion (xdisplay, cw->border_clip, cw->border_clip,
- cw->border_size);
+ cw->frame_region);
XFixesSetPictureClipRegion (xdisplay, root_buffer, 0, 0,
cw->border_clip);
if (cw->mode == WINDOW_ARGB)
@@ -1697,10 +1704,10 @@ free_win (MetaCompWindow *cw,
cw->shadow_pict = None;
}
- if (cw->border_size)
+ if (cw->frame_region)
{
- XFixesDestroyRegion (xdisplay, cw->border_size);
- cw->border_size = None;
+ XFixesDestroyRegion (xdisplay, cw->frame_region);
+ cw->frame_region = None;
}
if (cw->window_size)
@@ -1976,7 +1983,9 @@ add_win (MetaScreen *screen,
cw->alpha_pict = None;
cw->shadow_pict = None;
- cw->border_size = None;
+
+ cw->frame_region = None;
+
cw->window_size = None;
cw->extents = None;
cw->shadow = None;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]