From 62a4f0dd3eca7d4172b45fe07c0848ee524ea9c8 Mon Sep 17 00:00:00 2001 From: ericwa Date: Sun, 24 Jan 2010 05:06:33 +0000 Subject: [PATCH] * Source/GSWindowDecorationView.m: In drawRect:, clear the window background before getting the theme to draw its background. This makes windows with semitransparent background colors work properly. NOTE: While the clear operation is very fast, we may want to only do it if the window background colour has an alpha value of < 1. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29376 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 9 +++++++++ Source/GSWindowDecorationView.m | 3 +++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index c3d7fd820..80a470de8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-01-23 Eric Wasylishen + + * Source/GSWindowDecorationView.m: In drawRect:, clear the window + background before getting the theme to draw its background. + This makes windows with semitransparent background colors work + properly. + NOTE: While the clear operation is very fast, we may want to only do + it if the window background colour has an alpha value of < 1. + 2010-01-23 Eric Wasylishen * Source/NSMenuView.m: For horizontal menus, treat clicking in the diff --git a/Source/GSWindowDecorationView.m b/Source/GSWindowDecorationView.m index c795e78e2..8030d26c0 100644 --- a/Source/GSWindowDecorationView.m +++ b/Source/GSWindowDecorationView.m @@ -355,6 +355,9 @@ { if (NSIntersectsRect(rect, contentRect)) { + // Since this is the outermost view, we have to clear the contentRect + // in case the theme's window background is not opaque. + NSRectFillUsingOperation(contentRect, NSCompositeClear); [[GSTheme theme] drawWindowBackground: contentRect view: self]; } }