Commit Graph

181 Commits

Author SHA1 Message Date
Alexandre Julliard 6456973f0a user32: Use wide character string literals for system parameter entries.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:09:59 +02:00
Alexandre Julliard 5ad25c293b user32: Use wide character string literals.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:09:59 +02:00
Alexandre Julliard 9cc9236556 user32: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 15:15:38 +02:00
Fabian Maurer 7b998c266e user32: Set default user preferences to enable animations.
This allows games like solitaire, chess titans, etc. to
use animations.

Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 11:17:26 +02:00
Zhiyi Zhang 04d1a184e5 user32: Zero initialize DEVMODE before passing it to EnumDisplaySettings().
EnumDisplaySettings() on Wine does not write beyond the end of DEVMODE because it doesn't use
dmDriverExtra currently, but this implementation detail should not be relied on.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 18:06:54 +02:00
Zhiyi Zhang 46182aa559 user32: Check invalid device names in EnumDisplaySettingsExW().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-24 18:26:18 +02:00
Zhiyi Zhang a599d645e3 user32: Check invalid device names in ChangeDisplaySettingsExW().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 20:31:34 +02:00
Zhiyi Zhang 0503b17962 user32: Trace EnumDisplaySettingsExW() results.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 20:31:28 +02:00
Zhiyi Zhang f7aefadd1f user32: Trace ChangeDisplaySettingsExW() results.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-21 20:31:26 +02:00
Brendan Shanks 8949f57086 user32: Handle GET_SOURCE_NAME in DisplayConfigGetDeviceInfo().
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 23:16:52 +02:00
Brendan Shanks 27ed9c95a2 user32: Create separate FIXME() messages for each packet type in DisplayConfigGetDeviceInfo().
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 23:16:52 +02:00
Brendan Shanks 5fba152eea user32: Implement QueryDisplayConfig().
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-01 15:07:33 +02:00
Brendan Shanks a94101672e user32: Implement GetDisplayConfigBufferSizes().
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-01 15:07:33 +02:00
Zhiyi Zhang 2affb854e5 user32: Change slave to a more neutral word.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 11:41:57 +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 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
Brendan Shanks b1b1399dd6 user32: Improve DisplayConfigGetDeviceInfo() stub.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-05 20:53:02 +02:00
Brendan Shanks 4e795a8d81 user32: Improve QueryDisplayConfig() stub.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-05 20:53:02 +02:00
Brendan Shanks 91cf6d716e user32: Move DisplayConfig stubs together into sysparams.c.
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-05 20:52:42 +02:00
Zhiyi Zhang 449ca2fbf9 user32: Leave critical section before calling callbacks in EnumDisplayMonitors().
Previously, callbacks were called with a critical section held. It was
intended that monitor handles passed to callbacks should always be valid.
But it created a deadlock condition when callbacks call other functions
which try to grab the critical section using a different thread. Tests
also show that a monitor handle can be invalid after a display change.
So do not hold the critical section when calling callbacks. Monitor
handles will be checked when passed to GetMonitorInfo(), which is the
sole function that consumes HMONITORs.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-05 20:52:36 +02:00
Sven Baars 9bd51fff5d user32: Add EnableNonClientDpiScaling stub.
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-19 20:34:13 +01:00
Zhiyi Zhang ae157bec34 user32: Handle NULL device and not NULL mode parameters in ChangeDisplaySettingsExW().
This makes sure that user graphics drivers has a valid device name when a
DEVMODE is specified.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-12 16:59:18 +01:00
Zhiyi Zhang 12fa0ccea5 user32: Handle NULL device parameter in EnumDisplaySettingsExW().
This makes sure that user graphics drivers always have a valid device name.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-12 16:59:07 +01:00
Zhiyi Zhang b5603287b7 user32: Fix ChangeDisplaySettingsExW() minimum size check.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-10 22:46:24 +01:00
Zhiyi Zhang 7d94e9d0c3 user32: Trace more ChangeDisplaySettingsExW() flags.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-10 22:46:24 +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
Francois Gouget fe18edd6f8 user32: Fix the spelling of a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 09:59:03 +01:00
Zhiyi Zhang ca39b1c22d user32: Don't report mirrored slave monitors in EnumDisplayMonitors.
Mirrored slave monitors don't get enumerated by EnumDisplayMonitors.
For example, if two monitors are in mirrored mode, only one of them
is reported by EnumDisplayMonitors.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-16 22:58:41 +02:00
Zhiyi Zhang 8f45d9a991 user32: Wait for graphics driver to be ready in EnumDisplayDevicesW.
It's possible that EnumDisplayDevicesW gets called before graphics driver is loaded.

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
Huw Davies ef26257f6f user32: Don't query the nonclient metrics unless the font info is required.
This is an optimization that is particularly helpful for scrollbar code.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 20:34:18 +02:00
Zhiyi Zhang 95be042be3 user32: Cache monitor information.
Multiple applications call EnumDisplayMonitors very frequently.
Reduce most of the overhead by caching.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47431
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 d4115033ef user32: Specify enumerator when calling SetupDiGetClassDevsW.
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
Zhiyi Zhang 8789742936 user32: Avoid a possible race.
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-24 13:01:58 +02:00
Zhiyi Zhang db839e0f1a user32: Move EnumDisplayDevicesA/W to sysparams.c.
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-24 13:01:58 +02:00
Huw Davies 3f9c5d7682 user32: Don't access a potentially uninitialized padded_border.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-21 22:51:55 +02:00
Alexandre Julliard d5a372abbb include: Move inline assembly definitions to a new wine/asm.h header.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-14 13:45:07 +02:00
Alexandre Julliard 8563a2c4f5 user32: Cache full name of non-client metrics fonts.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-07 10:47:21 -06:00
Alexandre Julliard d3ca7db42e user32: Also ignore dynamic DPI awareness changes when DPI scaling is disabled.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-31 16:48:45 +01:00
Alexandre Julliard 1505905290 user32: Ignore application-specified DPI awareness when DPI scaling is disabled.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-07 18:16:10 +02:00
Alexandre Julliard 2068b73db5 user32: Process hardware messages in physical coordinates.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-27 14:25:17 +02:00
Alexandre Julliard 87e49000a1 user32: Scale coordinates in Get/SetWindowPlacement() based on DPI awareness.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-24 20:12:05 +02:00
Alexandre Julliard 8de1b2c2ce user32: Scale coordinates in MapWindowPoints() based on DPI awareness.
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 92f5c6e410 user32: Scale monitor rectangles based on DPI awareness.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-23 12:23:47 +02:00
Alexandre Julliard 110443acef user32: Scale initial window dimensions in CreateWindow() based on DPI awareness.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-23 12:13:25 +02:00
Alexandre Julliard a36abda773 user32: Make the MonitorFromRect() argument const.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-18 14:11:32 +02:00
Alexandre Julliard 898f4b6c6a user32: Take DPI awareness into account in GetDpiForMonitorInternal().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-17 17:39:56 +02:00
Alexandre Julliard aac37e8d0b user32: Implement monitor rectangle filtering on the user32 side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-17 17:39:56 +02:00