Control: tags 764389 + pending

Hi!

I've uploaded an NMU for synergy (versioned as 1.4.16-1.2) to DELAYED/10.

Patch attached.

Cheers,
diff -Nru synergy-1.4.16/debian/changelog synergy-1.4.16/debian/changelog
--- synergy-1.4.16/debian/changelog	2016-10-24 06:36:22.000000000 +0200
+++ synergy-1.4.16/debian/changelog	2017-01-08 11:28:04.000000000 +0100
@@ -1,3 +1,12 @@
+synergy (1.4.16-1.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Apply patch from https://xzrq.net/x11-mouseover.patch as mentioned
+    in https://github.com/symless/synergy/issues/3749#issuecomment-58855820
+    to fix X11 mouse-over issue on synergy server (closes: #764389).
+
+ -- Peter Palfrader <[email protected]>  Sun, 08 Jan 2017 11:20:13 +0100
+
 synergy (1.4.16-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru synergy-1.4.16/debian/patches/series synergy-1.4.16/debian/patches/series
--- synergy-1.4.16/debian/patches/series	2016-10-24 06:36:22.000000000 +0200
+++ synergy-1.4.16/debian/patches/series	2017-01-08 11:21:30.000000000 +0100
@@ -2,3 +2,4 @@
 system-cryptopp.patch
 cprotocolutil-writef.patch
 versioncheck-disable.patch
+x11-mouseover.patch
diff -Nru synergy-1.4.16/debian/patches/x11-mouseover.patch synergy-1.4.16/debian/patches/x11-mouseover.patch
--- synergy-1.4.16/debian/patches/x11-mouseover.patch	1970-01-01 01:00:00.000000000 +0100
+++ synergy-1.4.16/debian/patches/x11-mouseover.patch	2017-01-08 11:22:40.000000000 +0100
@@ -0,0 +1,54 @@
+Per https://github.com/symless/synergy/issues/3749#issuecomment-58855820
+from https://xzrq.net/x11-mouseover.patch:
+fix X11 mouse-over issue on synergy server.
+Index: synergy-1.4.16/src/lib/platform/CXWindowsScreen.cpp
+===================================================================
+--- synergy-1.4.16.orig/src/lib/platform/CXWindowsScreen.cpp
++++ synergy-1.4.16/src/lib/platform/CXWindowsScreen.cpp
+@@ -1780,29 +1780,32 @@ CXWindowsScreen::doSelectEvents(Window w
+ 	// that we select PointerMotionMask on every window.  we also select
+ 	// SubstructureNotifyMask in order to get CreateNotify events so we
+ 	// select events on new windows too.
+-	//
+-	// note that this can break certain clients due a design flaw of X.
+-	// X will deliver a PointerMotion event to the deepest window in the
+-	// hierarchy that contains the pointer and has PointerMotionMask
+-	// selected by *any* client.  if another client doesn't select
+-	// motion events in a subwindow so the parent window will get them
+-	// then by selecting for motion events on the subwindow we break
+-	// that client because the parent will no longer get the events.
+-
+-	// FIXME -- should provide some workaround for event selection
+-	// design flaw.  perhaps only select for motion events on windows
+-	// that already do or are top-level windows or don't propagate
+-	// pointer events.  or maybe an option to simply poll the mouse.
+ 
+ 	// we don't want to adjust our grab window
+ 	if (w == m_window) {
+ 		return;
+ 	}
+ 
++	// X11 has a design flaw. If *no* client selected PointerMotionMask for
++	// a window, motion events will be delivered to that window's parent.
++	// If *any* client, not necessarily the owner, selects PointerMotionMask
++	// on such a window, X will stop propagating motion events to its
++	// parent. This breaks applications that rely on event propagation
++	// behavior.
++	//
++	// Avoid selecting PointerMotionMask unless some other client selected
++	// it already.
++	long mask = SubstructureNotifyMask;
++	XWindowAttributes attr;
++	XGetWindowAttributes(m_display, w, &attr);
++	if ((attr.all_event_masks & PointerMotionMask) == PointerMotionMask) {
++		mask |= PointerMotionMask;
++	}
++
+ 	// select events of interest.  do this before querying the tree so
+ 	// we'll get notifications of children created after the XQueryTree()
+ 	// so we won't miss them.
+-	XSelectInput(m_display, w, PointerMotionMask | SubstructureNotifyMask);
++	XSelectInput(m_display, w, mask);
+ 
+ 	// recurse on child windows
+ 	Window rw, pw, *cw;

Reply via email to