f3919e3250
- Updated to tigervnc 1.5.0. - Dropped no longer needed patches: * tigervnc-sf3495623.patch * u_syslog.patch * u_tigervnc-build-with-xserver-1.17.patch - Use encryption everywhere. (fate#318936) - Work with fltk 1.3.2. * N_tigervnc_revert_fltk_1_3_3_requirements.patch OBS-URL: https://build.opensuse.org/request/show/316948 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=58
89 lines
2.7 KiB
Diff
89 lines
2.7 KiB
Diff
Index: tigervnc-1.5.0/vncviewer/DesktopWindow.cxx
|
|
===================================================================
|
|
--- tigervnc-1.5.0.orig/vncviewer/DesktopWindow.cxx
|
|
+++ tigervnc-1.5.0/vncviewer/DesktopWindow.cxx
|
|
@@ -177,6 +177,8 @@ DesktopWindow::~DesktopWindow()
|
|
|
|
OptionsDialog::removeCallback(handleOptions);
|
|
|
|
+ delete viewport;
|
|
+
|
|
// FLTK automatically deletes all child widgets, so we shouldn't touch
|
|
// them ourselves here
|
|
}
|
|
Index: tigervnc-1.5.0/vncviewer/Viewport.cxx
|
|
===================================================================
|
|
--- tigervnc-1.5.0.orig/vncviewer/Viewport.cxx
|
|
+++ tigervnc-1.5.0/vncviewer/Viewport.cxx
|
|
@@ -139,6 +139,11 @@ Viewport::Viewport(int w, int h, const r
|
|
|
|
Viewport::~Viewport()
|
|
{
|
|
+ // Send release for every pressed key
|
|
+ for(DownMap::iterator iter = downKeySym.begin(); iter != downKeySym.end(); ++iter) {
|
|
+ cc->writer()->keyEvent(iter->second, false);
|
|
+ }
|
|
+
|
|
// Unregister all timeouts in case they get a change tro trigger
|
|
// again later when this object is already gone.
|
|
Fl::remove_timeout(handlePointerTimeout, this);
|
|
Index: tigervnc-1.5.0/vncviewer/vncviewer.cxx
|
|
===================================================================
|
|
--- tigervnc-1.5.0.orig/vncviewer/vncviewer.cxx
|
|
+++ tigervnc-1.5.0/vncviewer/vncviewer.cxx
|
|
@@ -107,6 +107,8 @@ static const char *about_text()
|
|
return buffer;
|
|
}
|
|
|
|
+static CConn *cc;
|
|
+
|
|
void exit_vncviewer(const char *error)
|
|
{
|
|
// Prioritise the first error we get as that is probably the most
|
|
@@ -158,6 +160,16 @@ static void CleanupSignalHandler(int sig
|
|
// CleanupSignalHandler allows C++ object cleanup to happen because it calls
|
|
// exit() rather than the default which is to abort.
|
|
vlog.info(_("Termination signal %d has been received. TigerVNC Viewer will now exit."), sig);
|
|
+ delete cc;
|
|
+ exit(1);
|
|
+}
|
|
+
|
|
+static int CleanupXIOErrorHandler(Display *dpy)
|
|
+{
|
|
+ // CleanupSignalHandler allows C++ object cleanup to happen because it calls
|
|
+ // exit() rather than the default which is to abort.
|
|
+ vlog.info("XErrorHandler called");
|
|
+ delete cc;
|
|
exit(1);
|
|
}
|
|
|
|
@@ -460,11 +472,19 @@ int main(int argc, char** argv)
|
|
|
|
init_fltk();
|
|
|
|
+ fl_open_display();
|
|
+
|
|
+ XSetIOErrorHandler(CleanupXIOErrorHandler);
|
|
+
|
|
#if !defined(WIN32) && !defined(__APPLE__)
|
|
fl_open_display();
|
|
XkbSetDetectableAutoRepeat(fl_display, True, NULL);
|
|
#endif
|
|
|
|
+ fl_open_display();
|
|
+
|
|
+ XSetIOErrorHandler(CleanupXIOErrorHandler);
|
|
+
|
|
Configuration::enableViewerParams();
|
|
|
|
/* Load the default parameter settings */
|
|
@@ -577,7 +597,7 @@ int main(int argc, char** argv)
|
|
#endif
|
|
}
|
|
|
|
- CConn *cc = new CConn(vncServerName, sock);
|
|
+ cc = new CConn(vncServerName, sock);
|
|
|
|
while (!exitMainloop) {
|
|
int next_timer;
|