From 4ab1e5d4b5ebaac0c410eedcc76865736aaa6ae4 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 12 Jan 2016 12:29:32 +0100 Subject: [PATCH] Remove stub mirror driver code We don't have any meaningful code for the mirror driver, so remove the confusing stub and interface for it. --- win/rfb_win32/SDisplay.cxx | 9 +----- win/rfb_win32/SDisplay.h | 3 +- win/rfb_win32/SDisplayCoreDriver.h | 52 ------------------------------ win/vncconfig/Hooking.h | 7 ---- win/vncconfig/resource.h | 1 - win/vncconfig/vncconfig.rc | 4 +-- 6 files changed, 3 insertions(+), 73 deletions(-) delete mode 100644 win/rfb_win32/SDisplayCoreDriver.h diff --git a/win/rfb_win32/SDisplay.cxx b/win/rfb_win32/SDisplay.cxx index 26a7bbce..d4cedf8c 100644 --- a/win/rfb_win32/SDisplay.cxx +++ b/win/rfb_win32/SDisplay.cxx @@ -29,7 +29,6 @@ #include #include #include -#include #include #include @@ -173,9 +172,7 @@ void SDisplay::startCore() { int tryMethod = updateMethod_; while (!core) { try { - if (tryMethod == 2) - core = new SDisplayCoreDriver(this, &updates); - else if (tryMethod == 1) + if (tryMethod == 1) core = new SDisplayCoreWMHooks(this, &updates); else core = new SDisplayCorePolling(this, &updates); @@ -234,10 +231,6 @@ bool SDisplay::areHooksAvailable() { return WMHooks::areAvailable(); } -bool SDisplay::isDriverAvailable() { - return SDisplayCoreDriver::isAvailable(); -} - bool SDisplay::isRestartRequired() { // - We must restart the SDesktop if: diff --git a/win/rfb_win32/SDisplay.h b/win/rfb_win32/SDisplay.h index 6aac59ae..70208a7d 100644 --- a/win/rfb_win32/SDisplay.h +++ b/win/rfb_win32/SDisplay.h @@ -96,9 +96,8 @@ namespace rfb { static BoolParameter removePattern; static BoolParameter disableEffects; - // -=- Use by VNC Config to determine whether hooks, driver, etc are available + // -=- Use by VNC Config to determine whether hooks are available static bool areHooksAvailable(); - static bool isDriverAvailable(); protected: diff --git a/win/rfb_win32/SDisplayCoreDriver.h b/win/rfb_win32/SDisplayCoreDriver.h deleted file mode 100644 index 5fea75cc..00000000 --- a/win/rfb_win32/SDisplayCoreDriver.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved. - * - * This is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this software; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - * USA. - */ - -// -=- SDisplayCoreDriver.h -// -// Placeholder for SDisplayCore mirror-driver implementation. - -#ifndef __RFB_SDISPLAY_CORE_DRIVER_H__ -#define __RFB_SDISPLAY_CORE_DRIVER_H__ - -#include - -namespace rfb { - namespace win32 { - - class SDisplayCoreDriver: public SDisplayCore { - public: - SDisplayCoreDriver(SDisplay* display, UpdateTracker* ut) { - throw rdr::Exception("Not supported"); - } - - // - Called by SDisplay to inform Core of the screen size - virtual void setScreenRect(const Rect& screenRect_) {} - - // - Called by SDisplay to flush updates to the specified tracker - virtual void flushUpdates() {} - - virtual const char* methodName() const { return "VNC Mirror Driver"; } - - // - Determine whether the display driver is installed & usable - static bool isAvailable() { return false; } - }; - - }; -}; - -#endif diff --git a/win/vncconfig/Hooking.h b/win/vncconfig/Hooking.h index 9be82f3a..b8137ddc 100644 --- a/win/vncconfig/Hooking.h +++ b/win/vncconfig/Hooking.h @@ -37,9 +37,6 @@ namespace rfb { setItemChecked(IDC_USEHOOKS, (rfb::win32::SDisplay::updateMethod == 1) && rfb::win32::SDisplay::areHooksAvailable()); enableItem(IDC_USEHOOKS, rfb::win32::SDisplay::areHooksAvailable()); - setItemChecked(IDC_USEDRIVER, (rfb::win32::SDisplay::updateMethod == 2) && - rfb::win32::SDisplay::isDriverAvailable()); - enableItem(IDC_USEDRIVER, rfb::win32::SDisplay::isDriverAvailable()); setItemChecked(IDC_POLLCONSOLES, rfb::win32::WMPoller::poll_console_windows); setItemChecked(IDC_CAPTUREBLT, osVersion.isPlatformNT && rfb::win32::DeviceFrameBuffer::useCaptureBlt); @@ -50,12 +47,10 @@ namespace rfb { switch (id) { case IDC_USEPOLLING: case IDC_USEHOOKS: - case IDC_USEDRIVER: case IDC_POLLCONSOLES: case IDC_CAPTUREBLT: setChanged(((rfb::win32::SDisplay::updateMethod == 0) != isItemChecked(IDC_USEPOLLING)) || ((rfb::win32::SDisplay::updateMethod == 1) != isItemChecked(IDC_USEHOOKS)) || - ((rfb::win32::SDisplay::updateMethod == 2) != isItemChecked(IDC_USEDRIVER)) || (rfb::win32::WMPoller::poll_console_windows != isItemChecked(IDC_POLLCONSOLES)) || (rfb::win32::DeviceFrameBuffer::useCaptureBlt != isItemChecked(IDC_CAPTUREBLT))); enableItem(IDC_POLLCONSOLES, isItemChecked(IDC_USEHOOKS)); @@ -68,8 +63,6 @@ namespace rfb { regKey.setInt(_T("UpdateMethod"), 0); if (isItemChecked(IDC_USEHOOKS)) regKey.setInt(_T("UpdateMethod"), 1); - if (isItemChecked(IDC_USEDRIVER)) - regKey.setInt(_T("UpdateMethod"), 2); regKey.setBool(_T("PollConsoleWindows"), isItemChecked(IDC_POLLCONSOLES)); regKey.setBool(_T("UseCaptureBlt"), isItemChecked(IDC_CAPTUREBLT)); diff --git a/win/vncconfig/resource.h b/win/vncconfig/resource.h index 395edc9e..7b8e6479 100644 --- a/win/vncconfig/resource.h +++ b/win/vncconfig/resource.h @@ -69,7 +69,6 @@ #define IDC_CAPTUREBLT 1062 #define IDC_QUERY 1064 #define IDC_USEPOLLING 1066 -#define IDC_USEDRIVER 1068 #define IDC_QUERY_LOGGED_ON 1069 #define IDC_AUTH_ADMIN_PASSWD 1076 #define IDC_AUTH_VIEWONLY_PASSWD 1077 diff --git a/win/vncconfig/vncconfig.rc b/win/vncconfig/vncconfig.rc index 49585b4c..ebcf7209 100644 --- a/win/vncconfig/vncconfig.rc +++ b/win/vncconfig/vncconfig.rc @@ -137,10 +137,8 @@ BEGIN BS_AUTORADIOBUTTON,7,25,183,15 CONTROL "Poll console windows for updates",IDC_POLLCONSOLES, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,40,165,15 - CONTROL "Use VNC Mirror driver to track changes",IDC_USEDRIVER, - "Button",BS_AUTORADIOBUTTON,7,55,183,15 CONTROL "Capture alpha-blended windows",IDC_CAPTUREBLT,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,7,70,183,15 + BS_AUTOCHECKBOX | WS_TABSTOP,7,55,183,15 END IDD_AUTH_VNC_PASSWD DIALOG DISCARDABLE 0, 0, 212, 70 -- 2.39.5