Commit Graph

2185 Commits

Author SHA1 Message Date
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
Brendan Shanks 3a3c7cbd20 winex11.drv: Retrieve PCI IDs and device name from Vulkan.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-07 19:24:27 +02:00
Zhiyi Zhang 59c206f9dc winex11.drv: Use _GTK_WORKAREAS to get work areas if it is available.
_NET_WORKAREA reports a single rectangle as intersected work areas of
all monitors. So work areas on non-primary monitors may be incorrect.
For example, a dock only shown on the primary monitor reduces the work
areas on non-primary monitors.

There were attempts to extend _NET_WORKAREA to support work areas of
multiple monitors but they were rejected as EWMH is no longer being
maintained and _GTK_WORKAREAS was introduced instead.

Fix Office 2010 missing title bar on non-primary monitors on GNOME.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-01 10:59:35 +02:00
Zhiyi Zhang 5dd03cbc8f winex11.drv: Refactor query_work_area() to get intersected work area directly.
Refactor query_work_area() to pass in a monitor rectangle and check
if the resulting work area intersects with the monitor rectangle in
the function rather than doing it in the callers. Also move the function
to display.c and rename it to get_work_area().

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-01 10:59:35 +02:00
André Hentschel 9f974579b6 winex11.drv: Change slave to a more neutral word.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-18 19:56:43 +02:00
Paul Gofman 6f9d20806e winex11.drv: Handle X error from vkGetRandROutputDisplayEXT().
Nvidia implementation of vkGetRandROutputDisplayEXT() generates X exception
when rrOutput is from different provider (or if rrOutput is just
invalid). That can happen on certain multiple GPU configurations, on which
Wine is currently unable to initialize display driver and thus create
any window.

According to Vulkan spec, vkGetRandROutputDisplayEXT is supposed to just
return VK_NULL_HANDLE if there is no corresponding VkDisplayKHR. But it is
probably better to workaround the problem to avoid long standing regression.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49407
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-18 19:56:43 +02:00
Zhiyi Zhang 145cfce113 winex11.drv: Add a Vulkan UUID property for GPUs.
A Vulkan UUID property is used to find the corresponding GPU in SetupAPI.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 20:14:04 +02:00
André Hentschel 634cb775c2 winex11.drv: Change whitelist to a more neutral word.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-15 20:57:32 +02:00
Zhiyi Zhang c4a01d0a65 winex11.drv: Use the default frequency in ChangeDisplaySettingsExW() if dmDisplayFrequency is 1.
0 or 1 in dmDisplayFrequency means to use the default frequency.

