]> source.dussan.org Git - tigervnc.git/commitdiff
Added new exception rfb::UnsupportedPixelFormatException.
authorgeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Mon, 29 May 2006 14:05:20 +0000 (14:05 +0000)
committergeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Mon, 29 May 2006 14:05:20 +0000 (14:05 +0000)
Added DesktopWindow::getCallback().

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@600 3789f03b-4d11-0410-bbf8-ca57d06f2519

win/vncviewer/DesktopWindow.cxx
win/vncviewer/DesktopWindow.h

index 27ef2dc2f888b9d3a402c0012e1ae538f497657f..fce795ba6750c991a5ed63203c8e965bd2eb2a6c 100644 (file)
@@ -25,6 +25,7 @@
 #include <rfb_win32/MonitorInfo.h>
 #include <rfb_win32/DeviceContext.h>
 #include <rfb_win32/Win32Util.h>
+#include <rfb_win32/MsgBox.h>
 #include <vncviewer/DesktopWindow.h>
 #include <vncviewer/resource.h>
 
@@ -70,6 +71,9 @@ LRESULT CALLBACK DesktopWindowProc(HWND wnd, UINT msg, WPARAM wParam, LPARAM lPa
 
   try {
     result = _this->processMessage(msg, wParam, lParam);
+  } catch (rfb::UnsupportedPixelFormatException &e) {
+    MsgBox(0, e.str(), MB_OK);
+    _this->getCallback()->closeWindow();
   } catch (rdr::Exception& e) {
     vlog.error("untrapped: %s", e.str());
   }
index 3d2211f8175e70f5347c0a4d10ae4e6f60f8180e..8511eb444b0235c1b43c6d726bd3ecbf9746cef4 100644 (file)
@@ -132,6 +132,8 @@ namespace rfb {
         virtual void refreshMenu(bool enableSysItems) = 0;
       };
 
+      Callback *getCallback() const { return callback; }
+
       // Currently accessible so that the CConn can releaseAllKeys & check
       // whether Ctrl and Alt are down...
       rfb::win32::CKeyboard kbd;