diff options
author | Tor Lillqvist <tml@novell.com> | 2008-03-10 15:48:06 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2008-03-10 15:48:06 +0000 |
commit | 0f7099e308b98c84cf1bd64e59d511c4db750f4b (patch) | |
tree | 685810dbe188dcd528078fc3ae5dab9752de7aa2 /gdk/win32/gdkmain-win32.c | |
parent | a0d427dd996ca49d75be04ff384422e56db2a841 (diff) | |
download | gtk+-0f7099e308b98c84cf1bd64e59d511c4db750f4b.tar.gz |
Bug 520286 - Non-deletable window has no minimize / maximize buttons
2008-03-10 Tor Lillqvist <tml@novell.com>
Bug 520286 - Non-deletable window has no minimize / maximize buttons
* gdk/win32/gdkmain-win32.c (_gdk_win32_window_style_to_string):
New debugging output function that decodes a set of WS_* bits.
* gdk/win32/gdkprivate-win32.h: Declare it.
* gdk/win32/gdkwindow-win32.c (update_single_system_menu_entry):
New function that enables or disables one menu entry in the system
menu of a top-level window. (The corresponding decoration will
then also be enabled or disabled (grayed).)
(update_style_bits): Do as the comment says and don't try to
update the window style based on the GdkWMFunctions set for the
window.
(update_system_menu): New function that enables or disables the
system menu entries based on a window's stored set of
GdkWMFunctions.
(gdk_window_set_functions): Call update_system_menu() instead of
update_style_bits().
svn path=/trunk/; revision=19743
Diffstat (limited to 'gdk/win32/gdkmain-win32.c')
-rw-r--r-- | gdk/win32/gdkmain-win32.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/gdk/win32/gdkmain-win32.c b/gdk/win32/gdkmain-win32.c index 1e86f395e4..f156c0ca84 100644 --- a/gdk/win32/gdkmain-win32.c +++ b/gdk/win32/gdkmain-win32.c @@ -544,6 +544,48 @@ _gdk_win32_window_state_to_string (GdkWindowState state) } gchar * +_gdk_win32_window_style_to_string (LONG style) +{ + gchar buf[1000]; + gchar *bufp = buf; + gchar *s = ""; + + buf[0] = '\0'; + +#define BIT(x) \ + if (style & WS_ ## x) \ + (bufp += sprintf (bufp, "%s" #x, s), s = "|") + + /* Note that many of the WS_* macros are in face several bits. + * Handle just the individual bits here. Sort as in w32api's + * winuser.h. + */ + BIT (BORDER); + BIT (CHILD); + BIT (CLIPCHILDREN); + BIT (CLIPSIBLINGS); + BIT (DISABLED); + BIT (DLGFRAME); + BIT (GROUP); + BIT (HSCROLL); + BIT (ICONIC); + BIT (MAXIMIZE); + BIT (MAXIMIZEBOX); + BIT (MINIMIZE); + BIT (MINIMIZEBOX); + BIT (POPUP); + BIT (SIZEBOX); + BIT (SYSMENU); + BIT (TABSTOP); + BIT (THICKFRAME); + BIT (VISIBLE); + BIT (VSCROLL); +#undef BIT + + return static_printf ("%s", buf); +} + +gchar * _gdk_win32_rop2_to_string (int rop2) { switch (rop2) |