[kupfer] ui: Fix loss of window shape when centering window
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [kupfer] ui: Fix loss of window shape when centering window
- Date: Fri, 13 May 2011 22:16:22 +0000 (UTC)
commit 17b1ace79e5815e4aed6be016a6090d1cd7a6e98
Author: David Schneider <dnschneid gmail com>
Date: Fri May 13 15:00:30 2011 -0700
ui: Fix loss of window shape when centering window
When centering the kupfer window, either on first show or when appearing
on a new monitor or X screen, we unrealize+realize the window to update
its colormap etc. KupferWindow will now on the 'realize' event update
its window shape again.
Launchpad-bug: https://bugs.launchpad.net/kupfer/+bug/779845
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..88c306c 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_realize)
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_realize(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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]