Commit Graph

77 Commits

Author SHA1 Message Date
Jacek Caban 10f38c0600 winex11: Move user driver to unixlib.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-06 19:18:22 +02:00
Jacek Caban 6dd08c34dc winex11: Use wcsicmp for string comparison.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-06 19:18:22 +02:00
Jacek Caban 4af9ac6733 winex11: Directly use win32u in more places.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-05 18:35:12 +02:00
Jacek Caban 0062917fdf winex11: Move create_desktop implementation to dllmain.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-04 21:27:25 +02:00
Jacek Caban ef8e4b7e3e winex11: Use libc for driver memory allocation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-25 20:34:55 +02:00
Jacek Caban 262831bc63 winex11: Directly use win32u in more places.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-15 20:54:36 +02:00
Jacek Caban 523a6eba02 winex11: Remove no longer needed helpers.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-13 18:13:34 +02:00
Jacek Caban b502a3e3c6 winex11.drv: Use gdi driver types for display device handler.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-30 22:07:21 +01:00
Eduard Permyakov dedda40e5d winex11.drv: Add 'EDID' registry key to every monitor device.
Extended display identification data (EDID) is a set of data that
is provided by a display to describe its capabilities to a graphics
adapter. EDID data allows a computer to detect the type of monitor
that is connected to it. EDID data includes the manufacturer name,
the product type, the timings that are supported by the display, the
display size, as well as other display characteristics. EDID is
defined by a standard published by the Video Electronics Standards
Association (VESA).

In Windows, every display device has an associated 'EDID' registry
key containing this data. Applications can read and parse it to get
the display capabilities. In Linux, we can get each monitor's EDID
using the RANDR X extension.

This patch fixes, for example, monitor detection in the UE-based game
'Industries of Titan'.

Signed-off-by: Eduard Permyakov <epermyakov@codeweavers.com>
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:35:34 +02:00
Zhiyi Zhang aadae4d1ea winex11.drv: Report a GPU same as the host primary GPU in virtual desktop mode.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49631
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 21:38:38 +02:00
Zhiyi Zhang 2a6de8d7f7 winex11.drv: Remove the old virtual desktop display settings handler.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 23:21:14 +02:00
Zhiyi Zhang 6f305dd881 winex11.drv: Support setting virtual desktop display mode using the new display settings handler interface.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 23:21:14 +02:00
Zhiyi Zhang 0b0ac41981 winex11.drv: Support virtual desktop display mode enumeration using the new display settings handler interface.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 23:21:14 +02:00
Zhiyi Zhang dd13b27410 winex11.drv: Migrate the virtual desktop display settings handler to a new interface.
The old display settings handler interface can only support one adapter.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 23:21:14 +02:00
Zhiyi Zhang 6436600db5 winex11.drv: Allow reporting a virtual desktop mode with the same width or height as the current mode.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-23 23:21:14 +02:00
Zhiyi Zhang 26b26a2e0e winex11.drv: Move update_windows_on_desktop_resize().
Move update_windows_on_desktop_resize() to be in X11DRV_DisplayDevices_Update()
and rename it to update_windows_on_display_change(), which is a more appropriate
name because the desktop is unnecessarily resized when display devices change.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-12 23:10:22 +02:00
Zhiyi Zhang fd6f50c0d3 winex11.drv: Resize desktop upon display change events.
Otherwise, Wine still has the old desktop size after a user changed
display resolution using host system utilities.

X11DRV_DisplayDevices_Update() is introduced so that display devices
reinitialization is separated from desktop resizing. Otherwise,
X11DRV_DisplayDevices_Init() would have to be called twice to resize
the desktop with up-to-date primary monitor dimensions, wasting resources.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48441
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-12 23:10:18 +02:00
Zhiyi Zhang 2538b0100f winex11.drv: Calculate mask in X11DRV_resize_desktop().
Calculate XReconfigureWMWindow() mask in X11DRV_resize_desktop()
instead of doing it in EnumWindows() callback update_windows_on_desktop_resize()
because the result is the same anyway.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-10 23:24:06 +01:00
Zhiyi Zhang b7b4bacaf9 winex11.drv: Move the desktop fullscreen check after desktop init.
After 25167fb286, get_primary_monitor_rect(),
which is used in is_window_rect_fullscreen(), may return the primary
screen size set by the last explorer instance if wineserver didn't
fully shuts down. Also get_primary_monitor_rect() no longer reports the
host primary monitor rect before virtual desktop initialization now.
So move the desktop fullscreen check after desktop initialization
so that primary screen size is updated and valid.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 17:30:58 +01:00
Zhiyi Zhang acf03ed9da winex11.drv: Get virtual desktop size limit from the host primary display.
After 25167fb286, get_primary_monitor_rect()
maybe invalid before display device initialization or returns the desktop
rectangle after desktop initialization in virtual desktop mode, which is
wrong. The desktop size limit should come from host system.

