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, | |||||
| const GHOST_IWindow *below_window) | |||||
| { | |||||
| for (GHOST_IWindow *iwindow : m_windowManager->getWindows()) { | |||||
| /* TODO: This should follow the order of the activated windows (Z-order). | |||||
| * This solution is imperfect but usable in most cases. */ | |||||
| if (iwindow == below_window) { | |||||
| continue; | |||||
| } | |||||
| if (iwindow->getState() == GHOST_kWindowStateMinimized) { | |||||
| continue; | |||||
| } | |||||
| GHOST_Rect wBnds; | |||||
| iwindow->getWindowBounds(wBnds); | |||||
| if (wBnds.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 | |||||