gtk+ r20129 - in trunk: . gdk/win32
- From: tml svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r20129 - in trunk: . gdk/win32
- Date: Fri, 23 May 2008 18:25:12 +0000 (UTC)
Author: tml
Date: Fri May 23 18:25:12 2008
New Revision: 20129
URL: http://svn.gnome.org/viewvc/gtk+?rev=20129&view=rev
Log:
2008-05-23 Tor Lillqvist <tml novell com>
* gdk/win32/gdkwindow-win32.c (update_style_bits): Don't do
anything if style doesn't change. Improve debugging output.
Modified:
trunk/ChangeLog
trunk/gdk/win32/gdkwindow-win32.c
Modified: trunk/gdk/win32/gdkwindow-win32.c
==============================================================================
--- trunk/gdk/win32/gdkwindow-win32.c (original)
+++ trunk/gdk/win32/gdkwindow-win32.c Fri May 23 18:25:12 2008
@@ -2886,35 +2886,44 @@
update_style_bits (GdkWindow *window)
{
GdkWMDecoration decorations;
- LONG style, exstyle;
+ LONG old_style, new_style, exstyle;
gboolean all;
RECT rect, before, after;
- style = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE);
+ old_style = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE);
exstyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE);
GetClientRect (GDK_WINDOW_HWND (window), &before);
after = before;
- AdjustWindowRectEx (&before, style, FALSE, exstyle);
-
- GDK_NOTE (MISC, g_print ("update_style_bits: style: %s", _gdk_win32_window_style_to_string (style)));
+ AdjustWindowRectEx (&before, old_style, FALSE, exstyle);
+ new_style = old_style;
if (get_effective_window_decorations (window, &decorations))
{
all = (decorations & GDK_DECOR_ALL);
- update_single_bit (&style, all, decorations & GDK_DECOR_BORDER, WS_BORDER);
- update_single_bit (&style, all, decorations & GDK_DECOR_RESIZEH, WS_THICKFRAME);
- update_single_bit (&style, all, decorations & GDK_DECOR_TITLE, WS_CAPTION);
- update_single_bit (&style, all, decorations & GDK_DECOR_MENU, WS_SYSMENU);
- update_single_bit (&style, all, decorations & GDK_DECOR_MINIMIZE, WS_MINIMIZEBOX);
- update_single_bit (&style, all, decorations & GDK_DECOR_MAXIMIZE, WS_MAXIMIZEBOX);
+ update_single_bit (&new_style, all, decorations & GDK_DECOR_BORDER, WS_BORDER);
+ update_single_bit (&new_style, all, decorations & GDK_DECOR_RESIZEH, WS_THICKFRAME);
+ update_single_bit (&new_style, all, decorations & GDK_DECOR_TITLE, WS_CAPTION);
+ update_single_bit (&new_style, all, decorations & GDK_DECOR_MENU, WS_SYSMENU);
+ update_single_bit (&new_style, all, decorations & GDK_DECOR_MINIMIZE, WS_MINIMIZEBOX);
+ update_single_bit (&new_style, all, decorations & GDK_DECOR_MAXIMIZE, WS_MAXIMIZEBOX);
+ }
+
+ if (old_style == new_style)
+ {
+ GDK_NOTE (MISC, g_print ("update_style_bits: %p: no change\n",
+ GDK_WINDOW_HWND (window)));
+ return;
}
- GDK_NOTE (MISC, g_print (" => %s\n", _gdk_win32_window_style_to_string (style)));
+ GDK_NOTE (MISC, g_print ("update_style_bits: %p: %s => %s\n",
+ GDK_WINDOW_HWND (window),
+ _gdk_win32_window_style_to_string (old_style),
+ _gdk_win32_window_style_to_string (new_style)));
- SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, style);
+ SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, new_style);
- AdjustWindowRectEx (&after, style, FALSE, exstyle);
+ AdjustWindowRectEx (&after, new_style, FALSE, exstyle);
GetWindowRect (GDK_WINDOW_HWND (window), &rect);
rect.left += after.left - before.left;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]