[maemo-developers] Non modal dialog

From: Eero Tamminen eero.tamminen at nokia.com
Date: Thu Feb 7 10:44:41 EET 2008
Hi,

ext Ross Burton wrote:
> On Wed, 2008-02-06 at 20:57 +0100, Frédéric Charrier wrote:
>>>> what do you mean by "normal" window ?
>>>> a GTK_WINDOW_TOPLEVEL ?
>>> Yes, a popup window is only for special rare uses, like tooltips.
>> if I use a GTK_WINDOW_TOPLEVEL it appears maximized, and I can't move
>> it neither change its size.
> 
> Oh I see, you are trying to use GtkWindows as the notes themselves.
> 
> Matchbox (the window manager) enforces normal windows to fill the screen
> (excluding panels), dialogs are centered and modal,

Only dialogs without a parent are made system modal by the window
manager as otherwise user could lose them (as dialogs are not listed
in the task navigator, there's no way to return system dialog once
an application would be topped above one).  This behaviour can be
disabled by modifying the Matchbox window manager command line args.

For application dialogs (dialogs that are trancient to some application
window), it's up to application whether the dialog is modal or not.
Our Style Guide states that they should be modal, but nothing's
forcing it, app just needs to us Gtk properly (not to call the
dialog convenience function that effectively makes it modal by
creating a new main loop for the dialog).


> and "popup" windows
> are ignored (technically, override redirect windows).  This means that
> they don't get decorated and can't be moved by the window manager.
> 
> The solution here is to create a top level window for you application,
> and then draw the postit notes yourself.  One way would be to create a
> widget which draws a postit note and place them inside a GtkFixed or
> GtkDrawingArea.


	- Eero

More information about the maemo-developers mailing list