[gtkada] problems handling windows

briot at gnat.com briot at gnat.com
Tue Mar 14 13:20:47 CET 2000


Jeremy.ROSEN at resel.enst-bretagne.fr writes:
 > Is their a way to have a window stay on top ?
 > I don't meen grab the focus, but to stay the topmost window of the application ?

The best I could come up with was something like:

declare
   Win1, Win2 : Gtk_Window;
begin
   Gtk_New (Win1, Window_Toplevel);
   Gtk_New (Win2, Window_Toplevel);
   Set_Transient_For (Win2, Win1);
   Show (Win1);
   Show (Win2);
end;


In most cases, this will prevent Win2 to be under Win1. Unfortunately, this
also depends on your window manager, which might or might not acknowledge the
"hints" that are given to it.
I know that for instance enlightenment will allow Win2 to be under Win1 if you
use the "Set Stacking" menu to force Win2 to be under Win1. However, simply
clicking on the title bar of Win2 or Win1 will not change their relative order
on the screen.

Emmanuel





More information about the gtkada mailing list