1 From 88399e01be679bfcc9a5e8922ffe2c47f0e56dee Mon Sep 17 00:00:00 2001
2 From: Yuxuan Shui <yshuiv7@gmail.com>
3 Date: Tue, 3 Jan 2023 15:09:28 +0000
4 Subject: [PATCH] Revert "Update XPutBackEvent() to support clients that put
7 This reverts commit d6d6cba90215d323567fef13d6565756c9956f60.
9 The reverted commit intended to fix the problem where an unpadded X
10 event struct is passed into XPutBackEvent, by creating a padded struct
11 with _XEventToWire and _XWireToEvent. However, _XWireToEvent updates the
12 last sequence number in Display, which may cause xlib to complain about
13 lost sequence numbers.
15 IMO, the problem that commit tried to solve is a bug in the client
16 library, and workaround it inside Xlib is bad practice, especially given
17 the problem it caused. Plus, the offender cited in the original commit
18 message, freeglut, has already fixed this problem.
22 Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
24 src/PutBEvent.c | 15 +--------------
25 1 file changed, 1 insertion(+), 14 deletions(-)
27 diff --git a/src/PutBEvent.c b/src/PutBEvent.c
28 index f7b74b31..0f9df342 100644
31 @@ -79,22 +79,9 @@ XPutBackEvent (
32 register XEvent *event)
37 - Status (*fp)(Display *, XEvent *, xEvent *);
38 - int type = event->type & 0177;
41 - fp = dpy->wire_vec[type];
44 - ret = (*fp)(dpy, event, &wire);
47 - ret = (*dpy->event_vec[type])(dpy, &lib, &wire);
49 - ret = _XPutBackEvent(dpy, &lib);
51 + ret = _XPutBackEvent(dpy, event);