Fix Disgaea PC and Ostriv failing to launch in exclusive fullscreen mode.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-12 17:16:25 +02:00
Zhiyi Zhang 3db619d46e winex11.drv: Support multiple adapter display settings in registry.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-11 16:51:54 +02:00
Brendan Shanks e3eb89d5eb winex11.drv: Ensure output IDs are unique for mirrored displays.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-10 22:40:50 +02:00
Zhiyi Zhang 1b33e0f72e winex11.drv: Set DM_POSITION and DM_DISPLAYORIENTATION when reporting registry display settings.
Set DM_POSITION and DM_DISPLAYORIENTATION when calling
EnumDisplaySettings(ENUM_REGISTRY_SETTINGS). DM_DISPLAYFIXEDOUTPUT
is not set because it is not necessarily reported according to tests.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-09 21:23:33 +02:00
Francois Gouget f622224c58 winex11.drv: Avoid using the mailing list address in error messages.
Also let users decide whether to report bugs and let them figure out
how.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Brendan Shanks 707fcb99a6 winex11.drv: Set output id property for monitors.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:31 +02:00
Brendan Shanks 8cd6245b76 winex11.drv: Set GPU LUID property for monitors.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:31 +02:00
Zhiyi Zhang f1e7d5bbd6 user32: Fake success for detaching adapters.
It is currently unsupported. This helps later patches so that
settings handlers using a new interface can be introduced without
detaching adapter support, making patches smaller.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 16:20:06 +02:00
Zhiyi Zhang ae4804d502 winex11.drv: Fake success for changing non-primary adapter settings.
Changing non-primary adapter settings is currently unsupported. Return
success for non-primary adapter settings changes so that the primary
adapter settings don't get changed unintentionally.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 16:19:54 +02:00
Zhiyi Zhang 8a4ec0addb user32: Handle NULL device and mode parameters in ChangeDisplaySettingsExW().
NULL device and mode parameters mean to restore all adapters to their
registry settings. Since all user graphics drivers only support a
primary adapter now, it's okay to restore only the primary adapter.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 16:19:49 +02:00
Gabriel Ivăncescu fff3642747 winex11.drv: Fix X11DRV_X_to_window_rect to handle windows smaller than the decoration.
A window can be resized to a smaller size than the decoration (title +
borders), such as when it is minimized. In such cases it is necessary
to recompute the minimum bounds, as it is done in the opposite function
X11DRV_window_to_X_rect, since the real information was lost.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48490
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-20 20:52:26 +02:00
Gabriel Ivăncescu df0d8ac5be winex11.drv: Use a helper to retrieve the decoration rect for managed windows.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-20 20:52:21 +02:00
Murray Colpman 893080e4df winex11.drv: Interpret mouse 6/7 as horiz scroll.
X11 Mouse buttons 6 and 7 were set to translate into browser
back/forward button events. However, this is based on an old convention
where buttons 6 and 7 could either mean horizontal scroll or browser
back/forward. Nowadays, 6 and 7 solely mean horizontal scroll, 8 and 9
being used for back/forward. In addition, the wide adoption of
two-finger two-dimensional scrolling on laptop trackpads since this code
was written has meant that back/forward events may be generated
unintentionally, which can be very disruptive when using tools such as
web browsers.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49142
Signed-off-by: Murray Colpman <muzer@tim32.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-14 23:12:31 +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 c69bb0342c winex11.drv: Update _NET_WM_STATE before resizing windows.
According to the Extended Window Manager Hints (EWMH) spec 1.3 regarding
_NET_WM_STATE_FULLSCREEN, "the Window Manager is responsible for
restoring the original geometry after a switch from fullscreen back to
normal window.", which means that removing _NET_WM_STATE_FULLSCREEN from
a window may cause the window to receive a ConfigureNotify event to
restore the window size, thus causing a application resize action to be
overwritten by the window managers.

Fix a game called Mugsters becomes maximized after exiting full screen.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-07 20:13:16 +02:00
Alexandre Julliard b0e2d046fc opengl32: Make wgl driver entry points WINAPI.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-23 13:33:20 +02:00
Zhiyi Zhang de94f8a1d6 winex11.drv: Allocate LUID for GPUs.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 08:57:16 +02:00
Zhiyi Zhang fb69b6aeb2 winex11.drv: Fix incorrect frequency for double scan and interlaced modes.
Double scan modes have double the dots to be scanned and interlaced
modes only have half the dots to be scanned.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 21:10:31 +02:00
Zhiyi Zhang 562702c69b winex11.drv: Ignore disconnected outputs when finding mirroring slaves.
Some graphics drivers keep CRTCs attached to disconnected outputs.
This could cause the XRandR 1.4 display device handler to incorrectly
mark outputs as mirrored. So enumerate outputs instead of CRTCs when
finding mirroring slaves.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48932
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 21:10:25 +02:00
Francois Gouget 6eb05dab7c winex11: Set res_class to the program name for Crostini.
GNOME implements the startup notification protocol correctly which
means it checks StartupWMClass against both WM name (res_name) and
WM class (res_class). Thus it does not need this patch.
The situation is different for desktop environments that thunk to
Wayland such as Crostini. Wayland does not have separate concepts
that WM name and WM class can be mapped to. So Crostini decided to
only use res_class resulting in it trying to match 'Wine' to the
program name stored in StartupWMClass.
While Crostini's choice is unfortunate for Wine, most other
applications (e.g. all GTK applications) already store the same value
in both WM name and class. So in the interest of compatiblity it makes
sense for Wine to do the same.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-17 11:51:10 +02:00
Alexandre Julliard 7afa53c0f2 winex11: Use standard dlopen() instead of the libwine wrappers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-07 14:26:20 +02:00
Brendan Shanks 086c686e81 winevulkan: Enable VK_KHR_get_surface_capabilities2.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-07 14:26:19 +02:00
Alexandre Julliard f82a5b610f winex11: Avoid using wine_get/set_fs().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-03 10:47:00 +02:00
Zhiyi Zhang 7347b442af winex11.drv: Get the minimum screen size from XRRGetScreenSizeRange().
RandR minimum screen size is not necessarily 0x0. Some drivers report
resolutions smaller than the minimum screen size. When Wine tries to
switch to these resolutions, a X error is generated and causes process
exit.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-31 15:53:54 +02:00
Rémi Bernon 47f69a2248 winex11.drv: Remove frame when non-client area is empty.
Several applications -Steam, Battle.net for instance- handle the
WM_NCCALCSIZE message to override the non-client areas size and make
the client area cover the whole window, instead of changing the styles.

