Remove legacy Windows code
We have lots of code that deals with Windows versions that we no
longer support anyway. Clean out all of this old cruft.
diff --git a/win/rfb_win32/SDisplay.cxx b/win/rfb_win32/SDisplay.cxx
index d4cedf8..ac64e3e 100644
--- a/win/rfb_win32/SDisplay.cxx
+++ b/win/rfb_win32/SDisplay.cxx
@@ -25,7 +25,6 @@
#include <rfb_win32/TsSessions.h>
#include <rfb_win32/CleanDesktop.h>
#include <rfb_win32/CurrentUser.h>
-#include <rfb_win32/DynamicFn.h>
#include <rfb_win32/MonitorInfo.h>
#include <rfb_win32/SDisplayCorePolling.h>
#include <rfb_win32/SDisplayCoreWMHooks.h>
@@ -51,8 +50,6 @@
"Display device name of the monitor to be remoted, or empty to export the whole desktop.", "");
BoolParameter rfb::win32::SDisplay::removeWallpaper("RemoveWallpaper",
"Remove the desktop wallpaper when the server is in use.", false);
-BoolParameter rfb::win32::SDisplay::removePattern("RemovePattern",
- "Remove the desktop background pattern when the server is in use.", false);
BoolParameter rfb::win32::SDisplay::disableEffects("DisableEffects",
"Disable desktop user interface effects when the server is in use.", false);
@@ -62,9 +59,6 @@
// SDisplay
//
-typedef BOOL (WINAPI *_LockWorkStation_proto)();
-DynamicFn<_LockWorkStation_proto> _LockWorkStation(_T("user32.dll"), "LockWorkStation");
-
// -=- Constructor/Destructor
SDisplay::SDisplay()
@@ -127,10 +121,7 @@
if (!cut.h) {
vlog.info("ignoring DisconnectAction=Lock - no current user");
} else {
- if (_LockWorkStation.isValid())
- (*_LockWorkStation)();
- else
- ExitWindowsEx(EWX_LOGOFF, 0);
+ LockWorkStation();
}
}
}
@@ -199,14 +190,11 @@
// Apply desktop optimisations
cleanDesktop = new CleanDesktop;
- if (removePattern)
- cleanDesktop->disablePattern();
if (removeWallpaper)
cleanDesktop->disableWallpaper();
if (disableEffects)
cleanDesktop->disableEffects();
isWallpaperRemoved = removeWallpaper;
- isPatternRemoved = removePattern;
areEffectsDisabled = disableEffects;
}
@@ -227,11 +215,6 @@
}
-bool SDisplay::areHooksAvailable() {
- return WMHooks::areAvailable();
-}
-
-
bool SDisplay::isRestartRequired() {
// - We must restart the SDesktop if:
// 1. We are no longer in the input desktop.
@@ -255,7 +238,6 @@
// - Check that the desktop optimisation settings haven't changed
// This isn't very efficient, but it shouldn't change very often!
if ((isWallpaperRemoved != removeWallpaper) ||
- (isPatternRemoved != removePattern) ||
(areEffectsDisabled != disableEffects))
return true;