X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/127eab18f80e5b298b8c0326609ed811035e6829..3c31306c74e878e6888b6c73a44a337516717d73:/src/mgl/window.cpp?ds=sidebyside diff --git a/src/mgl/window.cpp b/src/mgl/window.cpp index 9d0595d88d..55810916b4 100644 --- a/src/mgl/window.cpp +++ b/src/mgl/window.cpp @@ -27,7 +27,6 @@ #include "wx/window.h" #include "wx/msgdlg.h" #include "wx/accel.h" - #include "wx/setup.h" #include "wx/dc.h" #include "wx/dcclient.h" #include "wx/utils.h" @@ -167,13 +166,13 @@ static ibool MGLAPI wxWindowMouseHandler(window_t *wnd, event_t *e) event.SetTimestamp(e->when); event.m_x = where.x - orig.x; event.m_y = where.y - orig.y; - event.m_shiftDown = ( e->modifiers & EVT_SHIFTKEY ) == EVT_SHIFTKEY; - event.m_controlDown = ( e->modifiers & EVT_CTRLSTATE ) == EVT_CTRLSTATE; - event.m_altDown = ( e->modifiers & EVT_LEFTALT ) == EVT_LEFTALT; - event.m_metaDown = ( e->modifiers & EVT_RIGHTALT ) == EVT_RIGHTALT; - event.m_leftDown = ( e->modifiers & EVT_LEFTBUT ) == EVT_LEFTBUT; - event.m_middleDown = ( e->modifiers & EVT_MIDDLEBUT ) == EVT_MIDDLEBUT; - event.m_rightDown = ( e->modifiers & EVT_RIGHTBUT ) == EVT_RIGHTBUT; + event.m_shiftDown = ( e->modifiers & EVT_SHIFTKEY ) != 0; + event.m_controlDown = ( e->modifiers & EVT_CTRLSTATE ) != 0; + event.m_altDown = ( e->modifiers & EVT_LEFTALT ) != 0; + event.m_metaDown = ( e->modifiers & EVT_RIGHTALT ) != 0; + event.m_leftDown = ( e->modifiers & EVT_LEFTBUT ) != 0; + event.m_middleDown = ( e->modifiers & EVT_MIDDLEBUT ) != 0; + event.m_rightDown = ( e->modifiers & EVT_RIGHTBUT ) != 0; switch (e->what) { @@ -458,10 +457,10 @@ static ibool MGLAPI wxWindowKeybHandler(window_t *wnd, event_t *e) event.m_scanCode = 0; // not used by wx at all event.m_x = where.x; event.m_y = where.y; - event.m_shiftDown = ( e->modifiers & EVT_SHIFTKEY ) == EVT_SHIFTKEY; - event.m_controlDown = ( e->modifiers & EVT_CTRLSTATE ) == EVT_CTRLSTATE; - event.m_altDown = ( e->modifiers & EVT_LEFTALT ) == EVT_LEFTALT; - event.m_metaDown = ( e->modifiers & EVT_RIGHTALT ) == EVT_RIGHTALT; + event.m_shiftDown = ( e->modifiers & EVT_SHIFTKEY ) != 0; + event.m_controlDown = ( e->modifiers & EVT_CTRLSTATE ) != 0; + event.m_altDown = ( e->modifiers & EVT_LEFTALT ) != 0; + event.m_metaDown = ( e->modifiers & EVT_RIGHTALT ) != 0; if ( e->what == EVT_KEYUP ) {