Commit graph

101 commits

Author SHA1 Message Date
Rémi Bernon ae5a02e808 server: Update the active hooks bitmaps when hooks are added / removed. 2024-06-26 17:00:18 +02:00
Rémi Bernon 534aff4a63 server: Use a separate variable to determine the message on Alt release.
Based on a patch by Huw Davies.
2024-06-21 22:59:39 +02:00
Rémi Bernon 472ce7fd1d server: Get rid of the global cursor structure.
Based on a patch by Huw Davies.
2024-06-21 22:59:39 +02:00
Rémi Bernon 496f663157 server: Store the cursor clip rect in the shared data.
Based on a patch by Huw Davies.
2024-06-21 22:59:39 +02:00
Rémi Bernon 5488d99b3e server: Move the last cursor time to the desktop session object.
Based on a patch by Huw Davies.
2024-06-20 23:03:26 +02:00
Rémi Bernon 728049d6fa server: Move the cursor position to the desktop session object.
Based on a patch by Huw Davies.
2024-06-20 23:03:26 +02:00
Rémi Bernon 1e10e3a1c0 server: Allocate shared session object for desktops. 2024-06-20 23:03:26 +02:00
Alexandros Frantzis 37e7038c5c server: Implement key auto-repeat request. 2024-06-07 21:00:10 +02:00
Alexandros Frantzis bf1da68aaa server: Pass desktop to get_first_global_hook. 2024-06-07 21:00:10 +02:00
Rémi Bernon 9ec501141e server: Avoid calling set_event from within msg_queue_add_queue. 2024-06-05 22:01:22 +02:00
Rémi Bernon 1604d8a202 server: Send WM_WINE_CLIPCURSOR message only when necessary. 2024-03-21 22:19:58 +01:00
Rémi Bernon 61d1c18957 server: Add support for sending and receiving WM_POINTER* messages. 2024-03-05 20:50:07 +01:00
Rémi Bernon c43b1ecbc3 server: Keep a list of processes that can receive rawinput messages. 2024-02-28 19:51:20 +01:00
Rémi Bernon f7303cf7b6 server: Keep a list of threads connected to each desktop. 2024-02-28 19:51:20 +01:00
Rémi Bernon 496eed7aaf server: Send hardware input to the visible input desktop.
When hwnd is specified, it is because it received a direct host input,
so switch the input desktop to match the one that is receiving it.

We don't validate that the sending thread uses the same desktop as the
target window: it may not even be the case for drivers with a separate
thread that listens on input events.
2024-02-28 19:51:20 +01:00
Rémi Bernon a1d63d109d server: Keep track of the winstation input desktop. 2024-02-28 19:51:20 +01:00
Rémi Bernon 74bf784b29 server: Use the startup info to connect the process winstation.
This changes the todos in the tests as it fixes the thread input not
being attached, but then exposes a different todo.
2024-02-23 17:11:00 +01:00
Rémi Bernon d1789fbb40 server: Change desktop cursor only when inside the thread's windows.
Getting rid of the desktop cursor handle at the same time.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55961
2023-12-21 18:39:04 +01:00
Rémi Bernon ab9b99c4a5 server: Pass set_cursor flags in WM_WINE_CLIPCURSOR wparam.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55047
2023-06-16 21:35:58 +02:00
Rémi Bernon b04ef19930 server: Keep track of the current desktop cursor handle. 2023-06-13 22:10:56 +02:00
Rémi Bernon 5ebb1ed132 server: Queue a hardware WM_WINE_CLIPCURSOR message to the foreground thread.
When applying a new cursor clipping rect, or to the previous foreground
thread when foreground changes, to notify it of the cursor clipping rect
being reset.
2023-06-07 22:48:27 +02:00
Rémi Bernon 2101d4d6ad server: Use the helper to reset the clip rect when the desktop size changes. 2023-06-07 22:48:27 +02:00
Rémi Bernon 61dbfea452 server: Assume the internal clip message to be WM_WINE_CLIPCURSOR. 2023-05-30 12:25:25 +02:00
Jinoh Kang 17e6ef6d7e server: Correctly expose composited parent window and its child on position change.
Skip redrawing the composited child window when the window rect and
visible region stays the same, since we're taking the union of the old
and new visible regions.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53153
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
2022-11-04 19:23:56 +01:00
Jacek Caban 5b56bad50b server: Make window struct a server object.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-09 18:37:32 +01:00
Rémi Bernon 769a2616ae server: Track desktop users per thread instead of per process.
As some thread may use a different desktop from their process.

