[patch] Main UI: Add minimize and menu buttons WM decoration hints.

David Vrabel <[email protected]> Thu, 26 Feb 2004 22:58:59 +0000
Newsgroups gmane.comp.audio.zinf.devel
Message-ID <[email protected]>
Hi,

The attached (trivial) patch adds minimize and menu button window 
manager decoration hints to the main UI.   This is useful if you've 
forced the window manager to add a border/title to the main UI.

Later, I may look at getting the theme to specify whether the window 
should have a title/border.

David Vrabel
zinf-minimize-button.patch (text/x-patch, 845 B)
Index: ui/zinf/unix/src/GTKWindow.cpp
===================================================================
RCS file: /cvsroot/zinf/zinf/ui/zinf/unix/src/GTKWindow.cpp,v
retrieving revision 1.10
diff -u -p -r1.10 GTKWindow.cpp
--- ui/zinf/unix/src/GTKWindow.cpp	14 Feb 2004 21:56:39 -0000	1.10
+++ ui/zinf/unix/src/GTKWindow.cpp	26 Feb 2004 22:38:50 -0000
@@ -236,7 +247,7 @@ GTKWindow::GTKWindow(Theme *pTheme, stri
                           GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
                           GDK_KEY_PRESS_MASK | GDK_SCROLL_MASK ); 
     gtk_widget_realize(mainWindow);
-    gdk_window_set_decorations(mainWindow->window, (GdkWMDecoration)0);
+    gdk_window_set_decorations(mainWindow->window, (GdkWMDecoration)(GDK_DECOR_MENU | GDK_DECOR_MINIMIZE));
     gdk_threads_leave();
 
     m_pCanvas = new GTKCanvas(this);