Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/rpms/sugar-toolkit/0026-Tell-GTK-that-Palettes-are-pop-ups.patch
blob: 06f1e6f87f9b771f45c6d2b58ea2d6b1ec75f676 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From c5b93bf5951157d7c3679533bee65469fbf9360b Mon Sep 17 00:00:00 2001
From: Sascha Silbe <silbe@activitycentral.com>
Date: Sat, 4 Jun 2011 22:40:33 +0200
Subject: [PATCH sugar-toolkit 26/31] Tell GTK that Palettes are pop-ups
Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>

The Palettes are genuine client-managed pop-up windows. If we don't tell GTK
about that, it won't set the override-redirect flag so the window manager
will try to manage the window (placement, decorations, etc.) which naturally
interferes with our management of the window (pop-up / -down).

Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
---
 src/sugar/graphics/palettewindow.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/sugar/graphics/palettewindow.py b/src/sugar/graphics/palettewindow.py
index b77cd9d..5081893 100644
--- a/src/sugar/graphics/palettewindow.py
+++ b/src/sugar/graphics/palettewindow.py
@@ -155,7 +155,9 @@ class PaletteWindow(gtk.Window):
         self._popdown_anim = animator.Animator(0.6, 10)
         self._popdown_anim.add(_PopdownAnimation(self))
 
-        gobject.GObject.__init__(self, **kwargs)
+        gtk.Window.__init__(self, type=gtk.WINDOW_POPUP)
+        for name, value in kwargs.items():
+            setattr(self.props, name, value)
 
         self.set_decorated(False)
         self.set_resizable(False)
-- 
1.7.6