diff --git a/lib/platform/CXWindowsSecondaryScreen.cpp b/lib/platform/CXWindowsSecondaryScreen.cpp index 3f7ed996..9eb93af8 100644 --- a/lib/platform/CXWindowsSecondaryScreen.cpp +++ b/lib/platform/CXWindowsSecondaryScreen.cpp @@ -378,6 +378,15 @@ CXWindowsSecondaryScreen::onPostOpen() XGetKeyboardControl(display, &m_keyControl); } +void +CXWindowsSecondaryScreen::onPreClose() +{ + if (m_keyControl.global_auto_repeat == AutoRepeatModeOn) { + CDisplayLock display(m_screen); + XAutoRepeatOn(display); + } +} + void CXWindowsSecondaryScreen::onPreEnter() { diff --git a/lib/platform/CXWindowsSecondaryScreen.h b/lib/platform/CXWindowsSecondaryScreen.h index fd535c8c..f44a12ed 100644 --- a/lib/platform/CXWindowsSecondaryScreen.h +++ b/lib/platform/CXWindowsSecondaryScreen.h @@ -61,6 +61,7 @@ protected: virtual void onPreMainLoop(); virtual void onPreOpen(); virtual void onPostOpen(); + virtual void onPreClose(); virtual void onPreEnter(); virtual void onPostEnter(); virtual void onPreLeave();