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: f548e31867d319896ad486d21be331a69008da2e (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 d0edd9b287781cea274bf8048acdb970fe343f65 Mon Sep 17 00:00:00 2001
From: Sascha Silbe <silbe@activitycentral.com>
Date: Sat, 4 Jun 2011 22:40:33 +0200
Subject: [PATCH 26/33] Tell GTK that Palettes are pop-ups
Organization: Sugar Labs Foundation

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.4.4