[gtk+] win32: Never pass SWP_NOSIZE or SWP_NOMOVE to SetWindowPos
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] win32: Never pass SWP_NOSIZE or SWP_NOMOVE to SetWindowPos
- Date: Thu, 10 Nov 2011 16:46:32 +0000 (UTC)
commit 7445a59a9a994720b94a746cf410deb96d3e34ab
Author: Neil Roberts <neil linux intel com>
Date: Thu Aug 26 19:02:00 2010 +0100
win32: Never pass SWP_NOSIZE or SWP_NOMOVE to SetWindowPos
In _gdk_window_move_resize_child it tries to decide whether to pass
SWP_NOSIZE and SWP_NOMOVE based on whether the new size and position
is different from the window's existing position. However it seems
that GDK now ends up updating the window's position before calling
_gdk_window_move_resize_child so this would mean it would think the
window never changes size or position so SWP_NOSIZE|SWP_NOMOVE would
always be set. This causes child windows to never be resized.
This patch changes it so that it never passes either flag to
SetWindowPos. I don't know whether this will cause any side effects
but you'd think it shouldn't do any harm to reassert the current size.
https://bugzilla.gnome.org/show_bug.cgi?id=628049
Signed-off-by: Hans Breuer <hans breuer org>
gdk/win32/gdkgeometry-win32.c | 15 +++------------
1 files changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/gdk/win32/gdkgeometry-win32.c b/gdk/win32/gdkgeometry-win32.c
index c169208..10b9871 100644
--- a/gdk/win32/gdkgeometry-win32.c
+++ b/gdk/win32/gdkgeometry-win32.c
@@ -59,17 +59,12 @@ _gdk_window_move_resize_child (GdkWindow *window,
gint height)
{
GdkWindowImplWin32 *impl;
- gboolean is_move;
- gboolean is_resize;
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
- is_move = (x - window->x != 0) && (y - window->y != 0);
- is_resize = window->width != width && window->height != height;
-
GDK_NOTE (MISC, g_print ("_gdk_window_move_resize_child: %s %+d%+d %dx%d %+d%+d\n",
_gdk_win32_window_description (window),
window->x, window->y, width, height, x, y));
@@ -93,19 +88,15 @@ _gdk_window_move_resize_child (GdkWindow *window,
_gdk_win32_window_tmp_unset_bg (window, TRUE);
GDK_NOTE (MISC, g_print ("... SetWindowPos(%p,NULL,%d,%d,%d,%d,"
- "NOACTIVATE|NOZORDER%s%s)\n",
+ "NOACTIVATE|NOZORDER)\n",
GDK_WINDOW_HWND (window),
window->x + window->parent->abs_x, window->y + window->parent->abs_y,
- width, height,
- (is_move ? "" : "|NOMOVE"),
- (is_resize ? "" : "|NOSIZE")));
+ width, height));
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
window->x + window->parent->abs_x, window->y + window->parent->abs_y,
width, height,
- SWP_NOACTIVATE | SWP_NOZORDER |
- (is_move ? 0 : SWP_NOMOVE) |
- (is_resize ? 0 : SWP_NOSIZE)));
+ SWP_NOACTIVATE | SWP_NOZORDER));
_gdk_win32_window_tmp_reset_bg (window, TRUE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]