Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-08-26 15:24:08 +0300
committerCampbell Barton <campbell@blender.org>2022-08-27 00:36:00 +0300
commit37d835f0bca28a7cbf577385d9828636e7811cc5 (patch)
treeca9ab4d2abcd5e22cb9148b30d7016ebb66175d6 /intern/ghost/intern/GHOST_SystemWin32.h
parent07ccb9b5735ce7a12e40c1243032e18d8ed42737 (diff)
Fix T100582: Windows-10 Switching Desktops locks Ctrl Key
Regression in recent fix for T66088 [0]. caused by much older problem introduced with [1] & [2]. Unlike other platforms, as of [1] GHOST/Win32 was keeping track of the pressed modifier keys. Since GHOST/Win32 cleared the modifier state on window activation [2] and only changes to modifier state would generate key events, activating the window and releasing the modifier would not send the release event. Resolve this by removing the stored modifier state from GHOST/Win32, always passing modifier press/release events through to Blender (matching other GHOST back-ends). Instead, use key-repeat detection to prevent repeated modifier keys from being generated - an alternate solution to T26446. [0]: 8bc76bf4b957c51ddc5a13c6305f05c64b218a27 [1]: d6b43fed313b60bb6a269680b3c5622955b8a690 [2]: 6b987910e43ff5f91512a3c361ea3141590d4e45
Diffstat (limited to 'intern/ghost/intern/GHOST_SystemWin32.h')
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.h27
1 files changed, 1 insertions, 26 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.h b/intern/ghost/intern/GHOST_SystemWin32.h
index b40f5e3fd75..c9de3b22d54 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.h
+++ b/intern/ghost/intern/GHOST_SystemWin32.h
@@ -299,7 +299,7 @@ class GHOST_SystemWin32 : public GHOST_System {
* \param vk: Pointer to virtual key.
* \return The GHOST key (GHOST_kKeyUnknown if no match).
*/
- GHOST_TKey hardKey(RAWINPUT const &raw, bool *r_keyDown, bool *r_is_repeated_modifier);
+ GHOST_TKey hardKey(RAWINPUT const &raw, bool *r_keyDown);
/**
* Creates mouse button event.
@@ -417,19 +417,6 @@ class GHOST_SystemWin32 : public GHOST_System {
void processTrackpad();
/**
- * Returns the local state of the modifier keys (from the message queue).
- * \param keys: The state of the keys.
- */
- inline void retrieveModifierKeys(GHOST_ModifierKeys &keys) const;
-
- /**
- * Stores the state of the modifier keys locally.
- * For internal use only!
- * param keys The new state of the modifier keys.
- */
- inline void storeModifierKeys(const GHOST_ModifierKeys &keys);
-
- /**
* Check current key layout for AltGr
*/
inline void handleKeyboardChange(void);
@@ -446,8 +433,6 @@ class GHOST_SystemWin32 : public GHOST_System {
*/
int setConsoleWindowState(GHOST_TConsoleWindowState action);
- /** The current state of the modifier keys. */
- GHOST_ModifierKeys m_modifierKeys;
/** The virtual-key code (VKey) of the last press event. Used to detect repeat events. */
unsigned short m_keycode_last_repeat_key;
/** State variable set at initialization. */
@@ -472,16 +457,6 @@ class GHOST_SystemWin32 : public GHOST_System {
int m_wheelDeltaAccum;
};
-inline void GHOST_SystemWin32::retrieveModifierKeys(GHOST_ModifierKeys &keys) const
-{
- keys = m_modifierKeys;
-}
-
-inline void GHOST_SystemWin32::storeModifierKeys(const GHOST_ModifierKeys &keys)
-{
- m_modifierKeys = keys;
-}
-
inline void GHOST_SystemWin32::handleKeyboardChange(void)
{
m_keylayout = GetKeyboardLayout(0); // get keylayout for current thread