In winex11.drv, in decorated mode, we adjust the window rect according
to the window style to hide the unwanted decorations behind the frame,
but when client and window rects are equals, there's nothing to hide
and the actual window styles are irrelevant and can safely be ignored.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40930
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 13:22:31 +01: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 981fb4edb3 user32: Move ChangeDisplaySettingsExW() common code to user32.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-10 22:46:22 +01:00
Gabriel Ivăncescu dd38e4576b winex11.drv: Don't confine the pointer to any window when just checking for active grab.
Fixes a regression introduced by 74efb3e872,
which caused some random pointer warping on a setup with multiple "workspaces"
when switching between them and a full screen game that warped the mouse.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-15 22:03:30 +01:00
Rémi Bernon cfcc280905 winex11.drv: Send HTMENU instead of HTCAPTION to query window activation.
Commit 71d35d8940 broke the way
WM_TAKE_FOCUS protocol is implemented: WM_MOUSEACTIVATE now replies
MA_NOACTIVATE by default when using HTCAPTION.

We use the WM_MOUSEACTIVATE -although Windows does not- regardless of
the way focus is changed to check whether a window wants focus, and
Windows sometimes changes focus regardless of the message reply.

Steam and the Wine system tray are affected for instance.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-26 21:56:04 +01:00
Damjan Jovanovic 523fb9496c winex11.drv: Ignore .dwAspect in FORMATETC during XDnD.
Some applications pass FORMATETC.dwAspect=0 to
IDataObject_[Query]GetData() during drag and drop, which
is not a valid DVASPECT_* value. Tests show that Windows
Explorer completely ignores .dwAspect for CF_HDROP when
it is the drag source, treating all values as
DVASPECT_CONTENT instead. Do the same.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43368
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-26 21:11:59 +01:00
Alexandre Julliard 458e0ad513 winex11: Use the default color table for window surfaces on 8bpp displays.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48088
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-19 18:38:22 +01:00
Francois Gouget aee91dc4ac winex11.drv: Fix the spelling of a WARN() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 09:28:55 +01:00
Derek Lesho bc02e8551f winex11: Set the scan code prefix when necessary.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-02 22:02:56 +01:00
John Chadwick 578d26f826 winex11/wintab: Fix values for lcSys* and lcOut*.
Testing using the Wacom wintab32 (from driver version 6.3.37-3) on
Windows 10, it appears that the values for lcOut* were likely
accidentally mixed up with the values for lcSys*. The lcSys* values are,
according to the documentation, supposed to specify the extent of the
screen mapping area for the cursor, wheras lcOut* simply specifies the
output coordinate space for the given context. There is no logical
reason I'm aware of for why lcOut* would have different default values
from lcIn*, and in testing Wacom wintab32 defaults lcOut* to match
lcIn*.

In addition, lcSysExt* should use SM_C*VIRTUALSCREEN instead of
SM_C*SCREEN, to handle multi-monitor setups properly. Setting lcSysExt*
to these values works even if the tablet is mapped to a subset of this
area.

After this change, PaintTool SAI 2 appears to work out of the box. Other
wintab clients I tested appear to be unaffected (such as the Wintab SDK
demos and Adobe Photoshop CS2.)

Signed-off-by: John Chadwick <john@jchw.io>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 20:47:43 +01:00
Alex Henrie 1ff4a8fa41 winex11: Fix off-by-one error in color value scaling.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-22 09:09:15 +01:00
John Chadwick 4506b468d4 winex11.drv: Handle button events without axes.
Not all XInput events contain axes information. In particular, libinput
does not seem to provide axes information on button_event.

