summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2002-10-28 20:41:47 +0000
committerTor Lillqvist <tml@src.gnome.org>2002-10-28 20:41:47 +0000
commit71737f4d1404f18a4682ce9d0ec687c08d23765b (patch)
tree79a27e0b8dedf207c2c0812cd70223a2706e3d93
parent34579a11b3a06f3a88d90d8b60c02cdde34afb19 (diff)
downloadgdk-pixbuf-71737f4d1404f18a4682ce9d0ec687c08d23765b.tar.gz
Don't call GetWindowLong for GWL_EXSTYLE, the extended window style wasn't
2002-10-28 Tor Lillqvist <tml@iki.fi> * gdk/win32/gdkwindow-win32.c (gdk_window_set_decorations, gdk_window_set_functions): Don't call GetWindowLong for GWL_EXSTYLE, the extended window style wasn't used or changed. After setting the window style with SetWindowLong, call SetWindowPos with the SWP_FRAMECHANGED flag for the window to actually be updated, as Platform SDK docs say one should. (#95812, huzheng)
-rw-r--r--ChangeLog10
-rw-r--r--ChangeLog.pre-2-1010
-rw-r--r--ChangeLog.pre-2-210
-rw-r--r--ChangeLog.pre-2-410
-rw-r--r--ChangeLog.pre-2-610
-rw-r--r--ChangeLog.pre-2-810
-rw-r--r--gdk/win32/gdkwindow-win32.c50
7 files changed, 91 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index 0167549c5..c6956253a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2002-10-28 Tor Lillqvist <tml@iki.fi>
+
+ * gdk/win32/gdkwindow-win32.c (gdk_window_set_decorations,
+ gdk_window_set_functions): Don't call GetWindowLong for
+ GWL_EXSTYLE, the extended window style wasn't used or
+ changed. After setting the window style with SetWindowLong, call
+ SetWindowPos with the SWP_FRAMECHANGED flag for the window to
+ actually be updated, as Platform SDK docs say one should. (#95812,
+ huzheng)
+
2002-10-25 Dmitry G. Mastrukov <dmitry@taurussoft.org>
* configure.in: Added Belorusian (be) translation to ALL_LINGUAS.
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 0167549c5..c6956253a 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,13 @@
+2002-10-28 Tor Lillqvist <tml@iki.fi>
+
+ * gdk/win32/gdkwindow-win32.c (gdk_window_set_decorations,
+ gdk_window_set_functions): Don't call GetWindowLong for
+ GWL_EXSTYLE, the extended window style wasn't used or
+ changed. After setting the window style with SetWindowLong, call
+ SetWindowPos with the SWP_FRAMECHANGED flag for the window to
+ actually be updated, as Platform SDK docs say one should. (#95812,
+ huzheng)
+
2002-10-25 Dmitry G. Mastrukov <dmitry@taurussoft.org>
* configure.in: Added Belorusian (be) translation to ALL_LINGUAS.
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 0167549c5..c6956253a 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,13 @@
+2002-10-28 Tor Lillqvist <tml@iki.fi>
+
+ * gdk/win32/gdkwindow-win32.c (gdk_window_set_decorations,
+ gdk_window_set_functions): Don't call GetWindowLong for
+ GWL_EXSTYLE, the extended window style wasn't used or
+ changed. After setting the window style with SetWindowLong, call
+ SetWindowPos with the SWP_FRAMECHANGED flag for the window to
+ actually be updated, as Platform SDK docs say one should. (#95812,
+ huzheng)
+
2002-10-25 Dmitry G. Mastrukov <dmitry@taurussoft.org>
* configure.in: Added Belorusian (be) translation to ALL_LINGUAS.
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 0167549c5..c6956253a 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,13 @@
+2002-10-28 Tor Lillqvist <tml@iki.fi>
+
+ * gdk/win32/gdkwindow-win32.c (gdk_window_set_decorations,
+ gdk_window_set_functions): Don't call GetWindowLong for
+ GWL_EXSTYLE, the extended window style wasn't used or
+ changed. After setting the window style with SetWindowLong, call
+ SetWindowPos with the SWP_FRAMECHANGED flag for the window to
+ actually be updated, as Platform SDK docs say one should. (#95812,
+ huzheng)
+
2002-10-25 Dmitry G. Mastrukov <dmitry@taurussoft.org>
* configure.in: Added Belorusian (be) translation to ALL_LINGUAS.
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 0167549c5..c6956253a 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,13 @@
+2002-10-28 Tor Lillqvist <tml@iki.fi>
+
+ * gdk/win32/gdkwindow-win32.c (gdk_window_set_decorations,
+ gdk_window_set_functions): Don't call GetWindowLong for
+ GWL_EXSTYLE, the extended window style wasn't used or
+ changed. After setting the window style with SetWindowLong, call
+ SetWindowPos with the SWP_FRAMECHANGED flag for the window to
+ actually be updated, as Platform SDK docs say one should. (#95812,
+ huzheng)
+
2002-10-25 Dmitry G. Mastrukov <dmitry@taurussoft.org>
* configure.in: Added Belorusian (be) translation to ALL_LINGUAS.
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 0167549c5..c6956253a 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,13 @@
+2002-10-28 Tor Lillqvist <tml@iki.fi>
+
+ * gdk/win32/gdkwindow-win32.c (gdk_window_set_decorations,
+ gdk_window_set_functions): Don't call GetWindowLong for
+ GWL_EXSTYLE, the extended window style wasn't used or
+ changed. After setting the window style with SetWindowLong, call
+ SetWindowPos with the SWP_FRAMECHANGED flag for the window to
+ actually be updated, as Platform SDK docs say one should. (#95812,
+ huzheng)
+
2002-10-25 Dmitry G. Mastrukov <dmitry@taurussoft.org>
* configure.in: Added Belorusian (be) translation to ALL_LINGUAS.
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index 0c1b3cbcf..40d33fe0c 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -44,7 +44,7 @@ static void gdk_window_impl_win32_set_colormap (GdkDrawable *drawable,
static void gdk_window_impl_win32_get_size (GdkDrawable *drawable,
gint *width,
gint *height);
-static GdkRegion* gdk_window_impl_win32_get_visible_region (GdkDrawable *drawable);
+static GdkRegion* gdk_window_impl_win32_get_visible_region (GdkDrawable *drawable);
static void gdk_window_impl_win32_init (GdkWindowImplWin32 *window);
static void gdk_window_impl_win32_class_init (GdkWindowImplWin32Class *klass);
static void gdk_window_impl_win32_finalize (GObject *object);
@@ -2099,19 +2099,26 @@ void
gdk_window_set_decorations (GdkWindow *window,
GdkWMDecoration decorations)
{
- LONG style, exstyle;
+ LONG style;
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
+ GDK_NOTE (MISC, g_print ("gdk_window_set_decorations: %p %s%s%s%s%s%s%s\n",
+ GDK_WINDOW_HWND (window),
+ (decorations & GDK_DECOR_ALL ? "ALL " : ""),
+ (decorations & GDK_DECOR_BORDER ? "BORDER " : ""),
+ (decorations & GDK_DECOR_RESIZEH ? "RESIZEH " : ""),
+ (decorations & GDK_DECOR_TITLE ? "TITLE " : ""),
+ (decorations & GDK_DECOR_MENU ? "MENU " : ""),
+ (decorations & GDK_DECOR_MINIMIZE ? "MINIMIZE " : ""),
+ (decorations & GDK_DECOR_MAXIMIZE ? "MAXIMIZE " : "")));
+
style = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE);
- exstyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE);
style &= (WS_OVERLAPPED|WS_POPUP|WS_CHILD|WS_MINIMIZE|WS_VISIBLE|WS_DISABLED
|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_MAXIMIZE);
- exstyle &= (WS_EX_TOPMOST|WS_EX_TRANSPARENT);
-
if (decorations & GDK_DECOR_ALL)
style |= (WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX);
if (decorations & GDK_DECOR_BORDER)
@@ -2128,26 +2135,35 @@ gdk_window_set_decorations (GdkWindow *window,
style |= (WS_MAXIMIZEBOX);
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, style);
+ SetWindowPos (GDK_WINDOW_HWND (window), NULL, 0, 0, 0, 0,
+ SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE |
+ SWP_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER);
}
void
gdk_window_set_functions (GdkWindow *window,
GdkWMFunction functions)
{
- LONG style, exstyle;
+ LONG style;
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
+ GDK_NOTE (MISC, g_print ("gdk_window_set_functions: %p %s%s%s%s%s%s\n",
+ GDK_WINDOW_HWND (window),
+ (functions & GDK_FUNC_ALL ? "ALL " : ""),
+ (functions & GDK_FUNC_RESIZE ? "RESIZE " : ""),
+ (functions & GDK_FUNC_MOVE ? "MOVE " : ""),
+ (functions & GDK_FUNC_MINIMIZE ? "MINIMIZE " : ""),
+ (functions & GDK_FUNC_MAXIMIZE ? "MAXIMIZE " : ""),
+ (functions & GDK_FUNC_CLOSE ? "CLOSE " : "")));
+
style = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE);
- exstyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE);
style &= (WS_OVERLAPPED|WS_POPUP|WS_CHILD|WS_MINIMIZE|WS_VISIBLE|WS_DISABLED
|WS_CLIPSIBLINGS|WS_CLIPCHILDREN|WS_MAXIMIZE|WS_CAPTION|WS_BORDER
|WS_SYSMENU);
- exstyle &= (WS_EX_TOPMOST|WS_EX_TRANSPARENT);
-
if (functions & GDK_FUNC_ALL)
style |= (WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX);
if (functions & GDK_FUNC_RESIZE)
@@ -2160,19 +2176,15 @@ gdk_window_set_functions (GdkWindow *window,
style |= (WS_MAXIMIZEBOX);
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE, style);
+ SetWindowPos (GDK_WINDOW_HWND (window), NULL, 0, 0, 0, 0,
+ SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE |
+ SWP_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER);
}
-/*
- * propagate the shapes from all child windows of a GDK window to the parent
- * window. Shamelessly ripped from Enlightenment's code
- *
- * - Raster
- */
-
static void
-QueryTree (HWND hwnd,
+QueryTree (HWND hwnd,
HWND **children,
- gint *nchildren)
+ gint *nchildren)
{
guint i, n;
HWND child;
@@ -2533,7 +2545,7 @@ gdk_window_set_modal_hint (GdkWindow *window,
if (GDK_WINDOW_IS_MAPPED (window))
if (!SetWindowPos (GDK_WINDOW_HWND (window), HWND_TOPMOST,
- 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE))
+ 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE))
WIN32_API_FAILED ("SetWindowPos");
}