[mutter] frames: Don't clip out "invisible" parts of frames
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] frames: Don't clip out "invisible" parts of frames
- Date: Thu, 23 Jun 2016 14:48:30 +0000 (UTC)
commit c61dfa71ede8698cb36833d59bb52a7176ec8d40
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Jun 23 12:30:47 2016 +0200
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
src/ui/frames.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 4296862..746fdea 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]