Signed-off-by: John Chadwick <john@jchw.io>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-21 21:00:39 +01:00
Zhiyi Zhang 427152ec7b winex11.drv: Fix NoRes mode handler having an empty mode.
After 25167fb286 get_primary_monitor_rect()
returns an empty rectangle before X11DRV_DisplayDevices_Init() is called.
So use get_host_primary_monitor_rect() to get the current X desktop size.
It's also more intuitive this way.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-05 17:31:05 +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 413aad3913 winex11.drv: Handle display device events in the desktop thread.
This fixes a regression from 22795243b2,
which calls thread_init_display() and eventually XOpenIM() before
X11DRV_InitXIM() is called.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47821
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-01 17:13:40 +01:00
Zhiyi Zhang 9ae8da6bb4 winex11.drv: Retrieve virtual and primary monitor rectangles from SetupAPI.
So that a process can still get the correct virtual and primary monitor
rectangles if display devices are reinitialized in another process.
Note that we can't use EnumDisplayMonitor() and GetMonitorInfo() here
because they are not loaded when loading winex11.drv.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-01 17:13:34 +01:00
Zhiyi Zhang de94cfa775 winex11.drv: Use underscore style for struct x11drv_display_device_handler.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-31 19:30:10 +01:00
Zhiyi Zhang 6dbb153ede winex11.drv: Call XFlush() right after XUngrabServer().
XGrabServer() stops the processing of other display connections
until a XUngrabServer() call is actually processed by the X server.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-31 19:30:00 +01:00
Alexandre Julliard 81f8b6e8c2 winex11: Also catch X errors from XF86VidModeSetGammaRamp().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-29 10:49:20 +01:00
Zhiyi Zhang 644d00d540 winex11.drv: Implement X11DRV_D3DKMTCheckVidPnExclusiveOwnership.
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-10-22 23:04:27 +02:00
Zhiyi Zhang e08dd25f32 winex11.drv: Implement X11DRV_D3DKMTSetVidPnSourceOwner.
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-10-22 23:04:27 +02:00
Zhiyi Zhang 354359197b gdi32: Add D3DKMTSetVidPnSourceOwner and D3DKMTCheckVidPnExclusiveOwnership stubs.
D3DKMTSetVidPnSourceOwner needs to be implemented in the graphics drivers
because we need to maintain the VidPN source ownership information list
in the graphics drivers. For example, the graphics drivers need to release the
exclusive ownership when a new window is moved to a monitor which has been taken
exclusive ownership.

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-10-22 23:04:27 +02:00
Alex Henrie 7dd3abe69f winex11: Copy icon color table in 256-color mode (Valgrind).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-17 21:11:18 +02:00
Zhiyi Zhang ffd4caa5f0 winex11.drv: Handle XRandR not reporting any providers.
Some XRandR implementations, e.g., the QXL driver used on Debian 10
TestBots, don't report any providers. In this case, we can still
search in XRandR screen resources to get adapters.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-25 16:28:44 +02:00
Zhiyi Zhang 10b2a996ba winex11.drv: Trace display device counts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-25 16:28:36 +02:00
Rémi Bernon ae8f605ede winex11.drv: Handle FocusIn/NotifyGrab and FocusOut/NotifyUngrab events.
These events are received on mutter, when moving undecorated managed
windows, although Wine never grabs the keyboard itself.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-23 19:44:18 +02:00
Zhiyi Zhang 22795243b2 winex11.drv: Handle XRandR 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-09-23 19:44:18 +02:00
Zhiyi Zhang be54adcffc winex11.drv: Support XRandR display device handler.
XRandR supports multiple GPUs and runtime device change
compared to Xinerama.

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 ec09dcf895 winex11.drv: Add virtual desktop display device handler.
The virtual desktop display device handler is actually the
Xinerama handler, but with a much higher priority. So that
it will be preferred in virtual desktop mode when other display
device handlers are introduced, e.g., the XRandR handler.

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 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
Zebediah Figura 22993aff94 winex11: Track the client colormap separately.
If a window with an OpenGL surface attached is reparented as a child window,
and then reparented as a top-level window, so that its whole window is
destroyed and then recreated, it will be recreated with the colormap of its
child window, which more than likely has a different visual. This violates
the X11 specification, which states that a window's colormap must have the
same visual as the window itself, and causes the X server to return BadMatch
to the CreateWindow request.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-19 12:56:59 +02:00
Rémi Bernon 12c09051b4 winex11.drv: Destroy old clipping message window if it has been replaced.
When the same thread repeatedly calls ClipCursor, a message window is
created for every call, then stored in x11drv_thread_data->clip_hwnd.

