///////////////////////////////////////////////////////
| 238 | |
| 239 | //////////////////////////////////////////////////////////// |
| 240 | void WindowImplAndroid::forwardEvent(const Event& event) |
| 241 | { |
| 242 | if (WindowImplAndroid::singleInstance != nullptr) |
| 243 | { |
| 244 | const ActivityStates& states = getActivity(); |
| 245 | |
| 246 | if (event.is<Event::FocusGained>()) |
| 247 | { |
| 248 | WindowImplAndroid::singleInstance->m_size = Vector2u( |
| 249 | Vector2i(ANativeWindow_getWidth(states.window), ANativeWindow_getHeight(states.window))); |
| 250 | WindowImplAndroid::singleInstance->m_windowBeingCreated = true; |
| 251 | WindowImplAndroid::singleInstance->m_hasFocus = true; |
| 252 | } |
| 253 | else if (event.is<Event::FocusLost>()) |
| 254 | { |
| 255 | WindowImplAndroid::singleInstance->m_windowBeingDestroyed = true; |
| 256 | WindowImplAndroid::singleInstance->m_hasFocus = false; |
| 257 | } |
| 258 | |
| 259 | WindowImplAndroid::singleInstance->pushEvent(event); |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | |
| 264 | //////////////////////////////////////////////////////////// |
no test coverage detected