Re: How to have a window stay always on top?

On Mon, 2004-10-04 at 18:08, Elijah Newren wrote:

Just set it as a MENU window, it'll be always on top. when creating a
window, you can pass argument to the new() method. Check the doc

It seems that Gtk::Window->new only supports window types 'toplevel',
'dialog' and 'popup'. The 'popup' type will stay on top, but it has
no decoration and can not be moved. This is not what i'm searching

You could set the window type to DOCK.  This won't give decorations,
but it does allow moving and make the window be on top.  I believe
that there is not gtk+ function to do this (and thus probably no
gtk2-perl function), so it would depend on whether there's perl
bindings to Xlib.  gnome-panel provides a good example of how to do
this in C (see the xstuff_set_wmspec_dock_hints function in
gnome-panel/gnome-panel/xstuff.c), and if there are perl bindings to
Xlib (in particular for XChangeProperty), then this example should be
fairly easy to translate to perl.

There's the GdkProperty stuff though, which we do wrap. 
Gtk2/t/GdkProperty.t has example usage.  PerlPanel for example uses it
to make itself a strut that is not covered by maximized windows.


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