Mike Gabriel pushed to branch master at Debian and Ubuntu MATE Packaging Team / onboard
Commits:
-
db9b303a
by Mike Gabriel at 2024-07-15T14:33:31+00:00
-
b73ae315
by Mike Gabriel at 2024-07-15T14:39:46+00:00
3 changed files:
Changes:
| 1 | +onboard (1.4.1-8) unstable; urgency=medium
|
|
| 2 | + |
|
| 3 | + * debian/patches:
|
|
| 4 | + + Add 1012_thread-state.patch cherry-picked from Voidlinux. Wrap device
|
|
| 5 | + events into PyGILState_Ensure / PyGILState_Release. (Closes: #1076120).
|
|
| 6 | + |
|
| 7 | + -- Mike Gabriel <sunweaver@debian.org> Mon, 15 Jul 2024 14:36:23 +0000
|
|
| 8 | + |
|
| 1 | 9 | onboard (1.4.1-7) unstable; urgency=medium
|
| 2 | 10 | |
| 3 | 11 | [ Jeremy Bícha ]
|
| 1 | +Author: sgn
|
|
| 2 | +Description: Wrap device events into PyGILState_Ensure / PyGILState_Release
|
|
| 3 | +Origin: https://github.com/void-linux/void-packages/blob/cee826ffd36d3c9f6c1e326a3b6cfd9696953cbe/srcpkgs/onboard/patches/thread-state.patch
|
|
| 4 | + |
|
| 5 | +--- a/Onboard/osk/osk_devices.c
|
|
| 6 | ++++ b/Onboard/osk/osk_devices.c
|
|
| 7 | +@@ -97,13 +97,15 @@ osk_device_event_dealloc (OskDeviceEvent
|
|
| 8 | + static OskDeviceEvent*
|
|
| 9 | + new_device_event (void)
|
|
| 10 | + {
|
|
| 11 | +- OskDeviceEvent *ev = PyObject_New(OskDeviceEvent, &osk_device_event_type);
|
|
| 12 | ++ OskDeviceEvent *ev;
|
|
| 13 | ++ PyGILState_STATE gstate = PyGILState_Ensure();
|
|
| 14 | ++ ev = PyObject_New(OskDeviceEvent, &osk_device_event_type);
|
|
| 15 | + if (ev)
|
|
| 16 | + {
|
|
| 17 | + osk_device_event_type.tp_init((PyObject*) ev, NULL, NULL);
|
|
| 18 | +- return ev;
|
|
| 19 | + }
|
|
| 20 | +- return NULL;
|
|
| 21 | ++ PyGILState_Release(gstate);
|
|
| 22 | ++ return ev;
|
|
| 23 | + }
|
|
| 24 | +
|
|
| 25 | + static PyObject *
|
|
| 26 | +@@ -334,6 +336,7 @@ osk_devices_dealloc (OskDevices *dev)
|
|
| 27 | + static void
|
|
| 28 | + queue_event (OskDevices* dev, OskDeviceEvent* event, Bool discard_pending)
|
|
| 29 | + {
|
|
| 30 | ++ PyGILState_STATE state = PyGILState_Ensure ();
|
|
| 31 | + GQueue* queue = dev->event_queue;
|
|
| 32 | + if (queue)
|
|
| 33 | + {
|
|
| 34 | +@@ -364,6 +367,7 @@ queue_event (OskDevices* dev, OskDeviceE
|
|
| 35 | + Py_INCREF(event);
|
|
| 36 | + g_queue_push_head(queue, event);
|
|
| 37 | + }
|
|
| 38 | ++ PyGILState_Release (state);
|
|
| 39 | + }
|
|
| 40 | +
|
|
| 41 | + static gboolean idle_process_event_queue (OskDevices* dev) |
| ... | ... | @@ -11,3 +11,4 @@ |
| 11 | 11 | 2001_drop-gui-test.patch
|
| 12 | 12 | 2002_drop-dbus-test.patch
|
| 13 | 13 | 1011_python-distutils-byebye.patch
|
| 14 | +1012_thread-state.patch |