From b5320c2d2cf7dd657408f5ea5302431784950b3a Mon Sep 17 00:00:00 2001 From: Rmys Date: Mon, 23 Jan 2023 00:26:56 +0300 Subject: [PATCH] libX11 rebuild --- .../0001-Revert_Update_XPutBackEvent.diff | 57 +++++++++++++++++++ system/base/libX11/pspec.xml | 10 +++- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 system/base/libX11/files/0001-Revert_Update_XPutBackEvent.diff diff --git a/system/base/libX11/files/0001-Revert_Update_XPutBackEvent.diff b/system/base/libX11/files/0001-Revert_Update_XPutBackEvent.diff new file mode 100644 index 00000000..d249457b --- /dev/null +++ b/system/base/libX11/files/0001-Revert_Update_XPutBackEvent.diff @@ -0,0 +1,57 @@ +From 88399e01be679bfcc9a5e8922ffe2c47f0e56dee Mon Sep 17 00:00:00 2001 +From: Yuxuan Shui +Date: Tue, 3 Jan 2023 15:09:28 +0000 +Subject: [PATCH] Revert "Update XPutBackEvent() to support clients that put + back unpadded events" + +This reverts commit d6d6cba90215d323567fef13d6565756c9956f60. + +The reverted commit intended to fix the problem where an unpadded X +event struct is passed into XPutBackEvent, by creating a padded struct +with _XEventToWire and _XWireToEvent. However, _XWireToEvent updates the +last sequence number in Display, which may cause xlib to complain about +lost sequence numbers. + +IMO, the problem that commit tried to solve is a bug in the client +library, and workaround it inside Xlib is bad practice, especially given +the problem it caused. Plus, the offender cited in the original commit +message, freeglut, has already fixed this problem. + +Fixes: #176 #174 + +Signed-off-by: Yuxuan Shui +--- + src/PutBEvent.c | 15 +-------------- + 1 file changed, 1 insertion(+), 14 deletions(-) + +diff --git a/src/PutBEvent.c b/src/PutBEvent.c +index f7b74b31..0f9df342 100644 +--- a/src/PutBEvent.c ++++ b/src/PutBEvent.c +@@ -79,22 +79,9 @@ XPutBackEvent ( + register XEvent *event) + { + int ret; +- xEvent wire = {0}; +- XEvent lib = {0}; +- Status (*fp)(Display *, XEvent *, xEvent *); +- int type = event->type & 0177; + + LockDisplay(dpy); +- fp = dpy->wire_vec[type]; +- if (fp == NULL) +- fp = _XEventToWire; +- ret = (*fp)(dpy, event, &wire); +- if (ret) +- { +- ret = (*dpy->event_vec[type])(dpy, &lib, &wire); +- if (ret) +- ret = _XPutBackEvent(dpy, &lib); +- } ++ ret = _XPutBackEvent(dpy, event); + UnlockDisplay(dpy); + return ret; + } +-- +GitLab + diff --git a/system/base/libX11/pspec.xml b/system/base/libX11/pspec.xml index ba9c9db7..68d8cfa3 100644 --- a/system/base/libX11/pspec.xml +++ b/system/base/libX11/pspec.xml @@ -22,8 +22,9 @@ xmlto + 0001-Revert_Update_XPutBackEvent.diff 176.diff - 177.diff + @@ -75,6 +76,13 @@ + + 2023-01-22 + 1.8.3 + Rebuild + Mustafa Cinasal + muscnsl@gmail.com + 2022-12-19 1.8.3