From: Robin Dunn Date: Fri, 19 Sep 2003 22:32:24 +0000 (+0000) Subject: Check wxSIZE_ALLOW_MINUS_ONE for x and y too. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/443c834d8d40068cd6ede099ea4d68d622a606b6 Check wxSIZE_ALLOW_MINUS_ONE for x and y too. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23730 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 01b6002214..9ad817a824 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -2883,9 +2883,9 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags int currentX, currentY; GetPosition(¤tX, ¤tY); - if (x == -1) + if (x == -1 && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) x = currentX; - if (y == -1) + if (y == -1 && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) y = currentY; AdjustForParentClientOrigin(x, y, sizeFlags); diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 01b6002214..9ad817a824 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -2883,9 +2883,9 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags int currentX, currentY; GetPosition(¤tX, ¤tY); - if (x == -1) + if (x == -1 && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) x = currentX; - if (y == -1) + if (y == -1 && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) y = currentY; AdjustForParentClientOrigin(x, y, sizeFlags);