Module: wine Branch: master Commit: c1d5cae54b80449308dd8f9aaa85a1a6a5bd2025 URL: https://gitlab.winehq.org/wine/wine/-/commit/c1d5cae54b80449308dd8f9aaa85a1a...
Author: Rémi Bernon rbernon@codeweavers.com Date: Wed Jul 10 10:01:00 2024 +0200
server: Use a shared_object_t for the dummy object.
The sequence lives in the object header, and the object is containing the shm struct. The code was reading before the dummy_shm variable and sometimes asserted that the sequence isn't initialized to zero.
---
server/queue.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/server/queue.c b/server/queue.c index 9ccd93c4280..ee03ceb55c8 100644 --- a/server/queue.c +++ b/server/queue.c @@ -624,11 +624,12 @@ void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect, unsig /* change the foreground input and reset the cursor clip rect */ static void set_foreground_input( struct desktop *desktop, struct thread_input *input ) { - const input_shm_t *input_shm, *old_input_shm, dummy_shm = {0}; + const input_shm_t *input_shm, *old_input_shm; + shared_object_t dummy_obj = {0};
if (desktop->foreground_input == input) return; - input_shm = input ? input->shared : &dummy_shm; - old_input_shm = desktop->foreground_input ? desktop->foreground_input->shared : &dummy_shm; + input_shm = input ? input->shared : &dummy_obj.shm.input; + old_input_shm = desktop->foreground_input ? desktop->foreground_input->shared : &dummy_obj.shm.input;
set_clip_rectangle( desktop, NULL, SET_CURSOR_NOCLIP, 1 ); desktop->foreground_input = input;