The WM_X11DRV_CLIP_CURSOR notification is then sent to the desktop
window, then to the previous clipping thread in order for it to destroy
its clip_hwnd. But as the clipping thread is the same, and because
x11drv_thread_data->clip_hwnd has been overwritten, it does not satisfy
the "hwnd == data->clip_hwnd" condition and the window leaked.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-17 18:53:36 +02:00
Andrew Eikum cb703739e5 winex11.drv: Throttle calls to XResetScreenSaver.
Frequent calls to XResetScreenSaver cause performance problems on some
GPU drivers, see https://bugs.freedesktop.org/show_bug.cgi?id=110659

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-17 18:50:03 +02:00
Alex Henrie 359eb9e557 winex11: Avoid dead assignment (scan-build).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-16 10:15:46 +02:00
Alex Henrie a28980da5a winex11: Factor out array access in ConvertAttribWGLtoGLX (scan-build).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:45 +02:00
Sven Baars 6033b3a7fb winex11.drv: Fix a memory leak (Coverity).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-11 22:37:22 +02:00
Rémi Bernon 74efb3e872 winex11.drv: Only call XWarpPointer if we can get exclusive pointer grab.
XWarpPointer will always succeed, regardless of grabs, so if the pointer
is already grabbed, by some other application, we should not ask to warp
it.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-06 19:04:31 +02:00
Rémi Bernon ae4651b7ff winex11.drv: Explicitly call XUngrabPointer when clipping is released.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-06 19:04:29 +02:00
Rémi Bernon 6f9e788fc0 winex11.drv: Do not set clipping_cursor when clip window map state changes.
This flag should only indicate a successful call to XGrabPointer. If not
then we could assume we have ownership of the pointer when we don't.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-06 19:04:25 +02:00
Rémi Bernon 92177b0b16 winex11.drv: Retry last ClipCursor when grab is released.
As we ignore these NotifyGrab / NotifyUngrab w.r.t focus decisions,
some applications are unaware of mouse grabs being lost and sometimes
cursor clipping is lost. We have to keep the last clip rectangle and
restore it when grab is released.

This has been squashed with the foreground window check from
Zhiyi Zhang <zzhang@codeweavers.com> to fix an issue that happens when
switching from a fullscreen window - because there's some additional
focus events involved - but in general, if the window that is getting
focus cannot be activated:

When FocusIn/NotifyWhileGrabbed is received, SetForegroundWindow is not
called if the window cannot be activated. When the FocusIn/NotifyUngrab
event arrives for the same window, we have to check the foreground
window before restoring cursor clipping rectangle.

For reference, the event sequence when pressing Alt-Tab - for WMs that
grab the keyboard - is the following:

1. FocusOut/NotifyGrab, when WM grabs the keyboard.
2. FocusOut/NotifyWhileGrabbed, while WM switches windows, this calls
   SetForegroundWindow(GetDesktopWindow()).

The event sequence for normal windows ends here, but for fullscreen
windows, there may be these additional events:

3. FocusIn/NotifyWhileGrabbed, which may not change Wine foreground
   window if it cannot be activated.
4. FocusIn/NotifyUnGrab, when WM releases the keyboard while switching
   windows, this is ignored but it should not retry to grab the cursor,
   because window is not foreground.
5. FocusOut/NotifyNormal, when WM finishes switching the windows.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-06 19:03:59 +02:00
Rémi Bernon 54f8077c41 winex11.drv: Only grab or warp the cursor when keyboard isn't grabbed.
When the window manager has taken a keyboard grab, it may be going to
move the window itself, so the application should not move the cursor
at the same time.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-06 19:03:44 +02:00
Rémi Bernon 4b81771b00 winex11.drv: Do not react to keyboard grab focus events.
Several window managers are sending FocusOut with NotifyGrab mode
then FocusOut with NotifyWhileGrabbed mode when a window focus is lost,
as a consequence of grabbing the keyboard input before changing window
focus.

