1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-05 17:28:47 +00:00
Commit Graph

96 Commits

Author SHA1 Message Date
Rémi Bernon
5d91ab65fa server: Avoid removing thread twice from its desktop thread list. 2024-03-21 22:19:58 +01:00
Rémi Bernon
28c52d4ac3 server: Remove desktop from their winstation list before looking for another input desktop. 2024-03-08 17:40:03 +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
Zhiyi Zhang
ca97cb8700 server: Inherit internal desktop flags when creating desktops.
Based on Rémi's idea.

CEF applications create their own desktops and so is_virtual_desktop() could incorrectly
report that virtual desktop is off if DF_WINE_VIRTUAL_DESKTOP is not inherited.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55810
2024-02-13 22:37:50 +01:00
Zhiyi Zhang
2990a4f8c3 include: Rename DF_WINE_CREATE_DESKTOP to DF_WINE_VIRTUAL_DESKTOP. 2024-02-13 22:37:50 +01:00
Rémi Bernon
f4cb3230d8 server: Update the DF_WINE_CREATE_DESKTOP desktop flag on opening.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55047
2023-06-15 22:10:51 +02: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
Alexandre Julliard
1381be977b server: Add sys/types.h include in a few more files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-11 11:44:02 +02:00
Alexandre Julliard
c954e5b9e6 server: Avoid using wine/port.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-07 18:03:11 +02: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
Alexandre Julliard
584427fc89 server: Avoid redefining the DuplicateHandle() constants.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 21:20:47 +01:00
Alexandre Julliard
d6ef9401b3 server: Use the object type information to implement access mapping.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 22:53:46 +01:00
Alexandre Julliard
4d646de90d server: Add generic mapping masks for all object types.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 15:38:22 +01:00
Alexandre Julliard
c6f2aacb57 server: Add a type descriptor to all server objects.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-04 21:25:32 +01:00
Paul Gofman
ae106feed2 server: Do not dereference symlinks specified as root directory.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:38 +01:00
Zebediah Figura
fa1b0fcf6c server: Check duplicated handle access against the calling thread token and target process token.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 15:22:36 +02:00
Alexandre Julliard
2e51f9aae3 server: Add an object operation to retrieve an object name.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 16:55:08 +02:00
Huw Davies
aec5ccfc06 server: Don't allow an empty desktop name.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-24 18:34:15 +02:00
Alexandre Julliard
7b41b7510f server: Add a helper function for splitting a path into individual elements.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-24 19:43:38 +01: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
Jacek Caban
b2a546c92d server: Introduce kernel_object struct for generic association between server and kernel objects.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:55:15 +01:00
Alexandre Julliard
3ea7f7d2f4 server: Set the security descriptor at object creation.time.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-12 23:07:30 +09:00
Alexandre Julliard
ff9d90bbb0 server: Use a standard object for object attribute roots instead of a directory.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-12 23:07:30 +09:00
Alexandre Julliard
7ad32cf56a server: Allow lookup_name to distinguish the case of an empty path.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 20:36:16 +09:00
Alexandre Julliard
7a5b14d456 server: Add a function to open a named object inside any parent, not only directories.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-08 16:55:00 +09:00
Alexandre Julliard
0458a7d0e3 server: Use the lookup_name operation when creating a named object.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-08 14:24:15 +09:00
Alexandre Julliard
e2ccc978a3 server: Implement the lookup_name operation for window stations.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-08 14:10:39 +09:00
Alexandre Julliard
b21a324070 server: Use the link_name operation to create named objects.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-05 00:20:01 +09:00
Alexandre Julliard
f55db7882d server: Add link_name and unlink_name object operations.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-04 21:07:19 +09:00
Alexandre Julliard
a69d7b29e3 server: Don't return an error if the created window station already exists.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-02 21:47:56 +09:00
Alexandre Julliard
34d5994953 user32: Add some tests for window station and desktop object names.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-01 17:53:35 +09:00
Alexandre Julliard
008f14f03f server: Directly return a structure in get_req_unicode_str().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-29 21:25:12 +09:00
Alexandre Julliard
ed268bbf91 server: Use a common helper function to implement open object calls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-29 21:25:12 +09:00
Sebastian Lackner
df39830846 server: Fix invalid memory accesss caused by destroying winstation before desktop.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-22 16:40:30 +09:00
Alexandre Julliard
d15f47412e server: Always print the full path of objects when dumping them.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-22 01:26:15 +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
Alexandre Julliard
546289dc59 server: Create window stations objects in a standard directory.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-20 22:02:03 +09:00
Sebastian Lackner
19a3f6b5cb user32: Make sure explorer.exe process is spawned for the correct desktop.
If an invalid combination of winstation/desktop is active for the
current process, the handle inheritance doesn't work, and no desktop is
created.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-04 13:22:55 +09:00
Qian Hong
ca4b3f0f73 server: Fixed winstation object leak in open_input_desktop. 2013-11-11 13:27:27 +01:00
Qian Hong
f7835dea2d user32: Implement OpenInputDesktop. 2013-11-08 16:29:44 +01:00
Alexandre Julliard
be417d6890 server: When changing a process desktop, start the close timeout on the old desktop if necessary. 2013-04-30 18:44:46 +02:00
Vincent Povirk
4c83138f72 server: Implement RegisterHotKey/UnregisterHotKey. 2011-06-21 14:51:08 +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
c64c36f573 server: Store all desktop cursor information in a separate structure. 2011-03-31 19:54:22 +02:00
Alexandre Julliard
06b78feade server: Store the global key state in the server. 2011-02-25 13:50:25 +01:00