aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2018-07-31 16:06:59 +0200
committerPierre Ossman <ossman@cendio.se>2018-07-31 16:06:59 +0200
commitbe88293952175258992c1ed2f5a1b7d8f78fe7cc (patch)
treebfcec73ec205fe1578898f608b642e6e2f85e4b1
parentf81148c43a25d4c69e635b6ad13eab674b473aca (diff)
downloadtigervnc-be88293952175258992c1ed2f5a1b7d8f78fe7cc.tar.gz
tigervnc-be88293952175258992c1ed2f5a1b7d8f78fe7cc.zip
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.
-rw-r--r--vncviewer/Viewport.cxx5
1 files changed, 4 insertions, 1 deletions
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: