[maemo-developers] Moving windows in Maemo

From: Eero Tamminen eero.tamminen at nokia.com
Date: Wed Apr 11 17:49:30 EEST 2007

ext Kalle Vahlman wrote:
> 2007/4/9, Sean Luke <sean at cs.gmu.edu>:
>> On Apr 9, 2007, at 4:38 AM, Kalle Vahlman wrote:
>> >> g = gtk.Window(gtk.WINDOW_POPUP)
>> >>
>> >> works fine.
>> Thanks.  The primary concern I have about WINDOW_POPUP is that it's
>> "different" from other kinds of windows.  A myriad of disadvantages
>> to it are listed here:
>> http://www.pygtk.org/docs/pygtk/gtk-constants.html#gtk-window-type-
>> constants
> Yes, they are all pretty much saying "the window manager won't do
> anything with POPUP windows" and that's correct. However, since
> applications shouldn't be overriding the window manager behaviour,
> that's the "correct" way to circumvent unwanted window manager
> intervention.

I think popup type sets the OverrideRedirect flag for the window.

This should normally be used only for windows such as popup menus
that take grabs on user input and disappear when user tries to
interact with something else.  Reason being that WM really doesn't
manage those, you could lose them under other windows and not be able
to retrieve them etc.  Doing grabs is even more evil (but unfortunately
in the case of menus, a necessary evil).

>> ...though perhaps for my purposes it may be acceptable.  Are these
>> problems with WINDOW_POPUP applicable to maemo, or are they mostly
>> for general gtk?
> I'm not sure what the "many features" mentioned there exactly are, but
> since you would be overriding the wm anyway, I doubt there will be
> much that you lose...

Moving windows is not really overriding WM...

Dialogs can already e.g. position themselves on the screen how
they want, WM centers the dialogs only if they haven't set
co-ordinates before mapping themselves.

If one wants all dialogs to be movable, one can just set suitable
-use_dialog_mode policy option value in the matchbox-window-manager
startup script: /etc/osso-af-init/matchbox.sh and restart the device.
(and if you make a mistake and matchbox doesn't startup, the device
may end up in a reboot loop, so test this first in Scratchbox!)

> Depends on whatever "your purposes" might be of course, you neglected
> to mention them ;)

	- Eero

More information about the maemo-developers mailing list