mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 03:37:59 +01:00
Change declaration order of delay thread member in KeyDelay (#7206)
This commit is contained in:
@@ -63,7 +63,6 @@ private:
|
||||
// Also checks for overflow conditions.
|
||||
bool CheckIfMillisHaveElapsed(DWORD64 first, DWORD64 last, DWORD64 duration);
|
||||
|
||||
std::thread _delayThread;
|
||||
bool _quit;
|
||||
KeyDelayState _state;
|
||||
|
||||
@@ -86,6 +85,9 @@ private:
|
||||
// Virtual Key provided in the constructor. Passed to callback functions.
|
||||
DWORD _key;
|
||||
|
||||
// Declare _delayThread after all other members so that it is the last to be initialized by the constructor
|
||||
std::thread _delayThread;
|
||||
|
||||
static const DWORD64 LONG_PRESS_DELAY_MILLIS = 900;
|
||||
static const DWORD64 ON_HOLD_WAIT_TIMEOUT_MILLIS = 50;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user