GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Wed Aug 31, 2016 12:26 am

All times are UTC

Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Reserve space on desktop
PostPosted: Sun Mar 09, 2008 2:46 pm 
Familiar Face

Joined: Sun Mar 09, 2008 2:16 pm
Posts: 14
Hello everybody!

I'm writing my first GTK-Application and actually everything is running as it should ...
But now I'd like to reserve some space of the desktop for my application, like the gnome-panel and many docks do, so that my window will not be overlapped by maximised applications. Unfortunately I couldn't find a solution :(

I'd be glad for any help, thanks.


 Post subject:
PostPosted: Tue Mar 11, 2008 3:27 am 
GTK+ Guru

Joined: Thu Jun 21, 2007 1:52 pm
Posts: 198
Location: Wilkes Barre Pa
You need to use gdk to do that.

window = gtk_window_new (GTK_WINDOW_TOPLEVEL);

These are hints for the window manager that indicate what type of function the window has. The window manager can use this when determining decoration and behaviour of the window. The hint must be set before mapping the window.
GDK_WINDOW_TYPE_HINT_NORMAL Normal toplevel window.
GDK_WINDOW_TYPE_HINT_MENU Window used to implement a menu; GTK+ uses this hint only for torn-off menus, see GtkTearoffMenuItem.
GDK_WINDOW_TYPE_HINT_TOOLBAR Window used to implement toolbars.
GDK_WINDOW_TYPE_HINT_SPLASHSCREEN Window used to display a splash screen during application startup.
GDK_WINDOW_TYPE_HINT_UTILITY Utility windows which are not detached toolbars or dialogs.
GDK_WINDOW_TYPE_HINT_DOCK Used for creating dock or panel windows.
GDK_WINDOW_TYPE_HINT_DESKTOP Used for creating the desktop background window.
GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU A menu that belongs to a menubar.
GDK_WINDOW_TYPE_HINT_POPUP_MENU A menu that does not belong to a menubar, e.g. a context menu.
GDK_WINDOW_TYPE_HINT_NOTIFICATION A notification - typically a "bubble" that belongs to a status icon.
GDK_WINDOW_TYPE_HINT_COMBO A popup from a combo box.
GDK_WINDOW_TYPE_HINT_DND A window that is used to implement a DND cursor. ... owTypeHint

Hope that helps :)

 Post subject:
PostPosted: Tue Mar 11, 2008 7:56 am 
Familiar Face

Joined: Sun Mar 09, 2008 2:16 pm
Posts: 14
Hello caracal!

Thank you for your answer!

Unfortunately this didn't help me: I already changed the window type to dock and it docks my window to the corner of the screen, it makes it impossible for my application to get focus, but it does not prevent maximised windows from overlapping my docked window (actually the maximised windows are under my window to be precise).

Any other suggestions? I really have no clue on how to solve this problem and would be happy about every little advice, thanks :-)

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group