chore: MSWindows only items initilize members in header
This commit is contained in:
parent
3eb3969a01
commit
9eabbb690c
6 changed files with 43 additions and 81 deletions
|
|
@ -112,19 +112,7 @@ MSWindowsDesks::MSWindowsDesks(
|
||||||
: m_isPrimary(isPrimary),
|
: m_isPrimary(isPrimary),
|
||||||
m_noHooks(noHooks),
|
m_noHooks(noHooks),
|
||||||
m_isOnScreen(m_isPrimary),
|
m_isOnScreen(m_isPrimary),
|
||||||
m_x(0),
|
|
||||||
m_y(0),
|
|
||||||
m_w(0),
|
|
||||||
m_h(0),
|
|
||||||
m_xCenter(0),
|
|
||||||
m_yCenter(0),
|
|
||||||
m_multimon(false),
|
|
||||||
m_timer(nullptr),
|
|
||||||
m_screensaver(screensaver),
|
m_screensaver(screensaver),
|
||||||
m_screensaverNotify(false),
|
|
||||||
m_activeDesk(nullptr),
|
|
||||||
m_activeDeskName(),
|
|
||||||
m_mutex(),
|
|
||||||
m_deskReady(&m_mutex, false),
|
m_deskReady(&m_mutex, false),
|
||||||
m_updateKeys(updateKeys),
|
m_updateKeys(updateKeys),
|
||||||
m_events(events)
|
m_events(events)
|
||||||
|
|
|
||||||
|
|
@ -243,23 +243,26 @@ private:
|
||||||
HCURSOR m_cursor;
|
HCURSOR m_cursor;
|
||||||
|
|
||||||
// screen shape stuff
|
// screen shape stuff
|
||||||
int32_t m_x, m_y;
|
int32_t m_x = 0;
|
||||||
int32_t m_w, m_h;
|
int32_t m_y = 9;
|
||||||
int32_t m_xCenter, m_yCenter;
|
int32_t m_w = 0;
|
||||||
|
int32_t m_h = 0;
|
||||||
|
int32_t m_xCenter = 0;
|
||||||
|
int32_t m_yCenter = 0;
|
||||||
|
|
||||||
// true if system appears to have multiple monitors
|
// true if system appears to have multiple monitors
|
||||||
bool m_multimon;
|
bool m_multimon = false;
|
||||||
|
|
||||||
// the timer used to check for desktop switching
|
// the timer used to check for desktop switching
|
||||||
EventQueueTimer *m_timer;
|
EventQueueTimer *m_timer = nullptr;
|
||||||
|
|
||||||
// screen saver stuff
|
// screen saver stuff
|
||||||
DWORD m_threadID;
|
DWORD m_threadID;
|
||||||
const IScreenSaver *m_screensaver;
|
const IScreenSaver *m_screensaver;
|
||||||
bool m_screensaverNotify;
|
bool m_screensaverNotify = false;
|
||||||
|
|
||||||
// the current desk and it's name
|
// the current desk and it's name
|
||||||
Desk *m_activeDesk;
|
Desk *m_activeDesk = nullptr;
|
||||||
std::string m_activeDeskName;
|
std::string m_activeDeskName;
|
||||||
|
|
||||||
// one desk per desktop and a cond var to communicate with it
|
// one desk per desktop and a cond var to communicate with it
|
||||||
|
|
|
||||||
|
|
@ -88,31 +88,7 @@ MSWindowsScreen::MSWindowsScreen(
|
||||||
m_isPrimary(isPrimary),
|
m_isPrimary(isPrimary),
|
||||||
m_noHooks(noHooks),
|
m_noHooks(noHooks),
|
||||||
m_isOnScreen(m_isPrimary),
|
m_isOnScreen(m_isPrimary),
|
||||||
m_class(0),
|
|
||||||
m_x(0),
|
|
||||||
m_y(0),
|
|
||||||
m_w(0),
|
|
||||||
m_h(0),
|
|
||||||
m_xCenter(0),
|
|
||||||
m_yCenter(0),
|
|
||||||
m_multimon(false),
|
|
||||||
m_xCursor(0),
|
|
||||||
m_yCursor(0),
|
|
||||||
m_sequenceNumber(0),
|
|
||||||
m_mark(0),
|
|
||||||
m_markReceived(0),
|
|
||||||
m_fixTimer(nullptr),
|
|
||||||
m_keyLayout(nullptr),
|
|
||||||
m_screensaver(nullptr),
|
|
||||||
m_screensaverNotify(false),
|
|
||||||
m_screensaverActive(false),
|
|
||||||
m_window(nullptr),
|
|
||||||
m_clipboardSequenceNumber(0),
|
|
||||||
m_ownClipboard(false),
|
|
||||||
m_desks(nullptr),
|
|
||||||
m_keyState(nullptr),
|
|
||||||
m_hasMouse(GetSystemMetrics(SM_MOUSEPRESENT) != 0),
|
m_hasMouse(GetSystemMetrics(SM_MOUSEPRESENT) != 0),
|
||||||
m_showingMouse(false),
|
|
||||||
m_events(events)
|
m_events(events)
|
||||||
{
|
{
|
||||||
assert(s_windowInstance != nullptr);
|
assert(s_windowInstance != nullptr);
|
||||||
|
|
|
||||||
|
|
@ -259,51 +259,55 @@ private:
|
||||||
bool m_isOnScreen;
|
bool m_isOnScreen;
|
||||||
|
|
||||||
// our resources
|
// our resources
|
||||||
ATOM m_class;
|
ATOM m_class = 0;
|
||||||
|
|
||||||
// screen shape stuff
|
// screen shape stuff
|
||||||
int32_t m_x, m_y;
|
int32_t m_x = 0;
|
||||||
int32_t m_w, m_h;
|
int32_t m_y = 0;
|
||||||
int32_t m_xCenter, m_yCenter;
|
int32_t m_w = 0;
|
||||||
|
int32_t m_h = 0;
|
||||||
|
int32_t m_xCenter = 0;
|
||||||
|
int32_t m_yCenter = 0;
|
||||||
|
|
||||||
// true if system appears to have multiple monitors
|
// true if system appears to have multiple monitors
|
||||||
bool m_multimon;
|
bool m_multimon = false;
|
||||||
|
|
||||||
// last mouse position
|
// last mouse position
|
||||||
int32_t m_xCursor, m_yCursor;
|
int32_t m_xCursor = 0;
|
||||||
|
int32_t m_yCursor = 0;
|
||||||
|
|
||||||
// last clipboard
|
// last clipboard
|
||||||
uint32_t m_sequenceNumber;
|
uint32_t m_sequenceNumber = 0;
|
||||||
|
|
||||||
// used to discard queued messages that are no longer needed
|
// used to discard queued messages that are no longer needed
|
||||||
uint32_t m_mark;
|
uint32_t m_mark = 0;
|
||||||
uint32_t m_markReceived;
|
uint32_t m_markReceived = 0;
|
||||||
|
|
||||||
// the main loop's thread id
|
// the main loop's thread id
|
||||||
DWORD m_threadID;
|
DWORD m_threadID;
|
||||||
|
|
||||||
// timer for periodically checking stuff that requires polling
|
// timer for periodically checking stuff that requires polling
|
||||||
EventQueueTimer *m_fixTimer;
|
EventQueueTimer *m_fixTimer = nullptr;
|
||||||
|
|
||||||
// the keyboard layout to use when off primary screen
|
// the keyboard layout to use when off primary screen
|
||||||
HKL m_keyLayout;
|
HKL m_keyLayout = nullptr;
|
||||||
|
|
||||||
// screen saver stuff
|
// screen saver stuff
|
||||||
MSWindowsScreenSaver *m_screensaver;
|
MSWindowsScreenSaver *m_screensaver = nullptr;
|
||||||
bool m_screensaverNotify;
|
bool m_screensaverNotify = false;
|
||||||
bool m_screensaverActive;
|
bool m_screensaverActive = false;
|
||||||
|
|
||||||
// clipboard stuff. our window is used mainly as a clipboard
|
// clipboard stuff. our window is used mainly as a clipboard
|
||||||
// owner and as a link in the clipboard viewer chain.
|
// owner and as a link in the clipboard viewer chain.
|
||||||
HWND m_window;
|
HWND m_window = nullptr;
|
||||||
DWORD m_clipboardSequenceNumber;
|
DWORD m_clipboardSequenceNumber = 0;
|
||||||
bool m_ownClipboard;
|
bool m_ownClipboard = false;
|
||||||
|
|
||||||
// one desk per desktop and a cond var to communicate with it
|
// one desk per desktop and a cond var to communicate with it
|
||||||
MSWindowsDesks *m_desks;
|
MSWindowsDesks *m_desks = nullptr;
|
||||||
|
|
||||||
// keyboard stuff
|
// keyboard stuff
|
||||||
MSWindowsKeyState *m_keyState;
|
MSWindowsKeyState *m_keyState = nullptr;
|
||||||
|
|
||||||
// hot key stuff
|
// hot key stuff
|
||||||
HotKeyMap m_hotKeys;
|
HotKeyMap m_hotKeys;
|
||||||
|
|
@ -325,7 +329,7 @@ private:
|
||||||
// cursor to be displayed when the user has entered this screen.
|
// cursor to be displayed when the user has entered this screen.
|
||||||
// m_showingMouse is true when we're doing that.
|
// m_showingMouse is true when we're doing that.
|
||||||
bool m_hasMouse;
|
bool m_hasMouse;
|
||||||
bool m_showingMouse;
|
bool m_showingMouse = false;
|
||||||
bool m_gotOldMouseKeys;
|
bool m_gotOldMouseKeys;
|
||||||
MOUSEKEYS m_mouseKeys;
|
MOUSEKEYS m_mouseKeys;
|
||||||
MOUSEKEYS m_oldMouseKeys;
|
MOUSEKEYS m_oldMouseKeys;
|
||||||
|
|
|
||||||
|
|
@ -30,15 +30,6 @@ static const TCHAR *const g_pathScreenSaverIsSecure[] = {"Control Panel", "Deskt
|
||||||
//
|
//
|
||||||
|
|
||||||
MSWindowsScreenSaver::MSWindowsScreenSaver()
|
MSWindowsScreenSaver::MSWindowsScreenSaver()
|
||||||
: m_wasSecure(false),
|
|
||||||
m_wasSecureAnInt(false),
|
|
||||||
m_process(nullptr),
|
|
||||||
m_watch(nullptr),
|
|
||||||
m_threadID(0),
|
|
||||||
m_msg(0),
|
|
||||||
m_wParam(0),
|
|
||||||
m_lParam(0),
|
|
||||||
m_active(false)
|
|
||||||
{
|
{
|
||||||
// check if screen saver is enabled
|
// check if screen saver is enabled
|
||||||
SystemParametersInfo(SPI_GETSCREENSAVEACTIVE, 0, &m_wasEnabled, 0);
|
SystemParametersInfo(SPI_GETSCREENSAVEACTIVE, 0, &m_wasEnabled, 0);
|
||||||
|
|
|
||||||
|
|
@ -63,17 +63,17 @@ private:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BOOL m_wasEnabled;
|
BOOL m_wasEnabled;
|
||||||
bool m_wasSecure;
|
bool m_wasSecure = false;
|
||||||
bool m_wasSecureAnInt;
|
bool m_wasSecureAnInt = false;
|
||||||
|
|
||||||
HANDLE m_process;
|
HANDLE m_process = nullptr;
|
||||||
Thread *m_watch;
|
Thread *m_watch = nullptr;
|
||||||
DWORD m_threadID;
|
DWORD m_threadID = 0;
|
||||||
UINT m_msg;
|
UINT m_msg = 0;
|
||||||
WPARAM m_wParam;
|
WPARAM m_wParam = 0;
|
||||||
LPARAM m_lParam;
|
LPARAM m_lParam = 0;
|
||||||
|
|
||||||
// checkActive state. true if the screen saver is being watched
|
// checkActive state. true if the screen saver is being watched
|
||||||
// for deactivation (and is therefore active).
|
// for deactivation (and is therefore active).
|
||||||
bool m_active;
|
bool m_active = false;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue