Re: How to display GTK app on the top?



On Fri, 8 Sep 2000, Guy Harris wrote:

> > Gnome provides the function for doing that -
> >         gnome_win_hints_set_layer(window,WIN_LAYER_ONTOP) 
> >  If you don't want gnome - just extract this function from gnomelibs and use
> > it in your apps. Also, window manager should understand gnome winhints (most
> > modern do).
> 
> Unfortunately, this works only in X; would it be useful to make this a
> GTK+ or GDK function, and use "SetWindowPos()" on Windows for the same
> function?  If so, would it be easy to do so, or does support for GNOME
> window manager hints involve dragging in a lot of GNOME code?

 No, it's 15 lines of code + enums for all constants like WIN_LAYER_ONTOP.

> (Also, am I missing something, or is there nothing in the current
> version of the Window Manager Specification to let you specify that a
> window must always be on top?)
> 

 No, there is a gnome window manager speicification (or something like that)
available on gnome.org, that documents additional atoms that window manager
should try to support. gnome_winhints_* just uses winhints listed in that
document. It's very interesting and useful spec (for example, it allows
setting window app state to something like WIN_APP_STATE_DISK_TRAFFIC1,
WIN_APP_STATE_ERROR1, WIN_APP_STATE_FATAL_ERROR1,  WIN_APP_STATE_WAITING1,
WIN_APP_STATE_PERCENT0[0-9]0_2 that in future can allow very inteligent
handling of windows (like playing predefined sounds when window state becomes
WIN_APP_STATE_FATAL_ERROR or WIN_APP_STATE_PERCENT100_1).

 As for making it gtk or gdk function - I'm not sure. 
 
 Best regards,
  -Vlad





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]