]> git.pld-linux.org Git - packages/xorg-lib-libX11.git/blob - revert-update-xputbackevent.patch
upstream revert for change causing regressions; rel 2
[packages/xorg-lib-libX11.git] / revert-update-xputbackevent.patch
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
5  back unpadded events"
6
7 This reverts commit d6d6cba90215d323567fef13d6565756c9956f60.
8
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.
14
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.
19
20 Fixes: #176 #174
21
22 Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
23 ---
24  src/PutBEvent.c | 15 +--------------
25  1 file changed, 1 insertion(+), 14 deletions(-)
26
27 diff --git a/src/PutBEvent.c b/src/PutBEvent.c
28 index 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 -- 
56 GitLab
57
This page took 0.096607 seconds and 3 git commands to generate.