Commit graph

1097 commits

Author SHA1 Message Date
Katayama Hirofumi MZ 25fcdc5c2b
[USER32][IMM32][INCLUDE] Empower WM_IME_SYSTEM handling (#4603)
- Add code to ImeWnd_OnImeSystem function.
- Add CtfLoadThreadLayout and User32DoImeHelp helper functions.
- Define IMS_... constants (for WM_IME_SYSTEM wParam) and fix some magic numbers.
CORE-11700
2022-08-13 07:08:18 +09:00
Katayama Hirofumi MZ 1381cea2a7
[USER32] Refactoring on LoadKeyboardLayout(W/Ex) (#4601)
- Add IntLoadKeyboardLayout (Win: LoadKeyboardLayoutWorker) helper function.
- Use it in LoadKeyboardLayoutW and LoadKeyboardLayoutEx functions.
CORE-11700
2022-08-12 09:16:18 +09:00
Katayama Hirofumi MZ 934e5212e4
[IMM32] Implement ImmWINNLSEnableIME (#4599)
- Implement imm32!ImmWINNLSEnableIME function.
- Rename CLIENTIMC_UNKNOWN3 flag as CLIENTIMC_DISABLEIME.
- Modify imm32.spec.
CORE-11700
2022-08-09 20:09:23 +09:00
Katayama Hirofumi MZ d519b11a28
[NTUSER] Security: Follow-up of #4595 (#4598)
Improve security. CORE-11700
2022-08-08 21:23:49 +09:00
Katayama Hirofumi MZ 3e42f7b478
[NTUSER][USER32] NtUserGetKeyboardLayoutName and GetKeyboardLayoutNameW (#4595)
#4594 has proved that the 1st argument of NtUserGetKeyboardLayoutName has type PUNICODE_STRING.
CORE-11700
2022-08-06 08:02:31 +09:00
Timo Kreuzer 090ccb3d8e [WIN32K] Add missing NULL checks
Also fix an old copy-pasta.
2022-08-04 16:15:24 +02:00
Katayama Hirofumi MZ 5f4db56486
[NTUSER] KLF_UNLOAD flag of NtUserGetKeyboardLayoutList (#4592)
This implementation enables KLF_UNLOAD flag awareness on listing the KLs.
CORE-11700
2022-08-03 12:45:10 +09:00
Katayama Hirofumi MZ b9ecf4b055
[NTUSER] Release WinSta->spklList at IntWinStaObjectDelete (#4593)
Call UserAssignmentUnlock((PVOID*)&WinSta->spklList); in IntWinStaObjectDelete function.
CORE-11700
2022-08-02 10:46:37 +09:00
Katayama Hirofumi MZ 6c1b65d7a4
[NTUSER] Improve WINSTATION_OBJECT compatibility (#4591)
- Modify WINSTATION_OBJECT structure with inserting struct tagKL *spklList member.
- Add some C_ASSERT(offsetof(WINSTATION_OBJECT, ...) == ...);.
CORE-18252
2022-07-31 10:25:07 +09:00
Katayama Hirofumi MZ ffbdb7d39e
[IMM32][USER32] ImmPutImeMenuItemsIntoMappedFile (#4588)
Implement inter-process menu item retrieving.
CORE-11700
2022-07-23 05:58:17 +09:00
Serge Gautherie b671b1cf8f
[WIN32K:ENG] EngAlphaBlend(): Release EnterLeaveSource on error (#4560)
Part of CORE-11156

Co-authored-by: Carlo Bramini <carlo.bramix@libero.it>
2022-07-02 12:30:03 +03:00
Stanislav Motylkov bbccad0ed6
[INF] Set manufacturer as ReactOS Project for consistency
Also make it non-localizable. CORE-18191
2022-06-27 17:00:18 +03:00
Mark Jansen 81e0f74a7a
[WIN32K] Conditionally enable IMM32
MFC42 applications only expect an IME window when on a DBCS system,
so they will capture this IME window as their 'main' window on non-DBCS systems.
CORE-18212
2022-06-08 19:19:59 +02:00
Hervé Poussineau 2915d16543 [WIN32SS:USER] Do not write error message at end of enumeration in UserEnumDisplayDevices() 2022-06-08 07:58:12 +02:00
Hervé Poussineau cd8305494c [WIN32SS:ENG] Fix handling of Acceleration.Level parameter (was not read anymore) 2022-06-05 14:49:47 +02:00
Oleg Dubinskiy 31139c253f
[WIN32SS][NTDDRAW][NTGDI] Implement some DxEng* callbacks (#3638)
Implement the following DxEng* functions:
- DxEngAltLockSurface
- DxEngDeleteSurface
- DxEngReferenceHdev
- DxEngSelectBitmap
- DxEngSetBitmapOwner
- DxEngUnreferenceHdev

Update their prototypes and call the appropriate win32k functions
inside them, since they are already implemented. Also get rid of
now unused IntGdi(Un)ReferencePdev, whose were called only by dxeng,
and whose are not used anymore. In Windows, DxEng(Un)ReferenceHdev calls
PDEVOBJ_vReferencePDEV and PDEVOBJ_vDeferencePDEV directly (those
correspond to our PDEVOBJ_vReference and PDEVOBJ_vRelease accordingly).

Required by MS DirectDraw stack (ddraw.dll & dxg.sys). CORE-17561
2022-06-01 00:58:35 +03:00
Stanislav Motylkov 26b88af642
[WIN32SS] Add missing code parts for monitor handling
- [VIDEOPRT] Add stub for IOCTL_VIDEO_ENUM_MONITOR_PDO.

- [WIN32SS:ENG] Add missing checks and comments.

- [WIN32SS:NTUSER] Add missing monitor handling and comments.

Addendum to 31827c43. CORE-18197 CORE-11715
2022-05-30 15:28:44 +03:00
Stanislav Motylkov 31827c43b6
[WIN32SS] EnumDisplayDevices: Fill DeviceID field properly
- [VIDEOPRT] Return the real PhysicalDeviceObject in Win32k callbacks.

- [WIN32SS:ENG] Pass PhysDeviceObject into the GraphicsDevice structure
  and rename the destination field accordingly.

- [WIN32SS:NTUSER] Request hardware identifiers from device PDO and
  fill DISPLAY_DEVICE's DeviceID field with the first identifier.

Now it's correctly passed to the usermode, and Desktop Propertes applet
can open the video adapter device properties.

Thanks to Hervé Poussineau for the help.

CORE-18197 CORE-11715
2022-05-30 15:28:21 +03:00
Stanislav Motylkov 17e0e4428c
[PC98VID] Fix video driver settings
- Store settings in non hardware-profile registry key.
- Rename driver file to vgapnp.sys to keep in sync with VBE.
- This makes PC-98 video driver working again.

Addendum to 073a1ea3 and f03750de. CORE-18201 CORE-17977
2022-05-27 18:56:13 +03:00
Stanislav Motylkov 5471363801
[XBOXVMP] Fix video driver settings
- Store settings in non hardware-profile registry key.
- This makes Xbox video driver working again.

Addendum to f03750de. CORE-16216
2022-05-27 18:54:20 +03:00
Victor Perevertkin 447ef2aa4a
[CMAKE] Do not use USE_CLANG_CL variable in CMake scripts 2022-05-27 01:37:37 +03:00
Stanislav Motylkov 8b55d712a7
[GITHUB] Add MSVC ARM64 builder
This builds only some applications for now.

CORE-17518
2022-05-25 21:10:17 +03:00
Justin Miller 4363e74ddc
[REACTOS] Finally get some ARM64 applications building (#4517)
- Add some missing ARM64 exports to ntdll, kernel32 and user32
- Create mmtypes header file based on WoA debug symbols
- Get the remaining headers in order, so we can build ARM64 apps
- Adjust subsystem version for binaries so they can run on WoA host
- Get calc, notepad and more base apps to build for ARM64 platform

CORE-17518

Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
2022-05-25 17:06:32 +03:00
Hermès Bélusca-Maïto d21895e6ef
[WIN32K:NTUSER] Only call IntFreeSecurityBuffer() when needed, don't free NULL buffers.
Addendum to 878c2f44.
2022-05-23 19:30:13 +02:00
Hervé Poussineau d2a87f1b7f [WIN32K] Improve finding the best matching display mode
Search the display mode having the smallest difference with the requested one.
We can then remove the hardcoded values of 60 Hz and 32 bpp by default.

CORE-18189
2022-05-22 23:42:03 +02:00
Hervé Poussineau 63e59e10f3 Revert "[WIN32SS] Only refresh graphics mode list when iModeNum = 0"
This reverts commit c243133b2c.

Without the revert, VirtualBox auto-resize doesn't work on first attempt,
but only on next ones.
However, according to documentation, we must only initialize device and
cache information when iModeNum = 0.

CORE-18189
2022-05-22 23:42:00 +02:00
Hervé Poussineau 588285881e [WIN32SS] Change LDEVOBJ_bProbeAndCaptureDevmode to load missing settings from registry
- use EngpGetDisplayDriverParameters to get display settings from registry
- update searched display settings with the provided ones (+ add missing SEH2)
- then, search exact mode

User can now change only one display setting, without specifying other ones.
2022-05-22 17:32:44 +02:00
Hervé Poussineau 9acd895f18 [WIN32SS] Copy loading of registry settings from mdevobj.c to new function
This function will be used in next commit, and duplicated implementation
in mdevobj.c will be dropped.
2022-05-22 17:32:40 +02:00
Hervé Poussineau 900beca021 [WIN32SS] In LDEVOBJ_bGetClosestMode, search 60 Hz if everything failed
This function needs probably to be rewritten.
2022-05-22 17:32:08 +02:00
Hervé Poussineau 22dac3447f Revert "[WIN32SS] Handle panning in LDEVOBJ_bProbeAndCaptureDevmode"
This reverts commit 37c2bb3985.

CORE-18189
2022-05-22 17:31:44 +02:00
Hervé Poussineau c243133b2c [WIN32SS] Only refresh graphics mode list when iModeNum = 0
We don't expect graphics mode list to change while enumerating it.
2022-05-22 17:31:40 +02:00
Luke Luo de972e2bc2
[TRANSLATION] Improve Simplified Chinese (zh-CN) translation (#4513)
- Changed some wording according to the translation requirements.
- Fixed some mistakes.
- Changed my name.

Reviewed-by: He Yang <1160386205@qq.com>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
2022-05-20 15:38:24 +03:00
Katayama Hirofumi MZ 99d9fc698f
[KBDJA][NTUSER] Improve scancode_to_vk data (#4515)
- Fix scancode_to_vk variable.
- Add special handling to win32k!ProcessKeyEvent function for Japanese.
CORE-11700
2022-05-15 12:53:12 +09:00
Hervé Poussineau 81aa81e38f [WIN32SS] Implement display acceleration level 5 (ie no acceleration)
This is a easy as forcing usage of panning driver.
2022-05-14 21:29:12 +02:00
Hervé Poussineau 4e0f2fc01c [WIN32SS] Implement panning driver
This can be configured in registry with DefaultSettings.XPanning and
DefaultSettings.YPanning, which describe the real screen resolution.

DefaultSettings.XResolution and DefaultSettings.YResolution describe
the resolution of the virtual screen.
2022-05-14 21:29:12 +02:00
Hervé Poussineau 83d2c8ce33 [WIN32SS] mouse: call panning driver when moving pointer
Yes, if a driver supports both hardware pointers and panning, it will be called twice on each move.
2022-05-14 21:29:12 +02:00
Hervé Poussineau 57c07ba117 [WIN32SS] mouse: use pointer flags in PDEVOBJ
When changing pointer cursor:
- use PDEV_HARDWARE_POINTER flag if using hardware pointer
- use PDEV_SOFTWARE_POINTER flag if using software pointer
- keep pfnMovePointer as an accelerator to driver function (if available) and never change it
- fix bug (2 pointers) when switching between hardware and software pointer

When moving pointer:
- check PDEV_HARDWARE_POINTER flag to know if we need to call the driver
- check PDEV_SOFTWARE_POINTER flag to know if we need to call EngMovePointer
2022-05-14 21:29:12 +02:00
Hervé Poussineau 37c2bb3985 [WIN32SS] Handle panning in LDEVOBJ_bProbeAndCaptureDevmode
- search a graphic mode corresponding to real screen resolution (not virtual panning one)
- when capturing the selected mode, copy from input the virtual panning resolution
- when searching the best mode, also try without panning
2022-05-14 21:29:12 +02:00
Hervé Poussineau 185f2dac85 [WIN32SS] Copy function table earlier, and use it in all PDEVOBJ operations 2022-05-14 21:29:12 +02:00
Katayama Hirofumi MZ fcc4384554
[USER32][KBDJA] Implement CliImmSetHotKey (#4504)
- Fix Japanese keyboard about [Shift]+[0] and [半/全] (VK_PROCESSKEY).
- Add user32!CliSaveImeHotKey helper function.
- Implement user32!CliImmSetHotKey function. This function is forwarded from imm32!ImmSetHotKey.
- Fix user32!TranslateMessage by using imm32!ImmTranslateMessage.
CORE-11700, CORE-18183, CORE-18182
2022-05-11 21:42:32 +09:00
Katayama Hirofumi MZ 7396ba84ce
[USER32] Implement UnloadKeyboardLayout (#4503)
- Add IntSetFeKeyboardFlags, CliImmSetHotKeyWorker, CliSetDefaultImeHotKeys, CliGetPreloadKeyboardLayouts, CliGetImeHotKeysFromRegistry, CliImmInitializeHotKeys, CliSetSingleHotKey, and CliReadRegistryValue helper functions.
CORE-11700
2022-05-11 10:03:02 +09:00
George Bișoc aa815e1cfa
[WIN32K:NTUSER] Assign a security descriptor when parsing the desktop object
The problem ReactOS currently faces is this -- whenever the desktop is being parsed we aren't assigning a security descriptor to it. As a matter of fact when Winlogon tries to assign new security information to the application desktop when a user logs in, Winlogon fails because no prior descriptor has been created for it even though we already do this when initializing security buffers in Winlogon.

With that said, we must assign a descriptor when parsing the desktop as well. This fixes a hack in Winlogon where security assigning of application desktop during a log in is disabled (which we can now enable such code path back).
2022-05-08 20:16:15 +02:00
Katayama Hirofumi MZ 242e0b4303
[NTUSER][USER32] Implement IME status (#4472)
- Add IntCheckImeShowStatus, IntSendMessageToUI, IntSendOpenStatusNotify, IntNotifyImeShowStatus, and xxxBroadcastImeShowStatusChange helper functions.
- Renaming: s/X_ROUTINE_IMESHOWSTATUSCHANGE/TWOPARAM_ROUTINE_IMESHOWSTATUSCHANGE/
- Implement NtUserCallNoParam.NOPARAM_ROUTINE_GETIMESHOWSTATUS.
- Implement NtUserCallHwndParamLock.TWOPARAM_ROUTINE_IMESHOWSTATUSCHANGE.
- Fix hung in User32GetTopLevelWindow and rename it as IntGetTopLevelWindow.
CORE-11700
2022-05-08 20:16:17 +09:00
George Bișoc 65a72fb527
[USER32] Capture the security descriptor from the caller when creating a window station
When creating a window station with CreateWindowStationW, the function ignores the security descriptor provided by the caller and instead it uses whatever descriptor the system can find.
2022-05-06 10:09:48 +02:00
George Bișoc 878c2f4444
[WIN32K:NTUSER] Implement security infrastructure for NTUSER component
Implement a base security infrastructure with code that sets up a security descriptor for the service that we're going to connect through it. Such service is based upon a desktop and a window station.

=== DOCUMENTATION REMARKS ===
The authenticated user, represented by an access token that describes its security context, is the main holder and has ultimate power against the default created desktop and window station objects in USER. The authenticated user in question
is the actual logged in user, this is the case when the server is impersonating a client. Administrators on the other hand have some share of power against default desktop but their power in question is extremely limited against the default
window station as admins can only just enumerate the available and valid handle stations within a desktop.
2022-05-06 10:09:48 +02:00
Doug Lyons de6c514c3e
[WIN32SS] Fix CF_DIB format not being saved to clipboard on Print Screen key (#3265)
Use pool to allocate (potentially huge) clipboard data buffers.
CORE-17318
2022-05-05 17:54:15 +02:00
Katayama Hirofumi MZ 056bb94edc
[NTUSER] NtUserBuildHwndList should return NTSTATUS (#4487)
A follow-up to #4485 (c2a51c7). CORE-18173
2022-05-05 22:53:15 +09:00
Katayama Hirofumi MZ c2a51c7249
[NTUSER][USER32] Make NtUserBuildHwndList exclusive (#4485)
- Modify prototype of NtUserBuildHwndList function.
- Wrap the code by UserEnterExclusive(); and UserLeave();.
CORE-18173
2022-05-05 08:49:00 +09:00
Katayama Hirofumi MZ bbc9a877cc [NTUSER] Add Win: comments to window.c
CORE-18173
2022-05-04 15:40:46 +09:00
Serge Gautherie 03422451b3 [REACTOS] Add '\n' to debug logs
on TRACE, WARN, FIXME and ERR calls.

Plus a few nit picks.
2022-05-04 03:28:38 +03:00
Victor Martinez Calvo b57be0a746
[GDI32] Fix GetObjectW() GDI_OBJECT_TYPE_BRUSH handling. (#4394)
This fixes the last GetObjectW apitest case:
ok_long(GetObjectA(hBrush, 0, &TestStruct), 0);

- When "cbSize" is "0", GetObjectW shouldn't return "sizeof(LOGBRUSH)" but 0.
- Rely in BRUSH::cjGetObject behavior which returns 0 when cjSize is 0.

Co-authored-by: Víctor Martínez Calvo <victormartinez@alub.io>
2022-05-03 16:00:21 +02:00
Katayama Hirofumi MZ 2ef605d428
[NTUSER] Fix UserDestroyInputContet (again and again) (#4482)
Add call of UserMarkObjectDestroy.
Fix hung-up. CORE-11700
2022-05-03 10:17:30 +09:00
Katayama Hirofumi MZ 4a748a3a97
[NTUSER] Fix UserDestroyInputContext (again) (#4476)
Fix the HIMC handle leak. CORE-11700
2022-05-03 03:43:26 +09:00
Hervé Poussineau 14d50cc6c0 [WIN32SS] Improve selection of 'closest graphic mode'
If color depth is not provided (in registry), try to find a 32 bit one.
If not found, fall back to first available graphic mode.

CORE-18027
2022-05-01 16:36:48 +02:00
Hervé Poussineau d8b3402fe6 [WIN32SS] In PDEVOBJ_vRefreshModeList, do not change current stored mode
When changing current devmode, we must not only change ppdev->pdmwDev
pointer, but also update lots of other structures. This work is done by
PDEVOBJ_lChangeDisplaySettings.

CORE-18169
2022-04-30 23:33:42 +02:00
Hervé Poussineau d1cd80c861 [WIN32SS] Set DISPLAY_DEVICE_PRIMARY_DEVICE flag
This flag was not set anymore since 2d2824f1b9
Note that this is still wrong for multi-monitor.

CORE-18169
2022-04-30 22:02:28 +02:00
Hervé Poussineau cb504d7b0c [WIN32SS] Fix crash if releasing a PDEVOBJ before switching to graphic mode
- do not try to remove ppdev from gppdevList if gppdevList is NULL
- do not check (and maybe change) gpmdev, as it should be done only in MDEVOBJ_vDestroy
2022-04-25 22:18:41 +02:00
Katayama Hirofumi MZ 0b0e73d66e
[NTUSER] Add locking at IntSendFocusMessage (#4468)
Fix access violation on IntFocusSetInputContext.
- Add locking on pWndPrev.
CORE-18163
2022-04-25 11:36:00 +09:00
Katayama Hirofumi MZ 8f719cb97e
[NTUSER][IMM32] Create the default IME window! (retry) (#4463)
The default IME window has to be created for each top-level window in specific condition. It is needed for implementing Japanese input.
- Add IntFocusSetInputContext helper function.
- Call IntFocusSetInputContext after sending WM_KILLFOCUS message.
- Add IntWantImeWindow, co_IntCreateDefaultImeWindow, and IntDestroyOwnedWindows helper functions.
- Create the default IME window (spwndDefaultIme) for the specified window at IntCreateWindow.
- Fix Imm32InternalLockIMC function.
CORE-11700
2022-04-23 07:11:48 +09:00
Katayama Hirofumi MZ 4bcf23d1de
[NTUSER] Destroy the default IME window (#4462)
- Add IntFindNonImeRelatedWndOfSameThread, IntImeCanDestroyDefIMEforChild, and IntImeCanDestroyDefIME helper functions.
- Do assignment unlock spwndDefaultIme at co_UserFreeWindow.
- Destroy the default IME window of the specified window if necessary at co_UserDestroyWindow.
CORE-11700
2022-04-20 16:10:06 +09:00
Katayama Hirofumi MZ 291a94cd6f
[NTUSER] Implement NtUserSetImeOwnerWindow (#4460)
- Add IntImeSetFutureOwner, IntGetLastTopMostWindowNoIME, IntImeSetTopMost, and IntImeCheckTopmost helper functions.
- Implement NtUserSetImeOwnerWindow function.
CORE-11700
2022-04-19 19:03:12 +09:00
Katayama Hirofumi MZ 5df5ef2bdf
[NTUSER] Do assignment lock at NtUserSetThreadLayoutHandles (#4459)
- Use UserAssignmentLock in NtUserSetThreadLayoutHandles.
- Add Win: comments to many functions.
- Rename glcid as glcidSystem.
CORE-11700
2022-04-19 08:41:13 +09:00
Katayama Hirofumi MZ c35488ec70
[NTUSER][USER32] Implement ImeWnd_OnImeNotify (#4457)
- Add code to ImeWnd_OnImeNotify function.
- Insert ASSERT(pimeui->spwnd != NULL); to some functions.
- Renaming: s/THREADSTATE_UNKNOWN17/THREADSTATE_CHECKCONIME/.
- Improve ImeWnd_OnImeSetContext function.
CORE-11700
2022-04-19 07:48:16 +09:00
Hervé Poussineau 2c391b1eab [WIN32SS] Fix buffer overflow in MDEVOBJ when having more than 10 display devices 2022-04-18 20:01:37 +02:00
Hervé Poussineau aa80cfb46e [WIN32SS] Fix some memory leaks (introduced in 21ddeb76d9) 2022-04-18 16:23:52 +02:00
Katayama Hirofumi MZ 7e13883723
[NTUSER] Do assignment lock pti->spDefaultImc (#4456)
According to JIRA user simonelombardo, there was crash in exiting a thread.
- Add UserAssignmentLock, and UserAssignmentUnlock helper functions.
- Lock and unlock pti->spDefaultImc by using those helper functions.
CORE-18044
2022-04-18 08:23:18 +09:00
Hervé Poussineau 0ce5985109 [WIN32SS] Do not call DrvEnableDriver/DrvDisableDriver for LDEV_IMAGE types 2022-04-17 16:20:04 +02:00
Hervé Poussineau 1744b01ad9 [WIN32SS] Rewrite LDEVOBJ reference counting
- introduce LDEVOBJ_vDisableDriver (reversal of LDEVOBJ_bEnableDriver)
- introduce LDEVOBJ_bUnloadImage (reversal of LDEVOBJ_pLoadDriver)
- introduce LDEVOBJ_vDereference, to remove a reference to a LDEVOBJ

Also:
- correctly handle success to unload the image, by removing it from pldev list
- correctly handle failure to unload the image, by re-enabling the driver
- simplify EngUnloadImage, as a wrapper around LDEVOBJ_vDereference
- move LDEVOBJ_ulGetDriverModes lower to prevent forward declaration of
  LDEVOBJ_vDereference

Unfortunately, disable driver unloading as long as ntoskrnl can't reload
a driver it just unloaded...
2022-04-17 08:48:33 +02:00
Hervé Poussineau 3a1a2aa16f [WIN32SS] Fix use of unitialized variable 2022-04-17 08:46:09 +02:00
Katayama Hirofumi MZ 567b0700fe
[NTUSER] Add 'Win:' comments to some functions (#4453) 2022-04-17 06:53:37 +09:00
Katayama Hirofumi MZ 34600f3ddf
[USER32] Add 'Win:' info to misc/imm.c (#4452)
- Add many Win: comments to misc/imm.c.
- Rename GetImmFileName as User32GetImmFileName.
- Rename bImmInitializing as gbImmInitializing.
- Rename gnImmUnknownFlag1 as gfConIme.
- Formating UpdatePerUserImmEnabling code.
CORE-11700
2022-04-16 14:34:06 +09:00
James Tabor 001e300d92 [Win32SS] Fix Build 2
Fix Build 2
2022-04-15 19:30:59 -05:00
James Tabor b1d27cd0fb [Win32SS] Fix Build
Fix Build
2022-04-15 19:27:50 -05:00
James Tabor 250e5ef38f [ENG] Update Structure
Update GRAPHICS_DEVICE monitor count and video monitor device pointer.
Update dwAccelerationLeve comments.
Updated for printer support.
2022-04-15 19:19:54 -05:00
Hervé Poussineau 9400063aae [WIN32SS] Enable multidisplay driver when required
For now, it is only a stub which returns an error.
2022-04-15 23:09:16 +02:00
Hervé Poussineau f3f4cc0f25 [WIN32SS] Implement EngQueryDeviceAttribute 2022-04-15 23:09:16 +02:00
Hervé Poussineau c89ac107ce [WIN32SS] Handle Graphics acceleration level (registry key Acceleration.Level)
- store the acceleration level in PDEVOBJ
- when searching a pdev, search a pdev with required acceleration level
- disable some functions when not at full acceleration level
  (levels 3 and 5 are not implemented)
2022-04-15 23:09:16 +02:00
Hervé Poussineau 494de7c2df [WIN32SS] Remove now unused code
Initialization of device mode list will be done later, just before switching to graphics mode.

If no graphic display is available, we will now fail when starting first GUI application in
co_IntGraphicsCheck(). Add a bugcheck here to prevent frozen screen.
2022-04-15 23:09:16 +02:00
Hervé Poussineau 2d2824f1b9 [WIN32SS] Implement PDEVOBJ_lChangeDisplaySettings to create initial MDEV
This function can create a MDEV for the whole display (maybe containing multiple
PDEVs), or update settings of a specific PDEV.

- call PDEVOBJ_lChangeDisplaySettings when switching to graphics mode.
- modify EngpGetPDEV to search requested PDEV only in current MDEV
2022-04-15 23:09:16 +02:00
Hervé Poussineau 9db63ad595 [WIN32SS] Add functions related to MDEV (creation, destruction...) 2022-04-15 23:09:16 +02:00
Hervé Poussineau a0cfdcd409 [WIN32SS] Introduce the MDEVOBJ structure
This will be used (later) to store the list of all enabled display devices.

Add a global variable gpmdev (should really be stored in DISPLAYINFO structure)
Replace global variable gppdevPrimary by pmdev->ppdevGlobal.
2022-04-15 23:09:16 +02:00
Hervé Poussineau 0f617ddfbb [WIN32SS] Rewrite EngpCreatePDEV as PDEVOBJ_Create
- change first argument to be a PGRAPHICS_DEVICE instead of a device name
- add ldevtype (for now, only LDEV_DEVICE_DISPLAY is allowed)
- always pass a devmode if ldevtype is LDEV_DEVICE_DISPLAY
- insert the ppdev into gppdevList on success
- change callers to adapt them to new rules
2022-04-15 23:09:16 +02:00
Hervé Poussineau c5fb89dced [WIN32SS] Add PDEVOBJ_vEnableDisplay and PDEVOBJ_bDisplayDisplay
Use them where appropriate.
2022-04-15 23:09:16 +02:00
Hervé Poussineau 34085be22d [WIN32SS] Rename PDEVOBJ_vSwitchPdev to PDEVOBJ_bDynamicModeChange
Even if it currently always succeeds, let it return a boolean for later.
2022-04-15 23:09:16 +02:00
Hervé Poussineau 241e579dfa [WIN32SS] Improve PDEVOBJ_bEnablePDEV/PDEVOBJ_vRelease/PDEVOBJ_pSurface
- use debug channels
- handle a NULL ppdev->pGraphicsDevice
- unreference graphic driver when needed
2022-04-15 23:09:16 +02:00
Hervé Poussineau ded971c425 [WIN32SS] Remove useless parameter dwFlags in EngpFindGraphicsDevice() 2022-04-15 23:09:16 +02:00
Hervé Poussineau 75f4be53df [WIN32SS] Preparation to load internal drivers (ie entry point in win32k)
- Change LDEVOBJ_bEnableDriver to directly take the entry point
  (pGdiDriverInfo not required anymore)
- Add LDEVOBJ_pLoadInternal to load and start an internal driver
2022-04-15 23:09:16 +02:00
Hervé Poussineau 333f3382f6 [WIN32SS] Remove useless prototype (function never existed) 2022-04-15 23:09:16 +02:00
Hervé Poussineau 3cb1dd8ab2 [WIN32SS] Rewrite PDEVOBJ_pdmMatchDevMode to LDEVOBJ_bProbeAndCaptureDevmode
- make it return a new allocated PDEVMODEW instead of a pointer into
  existing PGRAPHICS_DEVICE (usefull when available display modes can
  dynamically change: VirtualBox, RDP, ...)
- update all callers
2022-04-15 23:09:16 +02:00
Hervé Poussineau 21ddeb76d9 [WIN32SS] Extract devmode list query to new function LDEVOBJ_bBuildDevmodeList
LDEVOBJ_bBuildDevmodeList() only queries the available display modes, without
choosing the one to use on the graphic device, and without immediately
creating a PDEV.

Replace first part of EngpPopulateDeviceModeList() function by a call
to this new function LDEVOBJ_bBuildDevmodeList().
Keep second part of EngpPopulateDeviceModeList() function, which
chooses the default display mode.
2022-04-15 23:09:16 +02:00
Hervé Poussineau 7d93362f5a [WIN32SS] Implement LDEVOBJ_ulGetDriverModes
- implement LDEVOBJ_ulGetDriverModes (which get modes from a not yet loaded driver),
  and use it in EngpPopulateDeviceModeList
- remove now useless LDEVOBJ_pdmiGetModes (replaced by LDEVOBJ_ulGetDriverModes)
2022-04-15 23:09:16 +02:00
Hervé Poussineau 3b234cce25 [WIN32SS] Rename EngLoadDriverEx to LDEVOBJ_pLoadDriver 2022-04-15 23:09:16 +02:00
Katayama Hirofumi MZ 3820744a18
[NTUSER][IMM32_APITEST] Associate HIMC to WND (#4451)
- Set the default input context to WND at IntCreateWindow function.
- Add more tests to the himc testcase of imm32_apitest.
CORE-11700
2022-04-15 13:16:50 +09:00
Katayama Hirofumi MZ 05bbbd7d8b
[NTUSER] Dereference spDefaultImc at UserCreateInputContext (#4446)
Dereference pti->spDefaultImc by UserDereferenceObject if pti->spDefaultImc is NULL at UserCreateInputContext function. CORE-11700
2022-04-11 10:53:36 +09:00
Katayama Hirofumi MZ 88c1d8c737
[NTUSER] Set error on NtUserCreateInputContext (#4444)
Set the error code correctly on NtUserCreateInputContext.
CORE-11700
2022-04-10 19:26:19 +09:00
Katayama Hirofumi MZ 0f1e19a7b6
[NTUSER] Simplify IntDestroyInputContext (#4443)
CORE-11700
2022-04-10 17:20:21 +09:00
Katayama Hirofumi MZ eb902e5bee
[NTUSER] Improve NtUserDestroyInputContext etc. (#4442)
CORE-11700
2022-04-10 12:27:38 +09:00
Katayama Hirofumi MZ de38e3be61
[NTUSER][INCLUDE] Add IMC offset info (#4439)
Add C_ASSERT assertions on the offsets of the members of IMC structure. CORE-11700
2022-04-10 07:27:30 +09:00
Hermès Bélusca-Maïto 04eca8e2b2
[WIN32K] Remove incorrect packing specification around _TL, _WIN32THREAD and _THREADINFO structures.
CORE-18140

This was introduced historically in commit 583de66b3 (r7460) to
workaround some compiler problems (or replace already existing
GCC-specific __attribute__((packed)) annotations); however these
structures are in-memory-only, do not describe any on-disk data
format and don't describe hardware-specific data. So they should
have the "natural" alignment of the target platform.

They also have to match the documented layouts at:
https://reactos.org/wiki/Techwiki:Win32k/THREADINFO
https://www.geoffchappell.com/studies/windows/km/win32k/structs/threadinfo/index.htm
at least for the compatible parts that ReactOS shares.
2022-04-09 23:31:44 +02:00
Katayama Hirofumi MZ 4342b84c9a
[IMM32] Add ctf.c for Cicero (#4430)
Preparing of Cicero (modern input method) support.

- Add ctf.c and add some CTF functions.
- Modify the IMM table.
- Modify imm32.spec.
- Rename: s/Imm32FreeImeStates/Imm32DestroyImeModeSaver/.
- Improve Imm32DestroyInputContext.

CORE-11700
2022-04-07 22:55:33 +09:00