X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/67bd5bad041419c4714d09749737d5ea9876a47d..f4929e864e91a1f9118f2ce946f354b7681b2505:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 4a6d863b2d..f58179b4c3 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1470,7 +1470,7 @@ bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y) ::ClientToScreen(hWnd, &point); wxCurrentPopupMenu = menu; ::TrackPopupMenu(hMenu, TPM_RIGHTBUTTON, point.x, point.y, 0, hWnd, NULL); - wxYield(); + wxYieldIfNeeded(); wxCurrentPopupMenu = NULL; menu->SetInvokingWindow(NULL); @@ -2360,10 +2360,14 @@ bool wxWindow::MSWCreate(int id, height1 = parent_rect.bottom - parent_rect.top; } - if ( x > -1 ) x1 = x; - if ( y > -1 ) y1 = y; - if ( width > -1 ) width1 = width; - if ( height > -1 ) height1 = height; + if ( x != -1 ) + x1 = x; + if ( y != -1 ) + y1 = y; + if ( width != -1 ) + width1 = width; + if ( height != -1 ) + height1 = height; // unfortunately, setting WS_EX_CONTROLPARENT only for some windows in the // hierarchy with several embedded panels (and not all of them) causes the