Fix loss of window shape on monitor change



As Seen On IRC (TM)
>From 3f75efdd49b024cdba57a443f543f9c84a98b3ba Mon Sep 17 00:00:00 2001
From: David Schneider <dnschneid gmail com>
Date: Fri, 13 May 2011 15:00:30 -0700
Subject: [PATCH] Fix loss of window shape on monitor change.

---
 kupfer/ui/browser.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/kupfer/ui/browser.py b/kupfer/ui/browser.py
index edc09c8..6bed21d 100644
--- a/kupfer/ui/browser.py
+++ b/kupfer/ui/browser.py
@@ -1764,6 +1764,7 @@ class KupferWindow (gtk.Window):
 		self.connect("expose-event", self.on_expose_event)
 		self.connect("size-allocate", self.on_size_allocate)
 		self.connect("composited-changed", self.on_composited_changed)
+		self.connect("realize", self.on_window_realized)
 		self.set_app_paintable(True)
 
 	def on_style_set(self, widget, old_style):
@@ -1809,6 +1810,9 @@ class KupferWindow (gtk.Window):
 	def on_composited_changed(self, widget):
 		self.reshape(widget, widget.get_allocation())
 
+	def on_window_realized(self, widget):
+		self.reshape(widget, widget.get_allocation())
+
 	def on_size_allocate(self, widget, allocation):
 		if not hasattr(self, "_old_alloc"):
 			self._old_alloc = (0,0)
-- 
1.7.4.1



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