This is the case during alt-tab, but keyboard can also be grabbed when
bringing activity view or clicking on the title bar. In this cases
NotifyWhileGrabbed events aren't sent until the window really loses
foreground.

In the same manner, when focus is restored, they usually send FocusIn
with NotifyWhileGrabbed mode followed by FocusIn with NotifyUngrab mode
when the keyboard grab is released.

When bringing activity view back and forth, or clicking on the title
bar, only NotifyUngrab event will be sent.

In order to be consistent across WM and to help simplifying focus
handling, just ignore focus events related to keyboard grabs.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-06 19:00:17 +02:00
Zhiyi Zhang 25167fb286 winex11.drv: Make screen helpers independent of Xinerama.
So that other display device handlers such as XRandR can be introduced
because they might report a virtual screen size with different top-left
corner and the primary screen may be different as well.

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-08-21 14:18:49 +02:00
Zhiyi Zhang 95a0a5c755 winex11.drv: Add xrandr_get_screen_resources() helper.
Getting screen resources will be used in multiple places.
So put it in a function.

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-08-21 14:18:49 +02:00
Akihiro Sagawa aaac4e25ab winex11.drv: Indicate whether the drop point is non-client area.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-19 20:27:03 +02:00
Rémi Bernon de6450135d winex11.drv: Print the FocusIn/FocusOut mode in trace message.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 12:49:09 +02:00
Francois Gouget 66873d5fec winex11.drv: A spelling fix and slight rewording in a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-08 17:53:36 +02:00
Zhiyi Zhang 7d70d45984 winex11.drv: Add DriverDateData registry property to display adapters.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=35345.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-31 09:34:40 +02:00
Alexandre Julliard 4a902de213 gdi32: Make GDI driver functions cdecl.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-06 21:47:58 +02:00
Zhiyi Zhang cb350fc979 winex11.drv: Specify enumerator when calling SetupDiGetClassDevsW.
This reduces some search time.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-01 20:42:42 +02:00
Zhiyi Zhang 23b28323cb winex11.drv: Use generic GetMonitorInfo.
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 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
Zebediah Figura 1bc9c4fdb2 winex11: Update the state of all keys on KeymapNotify.
The Binding of Isaac transitions in and out of fullscreen when the "F" key is
pressed. Specifically, it will swap states when receiving WM_KEYDOWN,
provided that the previous key state was not pressed (i.e. bit 30 is 0).
However, as part of the process of transitioning, it hides and shows its
window, causing it to temporarily lose focus. If the F key is released while
the window does not have focus, Wine misses this fact, and thinks that the
key was already pressed the next time it is pressed, causing the game to
refuse to change focus. Windows will not deliver WM_KEYUP messages to a
window that does not have focus, but it will always report the true previous
state of any key on the keyboard when requested.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-18 23:51:52 +02:00
Zebediah Figura 178d2c5768 winex11: Remove redundant calls to update_key_state().
These will not actually do anything, and were probably added by mistake,
after the similar calls to VK_CONTROL et al. above.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-18 23:51:52 +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
Zhiyi Zhang 31445c3264 winex11.drv: Initialize monitor registry data.
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
Zhiyi Zhang eada617881 winex11.drv: Initialize adapter registry data.
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:20:01 +02:00
Zhiyi Zhang bada31698f winex11.drv: Initialize GPU registry data.
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:16:33 +02:00
Zhiyi Zhang 52a3d5db48 winex11.drv: Add Xinerama display device handler.
Display device handlers are used to initialize the display device
registry data. Different handlers can be implemented according to
the defined interface, for example, via Xinerama or XRandR.
With those registry data, EnumDisplayDevices, EnumDisplayMonitors
and GetMonitorInfo can be built on top of it.

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:09:55 +02:00
Zhiyi Zhang 82c6ec3a32 winex11.drv: Activate window when restoring from iconic state.
Some games, e.g., Project CARS waits for WM_ACTIVATE
when restoring from iconic state.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-10 19:42:38 +02:00
John Found 05d76e7cfe winex11.drv: Allow the drop target to be a transparent window.
Signed-off-by: John Found <johnfound@asm32.info>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-31 12:44:10 +02:00
Henri Verbeet 10dcee21c4 winex11: Only handle errors from GLX requests in GLXErrorHandler().
Spurious errors that would otherwise be handled by ignore_error() may cause
OpenGL context creation to fail.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-06 13:19:33 -05:00
Alexandre Julliard ed22f0454b explorer: Move screen saver activation to the X11 driver.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-03 16:30:39 +02:00
Alistair Leslie-Hughes 13243a28b2 winex11/wintab: Set all Device Orientation values.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-23 23:50:44 +02:00
Micah N Gorrell 0cb79db12a winex11.drv: Recreate gl_drawable for top-level windows as non-top level when clipping for child windows is required.
Prevent creating a gl_drawable for a window as type DC_GL_WINDOW if
there are known children of the window, since DC_GL_WINDOW does not
support clipping.

