tigervnc/tigervnc-clean-pressed-key-on-exit.patch
Michal Srb bbd43011aa Accepting request 627036 from home:michalsrb:branches:X11:XOrg
- Update to tigervnc 1.9.0
  * Alternative, "raw" keyboard mode in the native client and all servers
  * CapsLock/NumLock/ScrollLock synchronisation in the native client and all servers
  * Automatic "repair" of JPEG artefacts on screen in all servers
  * Support for UNIX sockets in the native client and in the UNIX servers
  * Both clients now warn when sending the password over a possibly insecure channel
  * Performance improvements in the Java client
  * The Java client now requires Java 7
  * Improved high latency handling in all servers
  * Slightly better keyboard handling in x0vncserver
  * x0vncserver now supports cursors and screen resize
  * Xorg 1.20 can now be used as a base for Xvnc/libvnc.so
- Removed patches (included in 1.9.0):
  * u_tigervnc-show-unencrypted-warning.patch
  * U_allow_multiple_certs_with_same_dn_in_saved_certs_file.patch
  * U_handle_certificate_verification_for_saved_certs_correctly.patch
  * u_Unset-pixel-buffer-when-x0vncserver-client-disconnect.patch
  * u_add-support-for-X-server-1.20.0.patch
  * U_vncviewer-Fix-fullscreen-scrolling.patch
  * U_vncviewer-Fix-scrollbar-visibility.patch
- Removed patches (no longer needed):
  * tigervnc-1.8.0-nowindows.patch
- Refreshed patches:
  * n_tigervnc-date-time.patch
  * tigervnc-clean-pressed-key-on-exit.patch
  * u_tigervnc-add-autoaccept-parameter.patch
  * u_tigervnc-ignore-epipe-on-write.patch
- Added patches:
  * n_correct_path_in_desktop_file.patch
- Fixed typo in 10-libvnc.conf

OBS-URL: https://build.opensuse.org/request/show/627036
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=145
2018-08-02 09:24:03 +00:00

86 lines
2.7 KiB
Diff

Index: tigervnc-1.9.0/vncviewer/DesktopWindow.cxx
===================================================================
--- tigervnc-1.9.0.orig/vncviewer/DesktopWindow.cxx
+++ tigervnc-1.9.0/vncviewer/DesktopWindow.cxx
@@ -207,6 +207,8 @@ DesktopWindow::~DesktopWindow()
delete statsGraph;
+ delete viewport;
+
// FLTK automatically deletes all child widgets, so we shouldn't touch
// them ourselves here
}
Index: tigervnc-1.9.0/vncviewer/Viewport.cxx
===================================================================
--- tigervnc-1.9.0.orig/vncviewer/Viewport.cxx
+++ tigervnc-1.9.0/vncviewer/Viewport.cxx
@@ -189,6 +189,18 @@ 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) {
+ try {
+ if (iter->first > 0xff)
+ cc->writer()->writeKeyEvent(iter->second, 0, false);
+ else
+ cc->writer()->writeKeyEvent(iter->second, iter->first, false);
+ } catch (rdr::Exception& e) {
+ // ignore
+ }
+ }
+
// 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.9.0/vncviewer/vncviewer.cxx
===================================================================
--- tigervnc-1.9.0.orig/vncviewer/vncviewer.cxx
+++ tigervnc-1.9.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
@@ -177,6 +179,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);
}
@@ -566,6 +578,9 @@ int main(int argc, char** argv)
XkbSetDetectableAutoRepeat(fl_display, True, NULL);
#endif
+ fl_open_display();
+ XSetIOErrorHandler(CleanupXIOErrorHandler);
+
CSecurity::upg = &dlg;
#ifdef HAVE_GNUTLS
CSecurityTLS::msg = &dlg;
@@ -651,7 +666,7 @@ int main(int argc, char** argv)
#endif
}
- CConn *cc = new CConn(vncServerName, sock);
+ cc = new CConn(vncServerName, sock);
while (!exitMainloop)
run_mainloop();