aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-10-28 19:58:38 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-11-01 16:36:24 +0100
commit283e4523a164a469ce8613d5facb563d597ced37 (patch)
treedc34f8d92cb2e1087447fa6cfd20da035223625a /nx-X11
parent6ed435e44765f83287dfe14129ba1d74bfcb9fde (diff)
downloadnx-libs-283e4523a164a469ce8613d5facb563d597ced37.tar.gz
nx-libs-283e4523a164a469ce8613d5facb563d597ced37.tar.bz2
nx-libs-283e4523a164a469ce8613d5facb563d597ced37.zip
NXevents.c: add some explanations from the original changelog
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXevents.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
index 6754991c9..ed444e7a4 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
@@ -192,6 +192,15 @@ ActivatePointerGrab(register DeviceIntPtr mouse, register GrabPtr grab,
if (nxagentOption(Rootless) == 1)
{
/*
+ * from nxagent-1.5.0-20 changelog:
+ * In rootless mode, grabs exported to X in
+ * ActivatePointerGrab() are always made asynchronous. The
+ * synchronous behaviour is implemented by the agent, so that
+ * requiring a further synchronous grab down to the real X
+ * server is of little use and potentially harmful.
+ */
+
+ /*
* FIXME: We should use the correct value for the
* cursor. Temporarily we set it to None.
*/
@@ -216,6 +225,15 @@ DeactivatePointerGrab(register DeviceIntPtr mouse)
#ifdef NXAGENT_SERVER
+ /*
+ * excerpt from nxagent-1.5.0-20 changelog:
+ * In DeactivatePointerGrab() function, mouse button state is set
+ * to up if the window entered by the pointer is the root window
+ * and the agent is in rootless mode. This change is needed
+ * because the subsequent KeyRelease event could be not received
+ * by the agent (for example if the focus had left the window), so
+ * that agent could be unable to update the mouse button state.
+ */
if (nxagentOption(Rootless) == 1)
{
XUngrabPointer(nxagentDisplay, CurrentTime);
@@ -260,13 +278,27 @@ ProcAllowEvents(register ClientPtr client)
static WindowPtr
GetXYStartWindow(WindowPtr pWin)
{
+
if (nxagentOption(Rootless))
{
+ /*
+ * explanation from the original changelog for nxagent-1.5.0-20:
+ * Modified function XYToWindow() in order to manage the case
+ * that mouse pointer is located on the title bar of a top level
+ * window in rootless mode.
+ */
+
if (nxagentLastEnteredWindow == NULL)
{
return ROOT;
}
+ /*
+ * explanation from the original changelog for nxagent-1.5.0-17:
+ * In rootless mode, now function XYToWindow() starts search from
+ * the last window originated an EnterNotify event. In this way, we
+ * can prevent shaded windows from getting mouse events.
+ */
pWin = ROOT->lastChild;
while (pWin && pWin != ROOT->firstChild && pWin != nxagentLastEnteredWindow)