Ziqing Hui
71b1e636ec
win32u: Add font link for MS UI Gothic.
...
Win10 has font link for most of the system default fonts,
including MS UI Gothic. This fixes Korean text display issue
for Romance of the There Kindoms XIII.
2022-10-17 17:51:02 +02:00
Ziqing Hui
a9cc68336c
win32u: Add mechanism for font specific system links.
2022-10-17 17:51:02 +02:00
Rémi Bernon
4e8844529c
win32u: Asynchronously send the WM_DISPLAYCHANGE to the desktop window.
2022-10-14 10:21:22 +02:00
Rémi Bernon
ba143493d1
win32u: Send WM_DISPLAYCHANGE message to the desktop window.
...
And pass it down to the drivers DesktopWindowProc entry.
2022-10-12 17:17:54 +02:00
Rémi Bernon
7384591c71
win32u: Broadcast WM_DISPLAYCHANGE message on display settings change.
2022-09-23 15:16:49 +02:00
Rémi Bernon
59a76b3a86
win32u: Lock display devices mutex in find_adapter.
2022-09-23 15:16:49 +02:00
Rémi Bernon
fa32c2efc7
win32u: Use find_adapter_device_by_(name|id) helpers in find_adapter.
2022-09-23 15:16:49 +02:00
Rémi Bernon
aa1e59390f
win32u: Factor out display_device lookup in separate helpers.
2022-09-23 15:16:48 +02:00
Rémi Bernon
981d59264f
win32u: Move enumeration of available modes out of graphics drivers.
2022-09-23 15:16:48 +02:00
David Kahurani
903c91fc60
win32u: Use allocator mechanism to allocate DC attributes.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53645
2022-09-20 20:53:17 +02:00
Jacek Caban
4467589a4a
win32u: Introduce NtUserSendDriverMessage.
...
And use it in display drivers.
2022-09-20 20:52:56 +02:00
Zebediah Figura
c73999f169
win32u: Copy directly into the union pointer in unpack_message().
...
This works around a spurious gcc warning:
../wine/dlls/win32u/message.c: In function ‘unpack_message.constprop’:
../wine/dlls/win32u/message.c:359:9: error: writing 28 bytes into a region of size 4 [-Werror=stringop-overflow=]
359 | memcpy( &ps->wp, &wp, sizeof(wp) );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../wine/dlls/win32u/win32u_private.h:29,
from ../wine/dlls/win32u/message.c:30:
../wine/include/ntuser.h:549:15: note: destination object ‘hwnd’ of size 4
549 | UINT hwnd;
| ^~~~
2022-09-16 19:13:24 +02:00
Alexandre Julliard
2784c1caa0
win32u: Fix Get/SetWindowWord behavior on 32-bit.
2022-09-14 22:38:34 +02:00
Alexandre Julliard
7ab46c4f21
unicode: Update to Unicode 15.0.0.
2022-09-14 22:38:34 +02:00
Rémi Bernon
bd8de2a882
win32u: Introduce a new internal WINE_DM_UNSUPPORTED display flag.
2022-09-13 22:07:22 +02:00
Rémi Bernon
a225ad4efd
win32u: Pass adapter parameter to (read|write)_registry_settings.
...
And rename them to adapter_(set|get)_registry_settings.
2022-09-13 22:07:22 +02:00
Rémi Bernon
68e461a6c5
win32u: Avoid unnecessary copy of adapter path and device name.
2022-09-13 22:07:22 +02:00
Rémi Bernon
43434f8dae
win32u: Avoid copying the modes array in NtUserChangeDisplaySettings.
2022-09-13 22:07:22 +02:00
Rémi Bernon
75e62eb720
win32u: Introduce reference counting to struct adapter.
2022-09-13 22:07:22 +02:00
Rémi Bernon
b197bd3bf8
win32u: Fill the local full_mode variable instead of using the modes array.
2022-09-13 22:07:22 +02:00
Rémi Bernon
9cbc9386b9
win32u: Rename get_full_mode variables and avoid using devmode directly.
2022-09-13 22:07:22 +02:00
Rémi Bernon
12d0792f74
win32u: Move display placement logic out of graphics drivers.
2022-09-02 17:53:15 +02:00
Rémi Bernon
d21da2a655
win32u: Move full display mode lookup out of graphics drivers.
2022-09-02 17:53:11 +02:00
Rémi Bernon
1c6722c41a
win32u: Support interlaced and stretched display modes.
2022-09-02 17:53:11 +02:00
Rémi Bernon
25272711b4
win32u: Sort adapter display modes after reading from the registry.
2022-09-02 17:53:11 +02:00
Zhiyi Zhang
bca9df8db2
win32u: Only cache font glyph metrics from GGO_METRICS.
...
Fonts loaded with GGO_BITMAP may report different font metrics than that with GGO_METRICS. If the
font metrics from GGO_BITMAP are used and later getting font metrics with GGO_METRICS or vice versa,
the font metric difference may cause UI glitchs.
Fix Steam installer next button text moving to the left for 1 pixel when hovered on Mac and Wine is
built with FreeType > 2.8.0.
2022-09-01 17:43:44 +02:00
Nikolay Sivov
114a06364b
win32u/hook: Fix a leak on earlier return (Coverity).
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-08-31 17:44:53 +02:00
Jacek Caban
3ba583fde8
win32u: Introduce NtUserActivateOtherWindow.
...
And use it instead of WINPOS_ActivateOtherWindow.
2022-08-27 16:53:30 +02:00
Jacek Caban
803a5f0789
win32u: Move NtUserPerMonitorDPIPhysicalToLogicalPoint implementation from user32.
2022-08-27 16:53:28 +02:00
Jacek Caban
352e24dcdf
win32u: Move NtUserLogicalToPerMonitorDPIPhysicalPoint implementation from user32.
2022-08-27 16:53:27 +02:00
Rémi Bernon
533b3def80
win32u: Only read/write valid mode fields from/to the registry.
2022-08-23 09:38:39 -05:00
Rémi Bernon
eaeef1def4
win32u: Use current mode position if desired mode doesn't specify it.
2022-08-23 09:38:39 -05:00
Rémi Bernon
f60716c9fc
win32u: Always copy devmode in validate_display_settings.
...
So that updating dmPelsWidth / dmPelsHeight doesn't modify user devmode.
2022-08-23 09:38:36 -05:00
Rémi Bernon
3ec21c3ed3
win32u: Read registry or current mode when validation needs it.
2022-08-23 09:38:36 -05:00
Rémi Bernon
dd79a25b6c
win32u: Do not keep display modes driver extra in the registry.
...
It's not always serializable and cannot be shared across processes.
2022-08-23 09:38:32 -05:00
Zhiyi Zhang
58b477d158
win32u: Choose a smaller ppem to avoid exceeding the requested font height.
...
When height > 0, CreateFontA/W() should not return a font face exceeding the requested height.
For instance, Tahoma has 2049 units of ascent, 423 units of descent and its units per EM square is
2048. When requesting a font 20 pixels in height, ppem = units_per_EM * requested_height / (ascent + descent)
= 2048 * 20 / (2049 + 423) = 16.57 ~= 17. When getting the resulting height back from the ppem,
resulting_height = (ascent + descent) * ppem / units_per_EM = (2049.0 + 423) * 17 / 2048 = 20.52
~=21. So it ends up getting a larger font than requested and violates the spec.
Fix Nancy Drew: Legend of the Crystal Skull crash at start.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-08-19 22:45:18 +02:00
Jiajin Cui
53f6d82e69
win32u: Don't allow a replaced font to be a replacement.
...
This is to prevent replacement loops.
2022-08-19 22:45:18 +02:00
Jiajin Cui
88ead398eb
win32u: Ensure that either the primary or secondary name is in English.
2022-08-19 22:45:18 +02:00
Jacek Caban
29f320edd9
win32u: Move process initialization to NtUserInitializeClientPfnArrays.
...
On wow64 64-bit win32u.dll is always loaded, causing win32u.so to
initialize at earlier stage than it would otherwise do. This patch
makes it more consistent across environments.
2022-08-18 21:42:27 +02:00
Jacek Caban
50bbaf9d5e
win32u: Fix handling uninitialized process_layout.
2022-08-18 21:42:27 +02:00
Jacek Caban
95791ea044
user32: Move dialog proc setting implementation from win32u.
2022-08-18 21:42:27 +02:00
Jacek Caban
577fbb0ff1
user32: Move dialog proc getting implementation from win32u.
2022-08-18 21:42:26 +02:00
Jacek Caban
6d8b1887a5
wow64win: Implement more user callbacks.
2022-08-16 22:27:53 +02:00
Jacek Caban
caad167278
win32u: Use a client copy of windows hook lparam when calling hook procs.
...
Instead of leaking kernel pointers.
2022-08-16 22:27:53 +02:00
Jacek Caban
9f63cbc052
wow64win: Implement wow64_NtUserCallWinProc.
2022-08-15 18:15:22 +02:00
Jacek Caban
85012b9102
win32u: Remove no longer needed unicode call_hooks argument.
2022-08-15 18:15:22 +02:00
Jacek Caban
e41c255be6
win32u: Use send_message_timeout for WM_CREATE and WM_NCCREATE.
2022-08-15 18:15:22 +02:00
Jacek Caban
0ad2db66a1
win32u: Pack messages sent directly from win32u.
...
Instead of leaking kernel pointers.
2022-08-15 18:15:19 +02:00
Jacek Caban
894d728b7e
win32u: Use a separate helper to send messages from win32u.
2022-08-15 18:15:19 +02:00
Jacek Caban
439cdf4901
win32u: Move more logic from dispatch_win_proc_params.
2022-08-15 18:15:19 +02:00
Jacek Caban
40dbc84913
win32u: Use NtUserCallMessage for passing packed winproc result.
2022-08-12 22:12:32 +02:00
Jacek Caban
1dfedae903
win32u: Use RtlSetLastWin32Error.
2022-08-10 19:24:12 +02:00
Jacek Caban
2c75490c3e
win32u: Use NtUserMessageCall for NtUserSpyGetMsgName.
...
Instead of leaking a kernel pointer.
2022-08-09 15:55:44 +02:00
Jacek Caban
8bb71922a5
win32u: Store thread info in 64-bit TEB on wow64.
2022-08-09 15:55:44 +02:00
Jacek Caban
1e9390e558
win32u: Use platform-independent layout for ntuser_thread_info.
2022-08-09 15:55:43 +02:00
Jacek Caban
149e750240
win32u: Support wow64 in NtAllocateVirtualMemory calls.
2022-08-09 15:55:43 +02:00
Jacek Caban
2b6647cdd5
win32u: Use platform-independent layout for DC_ATTR.
2022-08-09 15:55:43 +02:00
Rémi Bernon
a42b22e027
win32u: Avoid invalid access when registered device alloc failed. (Coverity).
2022-08-08 18:51:00 +02:00
Rémi Bernon
17bdb5060a
win32u: Send the total number of registered devices to the server.
...
Instead of device_count which is the number of registration updates,
and execute the request within the rawinput_mutex to ensure atomicity
of the update and consistency between the client and the server state.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53468
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53487
2022-08-08 18:50:57 +02:00
Rémi Bernon
b5ed538993
win32u: Avoid reallocating rawinput device array with zero size.
...
It actually frees the pointer.
2022-08-08 18:50:56 +02:00
Jacek Caban
1e640b5e7f
user32: Don't include ntuser_private.h.
2022-08-08 18:47:45 +02:00
Jacek Caban
eb317d9d8c
win32u: Store receive_flags in ntuser_thread_info.
2022-08-08 18:47:45 +02:00
Jacek Caban
ca903a4a16
win32u: Move msg_source and recursion_count to ntuser_thread_info.
2022-08-08 18:47:45 +02:00
Jacek Caban
da2c400edc
win32u: Store wmchar_data in ntuser_thread_info.
2022-08-08 18:47:44 +02:00
Jacek Caban
f390b5b884
win32u: Store DPI awareness in ntuser_thread_info.
2022-08-08 18:47:44 +02:00
Jacek Caban
ed693f5b32
win32u: Move builtin classes registration from user32.
2022-08-08 18:47:44 +02:00
Jacek Caban
fc0753f918
win32u: Move register_desktop_class implementation from user32.
2022-08-08 18:47:44 +02:00
Rémi Bernon
82a77607da
win32u: Split EnumDisplaySettingsEx into CurrentDisplaySettings entry.
2022-08-08 18:47:31 +02:00
Rémi Bernon
77412c1ca8
win32u: Ignore DM_POSITION mode fields for available modes.
2022-08-08 18:47:27 +02:00
Jacek Caban
929694c66d
user32: Remove USER_CheckNotLock.
...
It's no longer interesting. Its remaining callers are not used by locked code, which is restricted to win32u.
2022-08-05 20:13:33 +02:00
Jacek Caban
421fb1c804
win32u: Introduce NtUserGetChildRect.
...
And use it in CalcChildScroll.
2022-08-05 20:13:33 +02:00
Jacek Caban
c0b62eb5ae
user32: Use win32u to get and set MDI client info.
2022-08-05 20:13:33 +02:00
Jacek Caban
224a8fc24e
win32u: Introduce NtUserGetWindowSysSubMenu.
...
And use it for MDI client implementation.
2022-08-05 20:13:33 +02:00
Nikolay Sivov
d909f27590
win32u: Fix typo in font handle creation in NtUserDrawCaptionTemp().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-07-28 21:36:00 +02:00
Rémi Bernon
a2395ecf96
server: Use the client provided rawinput registered device array.
2022-07-28 20:08:58 +02:00
Rémi Bernon
1587e9db88
win32u: Implement NtUserGetRegisteredRawInputDevices on the client side.
2022-07-28 20:08:58 +02:00
Rémi Bernon
c484e4b87e
win32u: Use a struct list to keep rawinput devices.
2022-07-28 20:08:31 +02:00
Rémi Bernon
37a3c916b4
win32u: Use a static size array for rawinput device path.
2022-07-28 20:08:31 +02:00
Jacek Caban
fa7aaca9f1
win32u: Remove no longer needed exports.
2022-07-28 17:34:03 +02:00
Jacek Caban
3dc3709f4c
win32u: Introduce NtUserGetDialogProc.
...
And use it in user32 instead of DEFDLG_GetDlgProc.
2022-07-28 17:34:03 +02:00
Jacek Caban
1cd5702d9f
win32u: Introduce NtUserGetDialogInfo and NtUserSetDialogInfo.
...
And use it instead of accessing window object from user32.
2022-07-28 17:34:03 +02:00
Jacek Caban
11657aab27
user32: Avoid using WIN_GetPtr for window handle validation.
...
We will eventually want to make GetWindowThreadProcessId fast (probably based on shared handle table) instead of calling win32u.
2022-07-28 17:34:03 +02:00
Rémi Bernon
840ec53041
win32u: Fix thread safety when accessing rawinput device data.
2022-07-27 23:07:07 +02:00
Rémi Bernon
4c584fe773
win32u: Read rawinput device preparsed data using virtual memory.
2022-07-27 23:07:07 +02:00
Rémi Bernon
689826a02c
win32u: Enumerate mouse and keyboard devices first and skip duplicates.
2022-07-27 23:07:07 +02:00
Jacek Caban
68bb2f62e9
winevulkan: Remove __wine_get_vulkan_driver PE entry point.
2022-07-27 23:07:07 +02:00
Rémi Bernon
546638a875
win32u: Read and cache adapter modes from the registry.
2022-07-27 23:07:06 +02:00
Rémi Bernon
20414797ed
win32u: Introduce new add_mode device manager callback.
...
And use it to enumerate display modes in winex11 and wineandroid.
2022-07-27 23:07:06 +02:00
Jacek Caban
35a59e07b9
win32u: Use syscall interface for NtUserSystemParametersInfo.
2022-07-26 22:37:48 +02:00
Jacek Caban
2ebfe2fd55
win32u: Use syscall interface for window class functions.
2022-07-26 22:37:48 +02:00
Jacek Caban
561890f47e
win32u: Use syscall interface for more windowing functions.
2022-07-26 22:37:48 +02:00
Jacek Caban
87b8a912a8
win32u: Use syscall interface for NtUserSetWindow* functions.
2022-07-26 22:37:48 +02:00
Jacek Caban
c660d37ae7
win32u: Use syscall interface for scroll bar functions.
2022-07-26 22:37:48 +02:00
Jacek Caban
b3c7fff85a
win32u: Use syscall interface for menu functions.
2022-07-26 22:37:48 +02:00
Jacek Caban
9639d0d6db
win32u: Use syscall interface for winpos functions.
2022-07-25 09:39:08 +02:00
Jacek Caban
d50112b4b6
win32u: Use syscall interface for NtUserCreateWindowEx and NtUserDestroyWindow.
2022-07-25 09:39:08 +02:00
Jacek Caban
43c851c796
win32u: Use syscall interface for NtUserDisableThreadIme.
2022-07-25 09:39:07 +02:00
Jacek Caban
8ecb3aa5cc
win32u: Use syscall interface for more input functions.
2022-07-25 09:39:06 +02:00
Jacek Caban
399dfc2580
win32u: Use syscall interface for cursor icon functions.
2022-07-25 09:39:06 +02:00
Jacek Caban
b20f39858c
win32u: Use syscall interface for more sysparams functions.
2022-07-25 09:39:05 +02:00