[kupfer: 2/10] ui: Only use window shape if corner-radius is not zero



commit 6afc220384f39aae664f4259b58063bad54c3664
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Thu Mar 31 18:49:21 2011 +0200

    ui: Only use window shape if corner-radius is not zero
    
    Window decorations are only drawn if we don't use window shape.

 kupfer/ui/browser.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/kupfer/ui/browser.py b/kupfer/ui/browser.py
index a8cf6a7..b27e1fc 100644
--- a/kupfer/ui/browser.py
+++ b/kupfer/ui/browser.py
@@ -1744,7 +1744,8 @@ class KupferWindow (gtk.Window):
 	def reshape(self, widget, allocation):
 		## if not composited, use rounded window shape
 		w,h = allocation.width, allocation.height
-		if not widget.is_composited():
+		radius = widget.style_get_property('corner-radius')
+		if not widget.is_composited() and radius:
 			bitmap = gtk.gdk.Pixmap(None, w, h, 1)
 			cr = bitmap.cairo_create()
 
@@ -1755,7 +1756,6 @@ class KupferWindow (gtk.Window):
 			# radius of rounded corner
 			cr.set_source_rgb(1.0, 1.0, 1.0)
 			cr.set_operator(cairo.OPERATOR_SOURCE)
-			radius = widget.style_get_property('corner-radius')
 			make_rounded_rect(cr, 0, 0, w, h, radius)
 			cr.fill()
 			widget.shape_combine_mask(bitmap, 0, 0)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]