SHA256
1
0
forked from pool/tigervnc

Accepting request 209296 from home:michalsrb:branches:X11:XOrg

- tigervnc-clean-pressed-key-on-exit.patch
  * Send release events for pressed keys after X I/O error.
    (bnc#670448)
- Build debug symbols for vncviewer.

OBS-URL: https://build.opensuse.org/request/show/209296
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=6
This commit is contained in:
Stefan Dirsch 2013-12-03 15:35:36 +00:00 committed by Git OBS Bridge
parent b151ac9e0b
commit d1b635504b
3 changed files with 89 additions and 1 deletions

View File

@ -0,0 +1,79 @@
diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx
index 40d08ae..7a571ec 100644
--- a/vncviewer/DesktopWindow.cxx
+++ b/vncviewer/DesktopWindow.cxx
@@ -186,6 +186,8 @@ DesktopWindow::~DesktopWindow()
OptionsDialog::removeCallback(handleOptions);
+ delete viewport;
+
// FLTK automatically deletes all child widgets, so we shouldn't touch
// them ourselves here
}
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
index e308a63..41733f9 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -112,6 +112,11 @@ Viewport::Viewport(int w, int h, const rfb::PixelFormat& serverPF, CConn* cc_)
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(handleUpdateTimeout, this);
diff --git a/vncviewer/vncviewer.cxx b/vncviewer/vncviewer.cxx
index 37d63a6..5bb811d 100644
--- a/vncviewer/vncviewer.cxx
+++ b/vncviewer/vncviewer.cxx
@@ -83,6 +83,8 @@ char vncServerName[VNCSERVERNAMELEN] = { '\0' };
static bool exitMainloop = false;
static const char *exitError = NULL;
+static CConn *cc;
+
void exit_vncviewer(const char *error)
{
// Prioritise the first error we get as that is probably the most
@@ -110,6 +112,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("CleanupSignalHandler called");
+ 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);
}
@@ -384,6 +396,10 @@ int main(int argc, char** argv)
init_fltk();
+ fl_open_display();
+
+ XSetIOErrorHandler(CleanupXIOErrorHandler);
+
Configuration::enableViewerParams();
/* Load the default parameter settings */
@@ -484,7 +500,7 @@ int main(int argc, char** argv)
#endif
}
- CConn *cc = new CConn(vncServerName, sock);
+ cc = new CConn(vncServerName, sock);
while (!exitMainloop) {
int next_timer;

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Dec 3 14:34:56 UTC 2013 - msrb@suse.com
- tigervnc-clean-pressed-key-on-exit.patch
* Send release events for pressed keys after X I/O error.
(bnc#670448)
-------------------------------------------------------------------
Mon Nov 18 14:05:44 UTC 2013 - msrb@suse.com

View File

@ -51,6 +51,7 @@ Source8: vnc.reg
# Tiger vnc patches
Patch1: u_tigervnc-1.3.0-fix-use-after-free.patch
Patch2: tigervnc-newfbsize.patch
Patch3: tigervnc-clean-pressed-key-on-exit.patch
# Xserver patches
Patch10: tigervnc-1.2.80-fix-int-to-pointer.patch
@ -78,6 +79,7 @@ cp -r ../xorg-server-*/* unix/xserver/
%patch1 -p1
%patch2 -p1
%patch3 -p1
pushd unix/xserver
patch -p1 < ../xserver113.patch
@ -88,7 +90,7 @@ popd
%build
# Build all tigervnc
cmake -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix}
cmake -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DCMAKE_BUILD_TYPE=RelWithDebInfo
make %{?_smp_mflags}
# Build Xvnc server