[gtkada] Getting rid of Windows' application icons

Michael Bode michael.bode at laserline.de
Mon Jul 17 10:16:30 CEST 2006


Chris Sparks schrieb:

> Is there a way to disable a top-level window such that you don't get any 
> of the "Windows" or "Linux" application icons. I want basically a plain 
> window such that the use can't select minimize, maximize, or delete from 
> the upper right of the window.

On Linux (at least with Gnome/Metacity) you can use:

procedure Set_Decorated
   (Window             : access Gtk_Window_Record;
    Setting            :        Boolean := True);

By default, windows are decorated with a title bar, resize
controls, etc. Some window managers allow GtkAda to disable these 
decorations, creating a borderless window. If you set the decorated 
property to False using this function, GtkAda will do its best to 
convince the window manager not to decorate the window.

This gives you a borderless window, i.e. no resize bar or title bar. 
Doesn't seem to work with Windows.

On Windows but not on Linux (tried with Gnome, XFCE and Fluxbox) you can 
use Gdk.Windows.Set_Decorations:

Show (Window);
Gdk.Window.Set_Decorations (Get_Window (Window), Decor_Border or 
Decor_Title);

This gives a window with frame and title bar. Has to be called after 
Show. This works on Windows but not with libglade.

-- 
Michael Bode
Laserline GmbH
Fraunhoferstr.
56218 Mülheim-Kärlich
Phone:     +49 2630 964-2200
Fax:       +49 2630 964-2209



More information about the gtkada mailing list