[maemo-developers] Non modal dialog

From: Tapani Pälli tapani.palli at nokia.com
Date: Thu Feb 7 10:53:40 EET 2008
Hello;

ext Eero Tamminen wrote:
> 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).
>
>   

Yep, it is technically possible to implement these notes as dialogs but
the moving of them (dragging) needs to be implemented by the application
itself. (The dialog movement behaviour can be also modified from startup
parameters if you want this program only for yourself).

>   
>> 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
> _______________________________________________
> maemo-developers mailing list
> maemo-developers at maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>   


// Tapani Pälli

-- 
Software Engineer
Open Source Software Operations 


More information about the maemo-developers mailing list