aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/xfixes
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2016-07-03 22:06:43 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-05 08:38:36 +0200
commit9ea88717db376b54b2c821ab67e846918acc616a (patch)
tree98239fa0c70ae31a3e101d14f1af07486d9a526a /nx-X11/programs/Xserver/xfixes
parent320a8cc0c7fa472970bc3698c7e77b6406ca343b (diff)
downloadnx-libs-9ea88717db376b54b2c821ab67e846918acc616a.tar.gz
nx-libs-9ea88717db376b54b2c821ab67e846918acc616a.tar.bz2
nx-libs-9ea88717db376b54b2c821ab67e846918acc616a.zip
Make WriteEventsToClient/WriteToClient no-op on fake or dead clients.
This matches the test in TryClientEvents, and is a superset of tests done by the callers of these functions. The consequence of forgetting these tests is a server crash, so they're always desirable. In my opinion, it's better to not require the callers to remember to do these checks. For callers that don't do very much work before calling WriteToClient or WriteEventsToClient, I've removed the redundant checks. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=27497 Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Backport to nx-libs: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Diffstat (limited to 'nx-X11/programs/Xserver/xfixes')
-rwxr-xr-xnx-X11/programs/Xserver/xfixes/cursor.c3
-rwxr-xr-xnx-X11/programs/Xserver/xfixes/select.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/nx-X11/programs/Xserver/xfixes/cursor.c b/nx-X11/programs/Xserver/xfixes/cursor.c
index 29c6061d6..747471e18 100755
--- a/nx-X11/programs/Xserver/xfixes/cursor.c
+++ b/nx-X11/programs/Xserver/xfixes/cursor.c
@@ -96,8 +96,7 @@ CursorDisplayCursor (ScreenPtr pScreen,
CursorCurrent = pCursor;
for (e = cursorEvents; e; e = e->next)
{
- if ((e->eventMask & XFixesDisplayCursorNotifyMask) &&
- !e->pClient->clientGone)
+ if ((e->eventMask & XFixesDisplayCursorNotifyMask))
{
xXFixesCursorNotifyEvent ev;
ev.type = XFixesEventBase + XFixesCursorNotify;
diff --git a/nx-X11/programs/Xserver/xfixes/select.c b/nx-X11/programs/Xserver/xfixes/select.c
index 2a20bfe87..540499518 100755
--- a/nx-X11/programs/Xserver/xfixes/select.c
+++ b/nx-X11/programs/Xserver/xfixes/select.c
@@ -79,8 +79,7 @@ XFixesSelectionCallback (CallbackListPtr *callbacks, void * data, void * args)
for (e = selectionEvents; e; e = e->next)
{
if (e->selection == selection->selection &&
- (e->eventMask & eventMask) &&
- !e->pClient->clientGone)
+ (e->eventMask & eventMask))
{
xXFixesSelectionNotifyEvent ev;