summaryrefslogtreecommitdiff
path: root/src/ui/frames.c
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2016-06-23 12:30:47 +0200
committerFlorian Müllner <fmuellner@gnome.org>2016-06-23 16:47:51 +0200
commitc61dfa71ede8698cb36833d59bb52a7176ec8d40 (patch)
tree1e265374910703a56d6ee9b8b24b996ee1373c4d /src/ui/frames.c
parent65cc1c711ad639d01ef9b34c2086c22e236aacad (diff)
downloadmutter-c61dfa71ede8698cb36833d59bb52a7176ec8d40.tar.gz
frames: Don't clip out "invisible" parts of frames
The GTK+ theme may draw parts of the decorations outside the actual frame. Since commit f9db65f47f we make sure that the frame is big enough to account for any overdrawing, however as we still clip the cairo context to the actual frame before drawing the decorations, those parts aren't actually painted. This issue is not very obvious for most frames, as they use a non-rgba visual where the unpainted parts appear black, which gives the expected result with many themes once the shape mask is applied (as the mask does include any overdrawn parts). For frames using an rgba visual however, unpainted parts are transparent, so any overdrawn decorations are clearly missing. Fix this by only clipping out the client area when drawing decorations. https://bugzilla.gnome.org/show_bug.cgi?id=745060
Diffstat (limited to 'src/ui/frames.c')
-rw-r--r--src/ui/frames.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 4296862b9..746fdea65 100644
--- a/src/ui/frames.c
+++ b/src/ui/frames.c
@@ -1292,7 +1292,7 @@ get_visible_frame_border_region (MetaUIFrame *frame)
MetaFrameFlags flags;
MetaFrameType type;
MetaFrameBorders borders;
- MetaRectangle frame_rect = frame->meta_window->rect;
+ MetaRectangle buffer_rect = frame->meta_window->buffer_rect;
flags = meta_frame_get_flags (frame->meta_window->frame);
type = meta_window_get_frame_type (frame->meta_window);
@@ -1301,19 +1301,19 @@ get_visible_frame_border_region (MetaUIFrame *frame)
type, frame->text_height, flags,
&borders);
- /* Visible frame rect */
- area.x = borders.invisible.left;
- area.y = borders.invisible.top;
- area.width = frame_rect.width;
- area.height = frame_rect.height;
+ /* Frame rect */
+ area.x = 0;
+ area.y = 0;
+ area.width = buffer_rect.width;
+ area.height = buffer_rect.height;
frame_border = cairo_region_create_rectangle (&area);
/* Client rect */
- area.x += borders.visible.left;
- area.y += borders.visible.top;
- area.width -= borders.visible.left + borders.visible.right;
- area.height -= borders.visible.top + borders.visible.bottom;
+ area.x += borders.total.left;
+ area.y += borders.total.top;
+ area.width -= borders.total.left + borders.total.right;
+ area.height -= borders.total.top + borders.total.bottom;
/* Visible frame border */
cairo_region_subtract_rectangle (frame_border, &area);