changeset 1388:8fe15c1648c9

Fix windows on GTK that aren't supposed to have a close button.. having one. Function added in 2.10 can try to remove it.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 26 Nov 2011 20:20:41 +0000
parents db27c6e139a3
children 0512fbb08abf
files gtk/dw.c gtk3/dw.c
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gtk/dw.c	Sat Nov 26 00:09:07 2011 +0000
+++ b/gtk/dw.c	Sat Nov 26 20:20:41 2011 +0000
@@ -3438,6 +3438,11 @@
          gtk_window_iconify(GTK_WINDOW(tmp));
 #endif
       }
+#if GTK_CHECK_VERSION(2,10,0)
+      /* Either the CLOSEBUTTON or SYSMENU flags should make it deletable */
+      if(!(flStyle & (DW_FCF_CLOSEBUTTON | DW_FCF_SYSMENU)))
+         gtk_window_set_deletable(GTK_WINDOW(tmp), FALSE);
+#endif
 
       gdk_window_set_decorations(tmp->window, flags);
 
--- a/gtk3/dw.c	Sat Nov 26 00:09:07 2011 +0000
+++ b/gtk3/dw.c	Sat Nov 26 20:20:41 2011 +0000
@@ -2921,6 +2921,9 @@
          flags &= ~DW_FCF_MINIMIZE;
          gtk_window_iconify(GTK_WINDOW(tmp));
       }
+      /* Either the CLOSEBUTTON or SYSMENU flags should make it deletable */
+      if(!(flStyle & (DW_FCF_CLOSEBUTTON | DW_FCF_SYSMENU)))
+         gtk_window_set_deletable(GTK_WINDOW(tmp), FALSE);
 
       gdk_window_set_decorations(gtk_widget_get_window(tmp), flags);