fix: Invert noHooks to useHooks to match new config
This commit is contained in:
parent
497813e198
commit
3ece50e292
5 changed files with 14 additions and 14 deletions
|
|
@ -56,7 +56,7 @@ struct CoreArgs
|
||||||
);
|
);
|
||||||
|
|
||||||
inline static const auto useHooksOption =
|
inline static const auto useHooksOption =
|
||||||
QCommandLineOption("useHooks", "Sets if hooks are used for windows desks", "value");
|
QCommandLineOption("useHooks", "Sets if hooks are used on Windows", "value");
|
||||||
|
|
||||||
// Server Options
|
// Server Options
|
||||||
inline static const auto peerCheckOption = QCommandLineOption(
|
inline static const auto peerCheckOption = QCommandLineOption(
|
||||||
|
|
|
||||||
|
|
@ -106,10 +106,10 @@ static void send_mouse_input(DWORD dwFlags, DWORD dx, DWORD dy, DWORD dwData)
|
||||||
//
|
//
|
||||||
|
|
||||||
MSWindowsDesks::MSWindowsDesks(
|
MSWindowsDesks::MSWindowsDesks(
|
||||||
bool isPrimary, bool noHooks, const IScreenSaver *screensaver, IEventQueue *events, IJob *updateKeys
|
bool isPrimary, bool useHooks, const IScreenSaver *screensaver, IEventQueue *events, IJob *updateKeys
|
||||||
)
|
)
|
||||||
: m_isPrimary(isPrimary),
|
: m_isPrimary(isPrimary),
|
||||||
m_noHooks(noHooks),
|
m_useHooks(useHooks),
|
||||||
m_isOnScreen(m_isPrimary),
|
m_isOnScreen(m_isPrimary),
|
||||||
m_screensaver(screensaver),
|
m_screensaver(screensaver),
|
||||||
m_deskReady(&m_mutex, false),
|
m_deskReady(&m_mutex, false),
|
||||||
|
|
@ -633,7 +633,7 @@ void MSWindowsDesks::deskThread(void *vdesk)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case DESKFLOW_MSG_SWITCH:
|
case DESKFLOW_MSG_SWITCH:
|
||||||
if (!m_noHooks) {
|
if (m_useHooks) {
|
||||||
MSWindowsHook::uninstall();
|
MSWindowsHook::uninstall();
|
||||||
if (m_screensaverNotify) {
|
if (m_screensaverNotify) {
|
||||||
MSWindowsHook::uninstallScreenSaver();
|
MSWindowsHook::uninstallScreenSaver();
|
||||||
|
|
@ -712,7 +712,7 @@ void MSWindowsDesks::deskThread(void *vdesk)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DESKFLOW_MSG_SCREENSAVER:
|
case DESKFLOW_MSG_SCREENSAVER:
|
||||||
if (!m_noHooks) {
|
if (m_useHooks) {
|
||||||
if (msg.wParam != 0) {
|
if (msg.wParam != 0) {
|
||||||
MSWindowsHook::installScreenSaver();
|
MSWindowsHook::installScreenSaver();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ public:
|
||||||
updated in a thread attached to the current desk.
|
updated in a thread attached to the current desk.
|
||||||
\p hookLibrary must be a handle to the hook library.
|
\p hookLibrary must be a handle to the hook library.
|
||||||
*/
|
*/
|
||||||
MSWindowsDesks(bool isPrimary, bool noHooks, const IScreenSaver *screensaver, IEventQueue *events, IJob *updateKeys);
|
MSWindowsDesks(bool isPrimary, bool useHooks, const IScreenSaver *screensaver, IEventQueue *events, IJob *updateKeys);
|
||||||
~MSWindowsDesks();
|
~MSWindowsDesks();
|
||||||
|
|
||||||
//! @name manipulators
|
//! @name manipulators
|
||||||
|
|
@ -232,8 +232,8 @@ private:
|
||||||
// true if screen is being used as a primary screen, false otherwise
|
// true if screen is being used as a primary screen, false otherwise
|
||||||
bool m_isPrimary;
|
bool m_isPrimary;
|
||||||
|
|
||||||
// true if hooks are not to be installed (useful for debugging)
|
// true if hooks are to be installed (when debugging, it can be useful to disable hooks)
|
||||||
bool m_noHooks;
|
bool m_useHooks;
|
||||||
|
|
||||||
// true if mouse has entered the screen
|
// true if mouse has entered the screen
|
||||||
bool m_isOnScreen;
|
bool m_isOnScreen;
|
||||||
|
|
|
||||||
|
|
@ -80,11 +80,11 @@ HINSTANCE MSWindowsScreen::s_windowInstance = nullptr;
|
||||||
MSWindowsScreen *MSWindowsScreen::s_screen = nullptr;
|
MSWindowsScreen *MSWindowsScreen::s_screen = nullptr;
|
||||||
|
|
||||||
MSWindowsScreen::MSWindowsScreen(
|
MSWindowsScreen::MSWindowsScreen(
|
||||||
bool isPrimary, bool noHooks, IEventQueue *events, bool enableLangSync, bool invertScrolling
|
bool isPrimary, bool useHooks, IEventQueue *events, bool enableLangSync, bool invertScrolling
|
||||||
)
|
)
|
||||||
: PlatformScreen(events, invertScrolling),
|
: PlatformScreen(events, invertScrolling),
|
||||||
m_isPrimary(isPrimary),
|
m_isPrimary(isPrimary),
|
||||||
m_noHooks(noHooks),
|
m_useHooks(useHooks),
|
||||||
m_isOnScreen(m_isPrimary),
|
m_isOnScreen(m_isPrimary),
|
||||||
m_hasMouse(GetSystemMetrics(SM_MOUSEPRESENT) != 0),
|
m_hasMouse(GetSystemMetrics(SM_MOUSEPRESENT) != 0),
|
||||||
m_events(events)
|
m_events(events)
|
||||||
|
|
@ -96,13 +96,13 @@ MSWindowsScreen::MSWindowsScreen(
|
||||||
|
|
||||||
s_screen = this;
|
s_screen = this;
|
||||||
try {
|
try {
|
||||||
if (m_isPrimary && !m_noHooks) {
|
if (m_isPrimary && m_useHooks) {
|
||||||
m_hook.loadLibrary();
|
m_hook.loadLibrary();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_screensaver = new MSWindowsScreenSaver();
|
m_screensaver = new MSWindowsScreenSaver();
|
||||||
m_desks = new MSWindowsDesks(
|
m_desks = new MSWindowsDesks(
|
||||||
m_isPrimary, m_noHooks, m_screensaver, m_events,
|
m_isPrimary, m_useHooks, m_screensaver, m_events,
|
||||||
new TMethodJob<MSWindowsScreen>(this, &MSWindowsScreen::updateKeysCB)
|
new TMethodJob<MSWindowsScreen>(this, &MSWindowsScreen::updateKeysCB)
|
||||||
);
|
);
|
||||||
m_keyState = new MSWindowsKeyState(
|
m_keyState = new MSWindowsKeyState(
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class MSWindowsScreen : public PlatformScreen
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MSWindowsScreen(
|
MSWindowsScreen(
|
||||||
bool isPrimary, bool noHooks, IEventQueue *events, bool enableLangSync = false, bool invetScrolling = false
|
bool isPrimary, bool useHooks, IEventQueue *events, bool enableLangSync = false, bool invetScrolling = false
|
||||||
);
|
);
|
||||||
~MSWindowsScreen() override;
|
~MSWindowsScreen() override;
|
||||||
|
|
||||||
|
|
@ -253,7 +253,7 @@ private:
|
||||||
bool m_isPrimary;
|
bool m_isPrimary;
|
||||||
|
|
||||||
// true if hooks are not to be installed (useful for debugging)
|
// true if hooks are not to be installed (useful for debugging)
|
||||||
bool m_noHooks;
|
bool m_useHooks;
|
||||||
|
|
||||||
// true if mouse has entered the screen
|
// true if mouse has entered the screen
|
||||||
bool m_isOnScreen;
|
bool m_isOnScreen;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue