[Sugar-devel] [PATCH sugar] Make the Frame a "pop-up" window

Sascha Silbe silbe at activitycentral.com
Sat Jun 11 13:30:30 EDT 2011


While the ICCCM discourages overriding redirects on top-level windows [1],
it's the best way for now to make the Frame work with window managers other
than metacity. The Frame uses a fixed layout composed of four separate
windows and expects to appear on certain parts of the screen. Only the
override-redirect flag can guarantee this happens.

[1] http://tronche.com/gui/x/icccm/sec-4.html#s-4.2.2

Signed-off-by: Sascha Silbe <silbe at activitycentral.com>
---

Like the sugar-toolkit patch, this isn't a problem with metacity, just notion
(haven't tried any other window manager). There's no observable change of
behaviour with metacity, so it should qualify as a bug fix.

 src/jarabe/frame/framewindow.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/jarabe/frame/framewindow.py b/src/jarabe/frame/framewindow.py
index c77e76c..2db9a89 100644
--- a/src/jarabe/frame/framewindow.py
+++ b/src/jarabe/frame/framewindow.py
@@ -24,7 +24,7 @@ class FrameWindow(gtk.Window):
     __gtype_name__ = 'SugarFrameWindow'

     def __init__(self, position):
-        gtk.Window.__init__(self)
+        gtk.Window.__init__(self, type=gtk.WINDOW_POPUP)
         self.hover = False
         self.size = style.GRID_CELL_SIZE + style.LINE_WIDTH

--
1.7.2.5



More information about the Sugar-devel mailing list