Recreate a gl_drawable that was previously create as type DC_GL_WINDOW
when a child is encountered.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=15232
Signed-off-by: Micah N Gorrell <mgorrell@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-11 19:44:26 +02:00
Zebediah Figura 70d842b106 winex11: Resize the screen when changing CRTC modes.
Based on a patch by Gabriel Corona.

According to the RandR spec for RRSetCrtcConfig:

"The entire area of the CRTC must fit within the screen size, else a Match
error results. As an example, rotating the screen so that a single CRTC fills
the entire screen before and after may necessitate disabling the CRTC,
resizing the screen, then re-enabling the CRTC at the new configuration to
avoid an invalid intermediate configuration."

This patch involves resizing the screen also when shrinking a CRTC, not just
when expanding it past the current screen size. This is partially because we
have no way to reliably determine the current display width (DisplayWidth() is
never updated past opening the connection, and RandR exposes no way to
retrieve the screen dimensions), and partially because it's probably what the
user wants anyway (e.g. it's what the `xrandr` configuration app does when the
screen size is not expliticly specified).

This patch fixes TestBot failures on the Debian machines for ddraw, d3d8, and
d3d9 device tests.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=33290
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-11 09:15:32 +02:00
Alistair Leslie-Hughes 0652a2ccc9 winex11: Implement PK_CHANGE for wintab.
Based on a patch by Eriks Dobelis.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-10 21:25:30 +02:00
Akihiro Sagawa 1128587fd2 gdi32: Implement GetCharWidthInfo().
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-09 15:46:03 +02:00
Piotr Caban b8f0a28e8c winex11.drv: Don't use strcasecmp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 20:27:57 +02:00
Sebastian Lackner e2389c015c winex11: Forward all clipping requests to the right thread.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38087
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 16:53:30 +01:00
Nikolay Sivov e03114c75b winex11: Fix typo in comments.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-09 02:09:52 +01:00
Alex Henrie 3f69b7ecc8 winex11.drv: Correct spelling of "plug-n-play".
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 22:27:05 +01:00
Alex Henrie b43204bc4a winex11.drv: Make several constants static.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 22:27:05 +01: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
Jacek Caban cbc657a244 winex11.drv: Force changing lock keys state if hooks blocked keyboard input processing.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-23 15:51:21 +02:00
Alex Henrie 4e122bdadd winex11: Return FALSE from LoadTabletInfo if the system isn't a tablet.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46024
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-23 15:31:05 +02:00
Akihiro Sagawa 1931b17868 winex11: Fix a compiler warning when building without vulkan support.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-11 23:59:08 +02:00
Michael Stefaniuc 8e1d40b966 winex11.drv: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-19 23:17:49 +02:00
Alexandre Julliard 9243411837 winex11: Make pixel format traces more compact.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-13 19:16:44 +02:00
Alexandre Julliard dc6f39ac29 server: Use screen coordinates in the update_window_zorder request.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-27 15:16:45 +02:00
Rob Walker 70fbfa2cb8 winex11: Improve ChangeDisplaySettingsEx failed mode message.
The failed mode error message dumps all the mode fields, that were
being tested. Change this output so that only the mode fields
explicitly being matched against are displayed.  Make the failed
message use formatting consist with the trace message, earlier in this
function.