This fixes the user32 win tests, which leaks a desktop that never gets
closed. The test_shell_window test creates a new desktop, which spawns
explorer.exe process, incrementing the desktop user count to 1, then
associates the desktop to a thread, which closes it on exit.

Never the user count is incremented to 2, and closing the thread desktop
doesn't either check whether the desktop process should be terminated.

Reversely, it is possible to create a desktop, associate it with a
thread /and/ a process, and this time the desktop process would be
terminated when the process exits, although the thread may still be
using it.

Tracking the users per thread is more robust and fixes the problem as
set_thread_desktop increments the desktop user count, and thread exit
decrements it.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-21 21:00:33 +02:00
Paul Gofman 74a74556dd server: Support creating processes with specified parent.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47817
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 13:13:36 +01:00
Alexandre Julliard 8698b600c6 server: Map region to the window DPI in redraw_region().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-24 20:12:05 +02:00
Alexandre Julliard c5a6925676 user32: Scale coordinates in WIN_GetRectangles() based on DPI awareness.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-24 20:12:05 +02:00
Alexandre Julliard d3876ca84e server: Add a couple of rectangle helper functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-05 19:08:34 +02:00
Alexandre Julliard 70dd64cf97 server: Add a helper function to validate a window handle.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-30 18:08:36 +09:00
Alexandre Julliard c6f12bd9cc server: Notify all listeners when the contents of the clipboard have changed.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-30 16:33:04 +09:00
Alexandre Julliard 5962df3a1e server: Cleanup clipboard information upon window destruction.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-24 00:16:43 +09:00
Alexandre Julliard fcc977c139 server: Store the desktop object names inside their window station.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-20 22:40:58 +09:00
Piotr Caban 3f1bbdcae3 server: Send mouse hardware messages to thread owning top-most window.
Also don't limit mouse message scope to top-most window when message
comes from SendInput or window that generated the event is
minimized/transparent.
2014-10-17 17:51:52 +09:00
Piotr Caban de21941178 user32: Change SetForegroundWindow behavior on windows with parent and no WS_CHILD flag. 2014-03-27 16:18:05 +01:00
Vincent Povirk 4c83138f72 server: Implement RegisterHotKey/UnregisterHotKey. 2011-06-21 14:51:08 +02:00
Alexandre Julliard 3909f51122 server: Don't queue a hardware WM_MOUSEMOVE if the position hasn't changed. 2011-04-06 21:07:04 +02:00
Alexandre Julliard 21e86f60ec server: Post a message to the desktop window when the cursor clip rectangle changes. 2011-04-05 13:36:57 +02:00
Alexandre Julliard 85358b10f3 server: Add a more general way of posting messages to the desktop window. 2011-04-05 13:36:56 +02:00
Alexandre Julliard 6576703fac server: Return the time of last change along with the current cursor position. 2011-03-31 20:15:56 +02:00
Alexandre Julliard c64c36f573 server: Store all desktop cursor information in a separate structure. 2011-03-31 19:54:22 +02:00
Alexandre Julliard c7efa293f0 server: Invoke low-level hardware hooks directly from the server side. 2011-03-02 21:26:13 +01:00
Alexandre Julliard 06b78feade server: Store the global key state in the server. 2011-02-25 13:50:25 +01:00
Alexandre Julliard 02e8174067 server: Store the cursor clip rectangle in the server. 2011-02-25 13:50:19 +01:00
Alexandre Julliard 183c41b49a server: Store the global cursor position in the server. 2011-02-25 11:25:15 +01:00
Alexandre Julliard ac4aac747c server: Make the foreground thread input per-desktop instead of global. 2011-02-25 11:19:46 +01:00
Alexandre Julliard d56ac06260 server: Mirror the window region for RTL windows in get/set_window_region and redraw_window. 2010-09-27 21:07:11 +02:00
Dmitry Timoshkov 66e981ec8d server: Make layered windows transparent for mouse messages. 2010-06-11 14:16:03 +02:00
Alexandre Julliard 538b24747c server: Free client-side user handles at process exit. 2009-10-15 17:56:04 +02:00