aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-06-11 12:00:48 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-06-11 12:00:48 +0200
commit92f41213edf57332124df8e0b50ca73ff1a11773 (patch)
tree9f7c067d73c4eb4044407d26df0416f29ae082fa /nx-X11/programs/Xserver
parent126cbe1ff20e19cd477c5fe9a127298bd12e3e2e (diff)
parenta736122f5712d5d1b3b798ace3583a101c0cdf61 (diff)
downloadnx-libs-92f41213edf57332124df8e0b50ca73ff1a11773.tar.gz
nx-libs-92f41213edf57332124df8e0b50ca73ff1a11773.tar.bz2
nx-libs-92f41213edf57332124df8e0b50ca73ff1a11773.zip
Merge branch 'uli42-pr/fix_broken_cursor_handling' into 3.6.x
Attributes GH PR #810: https://github.com/ArcticaProject/nx-libs/pull/810
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r--nx-X11/programs/Xserver/dix/events.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXevents.c141
-rw-r--r--nx-X11/programs/Xserver/os/io.c2
-rw-r--r--nx-X11/programs/Xserver/render/glyph.c3
4 files changed, 81 insertions, 69 deletions
diff --git a/nx-X11/programs/Xserver/dix/events.c b/nx-X11/programs/Xserver/dix/events.c
index e936be77e..745932af3 100644
--- a/nx-X11/programs/Xserver/dix/events.c
+++ b/nx-X11/programs/Xserver/dix/events.c
@@ -245,6 +245,8 @@ static WindowPtr XYToWindow(
int y
);
+static Bool CheckMotion(xEvent *xE);
+
extern int lastEvent;
static Mask lastEventMask;
@@ -1951,6 +1953,7 @@ XYToWindow(int x, int y)
}
#endif /* NXAGENT_SERVER */
+#ifndef NXAGENT_SERVER
static Bool
CheckMotion(xEvent *xE)
{
@@ -2015,6 +2018,7 @@ CheckMotion(xEvent *xE)
}
return TRUE;
}
+#endif /* NXAGENT_SERVER */
void
WindowsRestructured()
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
index 370fff6b5..43dfe8613 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
@@ -381,79 +381,88 @@ XYToWindow(int x, int y)
return spriteTrace[spriteTraceGood-1];
}
-// static Bool
-// CheckMotion(xEvent *xE)
-// {
-// WindowPtr prevSpriteWin = sprite.win;
-//
+static Bool
+CheckMotion(xEvent *xE)
+{
+ WindowPtr prevSpriteWin = sprite.win;
+
#ifdef PANORAMIX
-// if(!noPanoramiXExtension)
-// return XineramaCheckMotion(xE);
+ if(!noPanoramiXExtension)
+ return XineramaCheckMotion(xE);
#endif
-// if (xE && !syncEvents.playingEvents)
-// {
-// if (sprite.hot.pScreen != sprite.hotPhys.pScreen)
-// {
-// sprite.hot.pScreen = sprite.hotPhys.pScreen;
-// ROOT = sprite.hot.pScreen->root;
-// }
-// sprite.hot.x = XE_KBPTR.rootX;
-// sprite.hot.y = XE_KBPTR.rootY;
-// if (sprite.hot.x < sprite.physLimits.x1)
-// sprite.hot.x = sprite.physLimits.x1;
-// else if (sprite.hot.x >= sprite.physLimits.x2)
-// sprite.hot.x = sprite.physLimits.x2 - 1;
-// if (sprite.hot.y < sprite.physLimits.y1)
-// sprite.hot.y = sprite.physLimits.y1;
-// else if (sprite.hot.y >= sprite.physLimits.y2)
-// sprite.hot.y = sprite.physLimits.y2 - 1;
+ if (xE && !syncEvents.playingEvents)
+ {
+ if (sprite.hot.pScreen != sprite.hotPhys.pScreen)
+ {
+ sprite.hot.pScreen = sprite.hotPhys.pScreen;
+ ROOT = sprite.hot.pScreen->root;
+ }
+ sprite.hot.x = XE_KBPTR.rootX;
+ sprite.hot.y = XE_KBPTR.rootY;
+ if (sprite.hot.x < sprite.physLimits.x1)
+ sprite.hot.x = sprite.physLimits.x1;
+ else if (sprite.hot.x >= sprite.physLimits.x2)
+ sprite.hot.x = sprite.physLimits.x2 - 1;
+ if (sprite.hot.y < sprite.physLimits.y1)
+ sprite.hot.y = sprite.physLimits.y1;
+ else if (sprite.hot.y >= sprite.physLimits.y2)
+ sprite.hot.y = sprite.physLimits.y2 - 1;
#ifdef SHAPE
-// if (sprite.hotShape)
-// ConfineToShape(sprite.hotShape, &sprite.hot.x, &sprite.hot.y);
+ if (sprite.hotShape)
+ ConfineToShape(sprite.hotShape, &sprite.hot.x, &sprite.hot.y);
#endif
-// sprite.hotPhys = sprite.hot;
-//
-// /*
-// * This code force cursor position to be inside the
-// * root window of the agent. We can't view a reason
-// * to do this and it interacts in an undesirable way
-// * with toggling fullscreen.
-// *
-// * if ((sprite.hotPhys.x != XE_KBPTR.rootX) ||
-// * (sprite.hotPhys.y != XE_KBPTR.rootY))
-// * {
-// * (*sprite.hotPhys.pScreen->SetCursorPosition)(
-// * sprite.hotPhys.pScreen,
-// * sprite.hotPhys.x, sprite.hotPhys.y, FALSE);
-// * }
-// */
-//
-// XE_KBPTR.rootX = sprite.hot.x;
-// XE_KBPTR.rootY = sprite.hot.y;
-// }
-//
-// sprite.win = XYToWindow(sprite.hot.x, sprite.hot.y);
+ sprite.hotPhys = sprite.hot;
+
+#ifdef NXAGENT_SERVER
+ /*
+ * This code force cursor position to be inside the
+ * root window of the agent. We can't view a reason
+ * to do this and it interacts in an undesirable way
+ * with toggling fullscreen.
+ *
+ * if ((sprite.hotPhys.x != XE_KBPTR.rootX) ||
+ * (sprite.hotPhys.y != XE_KBPTR.rootY))
+ * {
+ * (*sprite.hotPhys.pScreen->SetCursorPosition)(
+ * sprite.hotPhys.pScreen,
+ * sprite.hotPhys.x, sprite.hotPhys.y, FALSE);
+ * }
+ */
+#else
+ if ((sprite.hotPhys.x != XE_KBPTR.rootX) ||
+ (sprite.hotPhys.y != XE_KBPTR.rootY))
+ {
+ (*sprite.hotPhys.pScreen->SetCursorPosition)(
+ sprite.hotPhys.pScreen,
+ sprite.hotPhys.x, sprite.hotPhys.y, FALSE);
+ }
+#endif
+ XE_KBPTR.rootX = sprite.hot.x;
+ XE_KBPTR.rootY = sprite.hot.y;
+ }
+
+ sprite.win = XYToWindow(sprite.hot.x, sprite.hot.y);
#ifdef notyet
-// if (!(sprite.win->deliverableEvents &
-// Motion_Filter(inputInfo.pointer->button))
-// !syncEvents.playingEvents)
-// {
-// /* XXX Do PointerNonInterestBox here */
-// }
+ if (!(sprite.win->deliverableEvents &
+ Motion_Filter(inputInfo.pointer->button))
+ !syncEvents.playingEvents)
+ {
+ /* XXX Do PointerNonInterestBox here */
+ }
#endif
-// if (sprite.win != prevSpriteWin)
-// {
-// if (prevSpriteWin != NullWindow) {
-// if (!xE)
-// UpdateCurrentTimeIf();
-// DoEnterLeaveEvents(prevSpriteWin, sprite.win, NotifyNormal);
-// }
-// PostNewCursor();
-// return FALSE;
-// }
-// return TRUE;
-// }
+ if (sprite.win != prevSpriteWin)
+ {
+ if (prevSpriteWin != NullWindow) {
+ if (!xE)
+ UpdateCurrentTimeIf();
+ DoEnterLeaveEvents(prevSpriteWin, sprite.win, NotifyNormal);
+ }
+ PostNewCursor();
+ return FALSE;
+ }
+ return TRUE;
+}
void
DefineInitialRootWindow(register WindowPtr win)
diff --git a/nx-X11/programs/Xserver/os/io.c b/nx-X11/programs/Xserver/os/io.c
index ad1fdcd20..02a47f135 100644
--- a/nx-X11/programs/Xserver/os/io.c
+++ b/nx-X11/programs/Xserver/os/io.c
@@ -424,8 +424,6 @@ ReadRequestFromClient(ClientPtr client)
if (oci->ignoreBytes > 0) {
assert(needed == oci->ignoreBytes || needed == oci->size);
- oci->ignoreBytes -= gotnow;
- needed = gotnow = 0;
/*
* The _XSERVTransRead call above may return more or fewer bytes than we
* want to ignore. Ignore the smaller of the two sizes.
diff --git a/nx-X11/programs/Xserver/render/glyph.c b/nx-X11/programs/Xserver/render/glyph.c
index 9c9a485ea..a379b505f 100644
--- a/nx-X11/programs/Xserver/render/glyph.c
+++ b/nx-X11/programs/Xserver/render/glyph.c
@@ -589,7 +589,8 @@ miGlyphs(CARD8 op,
height = extents.y2 - extents.y1;
pMaskPixmap =
(*pScreen->CreatePixmap) (pScreen, width, height,
- maskFormat->depth);
+ maskFormat->depth,
+ CREATE_PIXMAP_USAGE_SCRATCH);
if (!pMaskPixmap)
return;
component_alpha = NeedsComponent(maskFormat->format);