From fc08bee5afdb07830d6c6fb28359a020a5c305c5 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 12 Jan 2016 12:32:15 +0100 Subject: 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. --- win/rfb_win32/SDisplay.cxx | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'win/rfb_win32/SDisplay.cxx') diff --git a/win/rfb_win32/SDisplay.cxx b/win/rfb_win32/SDisplay.cxx index d4cedf8c..ac64e3ef 100644 --- a/win/rfb_win32/SDisplay.cxx +++ b/win/rfb_win32/SDisplay.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -51,8 +50,6 @@ StringParameter displayDevice("DisplayDevice", "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 @@ BoolParameter rfb::win32::SDisplay::disableEffects("DisableEffects", // SDisplay // -typedef BOOL (WINAPI *_LockWorkStation_proto)(); -DynamicFn<_LockWorkStation_proto> _LockWorkStation(_T("user32.dll"), "LockWorkStation"); - // -=- Constructor/Destructor SDisplay::SDisplay() @@ -127,10 +121,7 @@ void SDisplay::stop() 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 @@ void SDisplay::startCore() { // 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 @@ void SDisplay::stopCore() { } -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 @@ bool SDisplay::isRestartRequired() { // - 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; -- cgit v1.2.3