X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0cbc5287be2ff31581757553db319475ff6f515b..4fe0156b18e2330be391b804da341e546164b85f:/src/motif/window.cpp diff --git a/src/motif/window.cpp b/src/motif/window.cpp index 9da919ca55..5f84cf1442 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/motif/windows.cpp +// Name: src/motif/window.cpp // Purpose: wxWindow // Author: Julian Smart // Modified by: @@ -39,10 +39,10 @@ #include "wx/settings.h" #include "wx/scrolwin.h" #include "wx/layout.h" + #include "wx/menuitem.h" + #include "wx/module.h" #endif -#include "wx/module.h" -#include "wx/menuitem.h" #include "wx/evtloop.h" #if wxUSE_DRAG_AND_DROP @@ -65,7 +65,7 @@ // 2) call DoMoveWindow from DoSetSize, allowing controls to override it #ifdef __VMS__ -#pragma message disable nosimpint + #pragma message disable nosimpint #endif #include @@ -76,7 +76,7 @@ #include #include // for XmMenuPosition #ifdef __VMS__ -#pragma message enable nosimpint + #pragma message enable nosimpint #endif #include "wx/motif/private.h" @@ -1259,10 +1259,10 @@ void wxWindow::DoSetSizeIntr(int x, int y, int width, int height, if ( !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE) ) { - if ( x == -1 ) - x = oldX; - if ( y == -1 ) - y = oldY; + if ( width == -1 ) + width = oldW; + if ( height == -1 ) + height = oldH; } wxSize size(wxDefaultSize); @@ -1299,10 +1299,10 @@ void wxWindow::DoSetSizeIntr(int x, int y, int width, int height, { int flags = 0; - if (x > -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) + if (x != oldX) flags |= wxMOVE_X; - if (y > -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) + if (y != oldY) flags |= wxMOVE_Y; if (width > 0) @@ -1429,8 +1429,6 @@ void wxWindow::DoMoveWindowIntr(int xx, int yy, int w, int h, } else { - if( xx < 0 ) xx = 0; - if( yy < 0 ) yy = 0; if( w < 1 ) w = 1; if( h < 1 ) h = 1; @@ -2567,8 +2565,8 @@ wxMouseState wxGetMouseState() ms.SetControlDown(mask & ControlMask); ms.SetShiftDown(mask & ShiftMask); - ms.SetAltDown(mask & Mod1Mask); - ms.SetMetaDown(mask & Mod2Mask); + ms.SetAltDown(mask & Mod3Mask); + ms.SetMetaDown(mask & Mod1Mask); return ms; }