GNOME Bugzilla – Bug 561564
note windows should be marked as transient
Last modified: 2010-04-06 19:09:39 UTC
I'm using xmonad, a tiling window manager that also has support for a floating layer. It automatically puts windows that are marked as transient in the floating layer, and tiles all the others (with a few exceptions). Unfortunately the little window that pops up when you click on a note in Sudoku is not marked as transient, so it gets tiled, which is quite wrong. Other information:
Created attachment 123057 [details] screenshot illustrating note popup being tiled by xmonad The popup is the window in the background; note that it even has a tab/title bar, whereas floated windows don't. Because there are no other windows on the tiled layer, the window manager gives it the entire screen (apart from the space reserved for the panel). A workaround is to configure xmonad specifically to always float gnome- sudoku's windows.
Yeah, the note editor also doesn't work in awesome. set_transient_for(parent) should be able to fix this. However, the parameter 'parent' it needs is the main window. But the note editor actually knows nothing about the main window, so I think this is not straightforward to fix.
Created attachment 157557 [details] [review] Make the note editor transient I managed to figure this one out. Zhang is right, the note editor is deeper then any access to the parent window. The patch creates a new data member parent_win in NumberBox where the note editor is created. It also adds the method SudokuNumberGrid.set_parent_for() which initializes all of the NumberBox's parent_win. When a note editor is created - it calls set_transient_for() I tested this patch on both xmonad and awesome - looks like it works.
Comment on attachment 157557 [details] [review] Make the note editor transient Committed to master: http://git.gnome.org/browse/gnome-games/commit/?id=1a0232c816f7e8198602f0a594270dc081a615a1 Thanks :)