]> git.pld-linux.org Git - packages/xorg-lib-libX11.git/blame - revert-update-xputbackevent.patch
upstream revert for change causing regressions; rel 2
[packages/xorg-lib-libX11.git] / revert-update-xputbackevent.patch
CommitLineData
5ac56288
JP
1From 88399e01be679bfcc9a5e8922ffe2c47f0e56dee Mon Sep 17 00:00:00 2001
2From: Yuxuan Shui <yshuiv7@gmail.com>
3Date: Tue, 3 Jan 2023 15:09:28 +0000
4Subject: [PATCH] Revert "Update XPutBackEvent() to support clients that put
5 back unpadded events"
6
7This reverts commit d6d6cba90215d323567fef13d6565756c9956f60.
8
9The reverted commit intended to fix the problem where an unpadded X
10event struct is passed into XPutBackEvent, by creating a padded struct
11with _XEventToWire and _XWireToEvent. However, _XWireToEvent updates the
12last sequence number in Display, which may cause xlib to complain about
13lost sequence numbers.
14
15IMO, the problem that commit tried to solve is a bug in the client
16library, and workaround it inside Xlib is bad practice, especially given
17the problem it caused. Plus, the offender cited in the original commit
18message, freeglut, has already fixed this problem.
19
20Fixes: #176 #174
21
22Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
23---
24 src/PutBEvent.c | 15 +--------------
25 1 file changed, 1 insertion(+), 14 deletions(-)
26
27diff --git a/src/PutBEvent.c b/src/PutBEvent.c
28index f7b74b31..0f9df342 100644
29--- a/src/PutBEvent.c
30+++ b/src/PutBEvent.c
31@@ -79,22 +79,9 @@ XPutBackEvent (
32 register XEvent *event)
33 {
34 int ret;
35- xEvent wire = {0};
36- XEvent lib = {0};
37- Status (*fp)(Display *, XEvent *, xEvent *);
38- int type = event->type & 0177;
39
40 LockDisplay(dpy);
41- fp = dpy->wire_vec[type];
42- if (fp == NULL)
43- fp = _XEventToWire;
44- ret = (*fp)(dpy, event, &wire);
45- if (ret)
46- {
47- ret = (*dpy->event_vec[type])(dpy, &lib, &wire);
48- if (ret)
49- ret = _XPutBackEvent(dpy, &lib);
50- }
51+ ret = _XPutBackEvent(dpy, event);
52 UnlockDisplay(dpy);
53 return ret;
54 }
55--
56GitLab
57
This page took 0.038221 seconds and 4 git commands to generate.