Signed-off-by: Rob Walker <bob.mt.wya@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-24 20:12:05 +02:00
Alexandre Julliard d7cd441373 winex11: Use the stored coordinates to convert back from X11 to window rectangle.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-23 10:54:00 +02:00
Alexandre Julliard 341192289b winex11: Simplify the EnumDisplayMonitors driver entry point.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-23 10:54:00 +02:00
Andrew Eikum 18564c76fc winex11.drv: Fix indentation for focus_out.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-22 22:59:54 +02:00
Alexandre Julliard 0cbb086347 winex11: Use fallback implementation for screen dimensions in GetDeviceCaps().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-22 12:57:20 +02:00
Akihiro Sagawa 8743188f5d winex11: Fix Japanese 106 keyboard scan/vkey code tables.
Otherwise, some symbol keys (e.g. backslash) map differently.
As a result, jp106's scan code and vkey tables equal to macjp.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-17 16:51:02 +02:00
Józef Kucia ed80907152 winex11: Add simple fps counter for Vulkan.
The fps counter is implemented in winex11 because winevulkan thunks can
be bypassed.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-15 20:55:10 +02:00
Józef Kucia 284e661966 winex11: Remove redeclaration of VkXlibSurfaceCreateFlagsKHR.
VkXlibSurfaceCreateFlagsKHR is also declared in wine/vulkan.h.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45554
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:16:01 +02:00
Józef Kucia adb926d5a5 winevulkan: Generate get_vulkan_driver_*_proc_addr() helper functions.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-16 21:28:45 +02:00
Józef Kucia f59925416a winevulkan: Remove vkAcquireNextImageKHR() from Vulkan driver functions.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-16 21:28:45 +02:00
Józef Kucia 5be428f560 winevulkan: Remove vkEnumerateInstanceVersion() from Vulkan driver functions.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-16 21:28:45 +02:00
Andrew Eikum 10035f1b97 winemac: Implement Vulkan driver on top of MoltenVK.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-13 17:20:43 +02:00
Józef Kucia a45b04273f winevulkan: Implement vkEnumerateInstanceVersion().
The current version of Vulkan Loader returns VK_API_VERSION_1_1.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-13 17:20:43 +02:00
Józef Kucia 960e52e12f winevulkan: Add driver functions for VK_KHR_device_group.
In order to unwrap VkSurface.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-13 17:20:43 +02: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
Zebediah Figura c6b6935bb4 winex11.drv: Wake up the display on user input.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-04 19:08:01 +02:00
Andrey Gusev d09c4d9116 winex11.drv: Move condition to the proper place.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-22 12:44:48 +02:00
Alistair Leslie-Hughes 75ec09708f winex11: Correct compile without vulkan support.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-15 12:56:48 +02:00
Alexandre Julliard 3a72836136 winex11: Fix exposing partially off-screen windows.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-14 13:19:50 +02:00
Andrew Eikum f74e8a2967 winex11.drv: Refcount the vulkan surface window.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-14 09:31:06 +02:00
Józef Kucia e6e7976d66 winevulkan: Introduce WINE_VK_HOST to explicitly request 'host' Vulkan headers.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-01 19:43:56 +02:00
Józef Kucia 6efa2e128c winex11: Make get_vulkan_driver() thread-safe.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-31 20:00:38 +02:00
Józef Kucia 1e37d61eb9 winex11: Get rid of unnecessary assignments.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-30 22:26:49 +02:00
Józef Kucia 11cd0d34a2 winex11: Interpolate gamma ramp when gamma ramp size is greater than 256.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-28 11:01:25 +02:00
Józef Kucia 913160d2a4 winex11: Introduce GAMMA_RAMP_SIZE.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-28 11:01:24 +02:00
Alexandre Julliard c102efbc35 winex11: Avoid left_side/top_side cursor names.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-27 11:22:00 +02:00
Alexandre Julliard 508ad84bbe winex11: Support multiple fallbacks for cursor names.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-23 12:01:40 +02:00
Alexandre Julliard 3c8ff605a6 winex11: Allow embedded windows to use an alpha channel with their surface.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-04 22:04:22 +02:00
Józef Kucia 6380d57c69 winevulkan: Support VK_NO_PROTOTYPES in our Vulkan header.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-03 22:00:29 +02:00
Józef Kucia fa25567352 winex11: Use VK_KHR_WIN32_SURFACE_* constants.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-03 22:00:01 +02:00
Michael Stefaniuc 121f20453b winex11.drv: Print a debugstr and not the pointer to it.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-02 16:02:54 +02:00
Józef Kucia efddcedd16 winex11: Return Wine Vulkan driver device functions from vkGetInstanceProcAddr().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-29 17:26:16 +02:00