This fixes a regression from efbbe66669.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47815
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 17:30:53 +01:00
Zhiyi Zhang 914b5519b1 winex11.drv: Use a separate virtual desktop display device handler.
If we want to query host monitor dimensions, we need to use XRandR
or Xinerama handler. However when in virtual desktop mode, its display
device handler overrides other handlers. So we need to separate them.
Then we can implement features that require host monitor dimensions like
checking whether the virtual desktop window is fullscreen.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 17:30:50 +01:00
Zhiyi Zhang 99d047724e winex11.drv: Introduce is_virtual_desktop().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 17:30:48 +01:00
Zhiyi Zhang efbbe66669 winex11.drv: Initialize display devices before getting primary desktop rectangle.
Otherwise, the retrieved primary desktop might be from the last explorer instance
if we launch new explorer instances before wine server fully shuts down.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-23 19:44:18 +02:00
Zhiyi Zhang 074abfe097 winex11.drv: Use generic EnumDisplayMonitors.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-25 13:22:17 +02:00
Zhiyi Zhang 7f57cda707 winex11.drv: Handle display device changes.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-13 08:21:00 +02:00
Alexandre Julliard 9f8049105d explorer: Move the check for the magic root desktop to the X11 driver.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 16:43:18 +01:00
Michael Stefaniuc 3e9ce1c26f winex11.drv: Avoid ARRAY_SIZE-like macros.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-09 10:49:14 +02:00
Miklós Máté cd4139df3c winex11: Improve the desktop resolution list.
Signed-off-by: Miklós Máté <mtmkls@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-26 06:30:28 +02:00
Jarkko Korpi be139063e4 winex11.drv: Add 640x400 mode to virtual desktop.
Signed-off-by: Jarkko Korpi <jarkko_korpi@hotmail.com>=
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-17 21:48:19 +01:00
Michael Müller b49601b5ce winex11: Add 320x240 as supported resolution in desktop mode.
Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-07 15:04:03 +09:00
Miklós Máté c0219a7384 winex11: Add 1280x960 resolution.
This enables high resolution setting in Anachronox, when Wine is configured
to emulate a virtual desktop. The game only supports 640x480 and 1280x960.

Signed-off-by: Miklós Máté <mtmkls@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-25 22:45:09 +09:00
Henri Verbeet 60a7cb6633 winex11: Get rid of the unused "old_screen_rect" field from struct desktop_resize_data.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-20 12:08:06 +09:00
Frédéric Delanoy 323bec99b3 winex11.drv: Use BOOL type where appropriate. 2013-11-29 13:32:46 +01:00
Alexandre Julliard 13149b67d3 explorer: Create the driver desktop window after the window handle is created. 2013-10-16 12:13:50 +02:00
Alexandre Julliard 0f03f264b7 winex11: Add a helper function to return the primary monitor rectangle. 2013-10-14 17:26:14 +02:00
Alexandre Julliard 9f1f29cc91 winex11: Add a helper function to return the virtual screen rectangle. 2013-10-14 17:26:14 +02:00
Alexandre Julliard 0b71e0bf12 winex11: Add helper functions for converting between root and virtual screen coords. 2013-10-14 17:26:13 +02:00
Alexandre Julliard a73c5d5c81 explorer: Return a simple boolean instead of a window in the wine_create_desktop entry point. 2013-02-06 12:50:04 +01:00
Alexandre Julliard 8dcbeff760 winex11: Add support for per-window visuals. 2012-10-02 14:08:37 +02:00
Alexandre Julliard 988f2fde86 winex11: Store the full visual info for the default visual. 2012-09-26 14:40:39 +02:00
Alexandre Julliard 313157a036 winex11: Add window data structure locking to the remaining entry points. 2012-09-24 22:27:27 +02:00
Alexandre Julliard ba926faf91 winex11: Store the window display connection in the window structure. 2012-09-21 16:29:24 +02:00
Alexandre Julliard cf1be58706 winex11: Remove the remaining X11 locking calls. 2012-08-16 16:48:00 +02:00
Alexandre Julliard 6bfcb347bf winex11: Remove X11 locking around simple X calls. 2012-08-14 15:13:08 +02:00
Henri Verbeet 292869b969 winex11: Explicitly clear virtual desktop maximized state. 2012-08-13 16:28:50 +02:00
Henri Verbeet 13820b6f94 winex11: Don't set MWM decorations either for fullscreen virtual desktops. 2012-08-13 16:28:50 +02:00
Henri Verbeet 401d12085b winex11: Fix the virtual desktop check in update_desktop_fullscreen(). 2012-07-13 10:31:52 -05:00
Henri Verbeet 3ea8de2637 winex11: Use our own structure for mode information. 2012-07-03 14:57:07 +02:00
Alexandre Julliard b081ee452d winex11: Only update the fullscreen pointer grab when something has changed. 2011-05-12 16:24:58 +02:00
Alexandre Julliard a59c7cc859 winex11: Automatically clip the pointer when the foreground window is full-screen. 2011-05-11 14:55:57 +02:00