Ignore buttons in mouse leave events

Resolves: bz#1609516
This commit is contained in:
Jan Grulich 2018-08-01 12:13:09 +02:00
parent 892083e086
commit 9c672c186e
2 changed files with 47 additions and 11 deletions

View File

@ -0,0 +1,27 @@
From be88293952175258992c1ed2f5a1b7d8f78fe7cc Mon Sep 17 00:00:00 2001
From: Pierre Ossman <ossman@cendio.se>
Date: Tue, 31 Jul 2018 16:06:59 +0200
Subject: Ignore buttons in mouse leave events
For KDE we can sometimes get a bunch of stray FL_LEAVE events before
gaining focus. Sending their included button information gets things
in the incorrect order with regard to other synchronisation we do on
focus. So just ignore buttons as the only information we want out of
the leave information is a position update.
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx
index ff27f7bf..7b5df572 100644
--- a/vncviewer/Viewport.cxx
+++ b/vncviewer/Viewport.cxx
@@ -587,7 +587,10 @@ int Viewport::handle(int event)
case FL_LEAVE:
window()->cursor(FL_CURSOR_DEFAULT);
- // Fall through as we want a last move event to help trigger edge stuff
+ // We want a last move event to help trigger edge stuff
+ handlePointerEvent(Point(Fl::event_x() - x(), Fl::event_y() - y()), 0);
+ return 1;
+
case FL_PUSH:
case FL_RELEASE:
case FL_DRAG:

View File

@ -1,6 +1,6 @@
Name: tigervnc
Version: 1.9.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A TigerVNC remote display system
%global _hardened_build 1
@ -14,11 +14,14 @@ Source2: vncserver.sysconfig
Source3: 10-libvnc.conf
Source4: xvnc.service
Source5: xvnc.socket
Patch7: tigervnc-manpages.patch
Patch8: tigervnc-getmaster.patch
Patch9: tigervnc-shebang.patch
Patch14: tigervnc-xstartup.patch
Patch18: tigervnc-utilize-system-crypto-policies.patch
Patch1: tigervnc-manpages.patch
Patch2: tigervnc-getmaster.patch
Patch3: tigervnc-shebang.patch
Patch4: tigervnc-xstartup.patch
Patch5: tigervnc-utilize-system-crypto-policies.patch
Patch6: tigervnc-ignore-buttons-in-mouse-leave-event.patch
Patch100: tigervnc-xserver120.patch
BuildRequires: gcc-c++
@ -140,19 +143,21 @@ done
popd
# Synchronise manpages and --help output (bug #980870).
%patch7 -p1 -b .manpages
%patch1 -p1 -b .manpages
# libvnc.so: don't use unexported GetMaster function (bug #744881 again).
%patch8 -p1 -b .getmaster
%patch2 -p1 -b .getmaster
# Don't use shebang in vncserver script.
%patch9 -p1 -b .shebang
%patch3 -p1 -b .shebang
# Clearer xstartup file (bug #923655).
%patch14 -p1 -b .xstartup
%patch4 -p1 -b .xstartup
# Utilize system-wide crypto policies
%patch18 -p1 -b .utilize-system-crypto-policies
%patch5 -p1 -b .utilize-system-crypto-policies
%patch6 -p1 -b .ignore-buttons-in-mouse-leave-event
%build
%ifarch sparcv9 sparc64 s390 s390x
@ -299,6 +304,10 @@ install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/10-libvnc.c
%{_datadir}/icons/hicolor/*/apps/*
%changelog
* Wed Aug 01 2018 Jan Grulich <jgrulich@redhat.com> - 1.9.0-2
- Ignore buttons in mouse leave events
Resolves: bz#1609516
* Tue Jul 17 2018 Jan Grulich <jgrulich@redhat.com> - 1.9.0-1
- Update to 1.9.0