X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3fa2676fc3a926e89f0093b88f1983b638c96f43..c7b2e4941fdf9842e17d2d375474e0846d0a1abe:/src/mgl/window.cpp?ds=sidebyside diff --git a/src/mgl/window.cpp b/src/mgl/window.cpp index d4fc3b24e5..2c2fec1ed3 100644 --- a/src/mgl/window.cpp +++ b/src/mgl/window.cpp @@ -73,6 +73,8 @@ static wxWindowMGL *gs_mouseCapture = NULL; // the frame that is currently active (i.e. its child has focus). It is // used to generate wxActivateEvents static wxWindowMGL *gs_activeFrame = NULL; +// track the mouse button state for wxGetMouseState() +unsigned long g_buttonState = 0; // --------------------------------------------------------------------------- // constants @@ -151,6 +153,8 @@ static ibool MGLAPI wxWindowMouseHandler(window_t *wnd, event_t *e) wxPoint orig(win->GetClientAreaOrigin()); wxPoint where; + g_buttonState = e->modifiers; + MGL_wmCoordGlobalToLocal(win->GetHandle(), e->where_x, e->where_y, &where.x, &where.y); @@ -1153,7 +1157,7 @@ void wxWindowMGL::HandlePaint(MGLDevCtx *dc) { dc->setColorRGB(255,0,255); dc->fillRect(-1000,-1000,2000,2000); - wxUsleep(50); + wxMilliSleep(50); } #endif