Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_System.cpp
| Show First 20 Lines • Show All 183 Lines • ▼ Show 20 Lines | if (m_windowManager) { | ||||
| fullScreen = m_windowManager->getFullScreen(); | fullScreen = m_windowManager->getFullScreen(); | ||||
| } | } | ||||
| else { | else { | ||||
| fullScreen = false; | fullScreen = false; | ||||
| } | } | ||||
| return fullScreen; | return fullScreen; | ||||
| } | } | ||||
| GHOST_IWindow *GHOST_System::getWindowUnderCursor(int32_t x, int32_t y) | |||||
| { | |||||
| /* TODO: This solution should follow the order of the activated windows (Z-order). | |||||
| * It is imperfect but usable in most cases. */ | |||||
| for (GHOST_IWindow *iwindow : m_windowManager->getWindows()) { | |||||
| if (iwindow->getState() == GHOST_kWindowStateMinimized) { | |||||
| continue; | |||||
| } | |||||
| GHOST_Rect bounds; | |||||
| iwindow->getClientBounds(bounds); | |||||
| if (bounds.isInside(x, y)) { | |||||
| return iwindow; | |||||
| } | |||||
| } | |||||
| return NULL; | |||||
| } | |||||
| void GHOST_System::dispatchEvents() | void GHOST_System::dispatchEvents() | ||||
| { | { | ||||
| #ifdef WITH_INPUT_NDOF | #ifdef WITH_INPUT_NDOF | ||||
| /* NDOF Motion event is sent only once per dispatch, so do it now: */ | /* NDOF Motion event is sent only once per dispatch, so do it now: */ | ||||
| if (m_ndofManager) { | if (m_ndofManager) { | ||||
| m_ndofManager->sendMotionEvent(); | m_ndofManager->sendMotionEvent(); | ||||
| } | } | ||||
| #endif | #endif | ||||
| ▲ Show 20 Lines • Show All 183 Lines • Show Last 20 Lines | |||||