Commit graph

272 commits

Author SHA1 Message Date
Giannis Adamopoulos b3399c68e9 [WINSRV] ConSrvConnect: Always store the control dispatcher routine
This shouldn't be used only for console applications but can potentially be used by any application to receive shutdown notifications.
MSDN provides more information in the documentation for SetConsoleCtrlHandler. Our services.exe also expect to receive shutdown notifications in this way.
2019-01-04 19:38:36 +02:00
Giannis Adamopoulos cb2dcc0a2f [WINSRV] usersrv: Fix a wrong debug print 2019-01-04 19:30:17 +02:00
Giannis Adamopoulos 8ebff93b35 [WINSRV] usersrv: Don't terminate processes with no top level windows
Consrv will handle these.
2019-01-04 13:29:26 +02:00
Giannis Adamopoulos cc710885d0 [WINSRV] usersrv: remove wrong dead code and fix indentation 2019-01-04 13:29:26 +02:00
Giannis Adamopoulos 4bef6f5913 [WINSRV] consrv: Implement terminating console processes on shutdown
Also stub handling non-console, non-gui processes.
2019-01-04 13:29:26 +02:00
Giannis Adamopoulos 0a80b77e76 [WINSRV] usersrv: Simplify sanity checks in UserClientShutdown
UserClientShutdown will never be called for csrss so we don't need to have a check for that. The existing check was broken and wasn't doing anything anyway.
Handle processing winlogon by doing nothing so that consrv won't be bothered about it.
2019-01-04 13:29:26 +02:00
Katayama Hirofumi MZ dfa23b60ec [USER32] Let App Switcher activate only one window (#1214) 2019-01-03 16:34:58 +01:00
Hermès Bélusca-Maïto 333ce14dad
[WIN32SS] Try to recover display when changing the display mode fails for whatever reason.
This helps when e.g. changing the resolution on the Dell Latitude D531,
which reports that it supports large resolutions (e.g. 1920x1440x32 and
others larger than 1024x768x32) but fails to apply these.
This usually happens because PDEVOBJ_pSurface(), and more precisely
ppdev->pldev->pfn.EnableSurface(), fails for these resolutions.

- PDEVOBJ_bSwitchMode(): Set the new video mode, or restore the original
  one in case of failure + release the allocated ppdevTmp if previous
  calls fail. Also unlock in reverse order of locking order.

- UserChangeDisplaySettings(): In case PDEVOBJ_pSurface() fails (but has
  reverted the original video mode), we still need to refresh the
  display since the display may have been messed up.
2019-01-02 21:12:22 +01:00
Hermès Bélusca-Maïto fb4a6e38c7
[WIN32SS:NTUSER] Remove some hardcoded buffer sizes + number of chars vs. bytes mixup. 2019-01-02 21:12:21 +01:00
Hermès Bélusca-Maïto cc3fbfefac
[WIN32SS:NTUSER] Minor whitespace formatting. 2019-01-02 21:12:20 +01:00
Hermès Bélusca-Maïto 3f716870ca
[FRAMEBUF] Correctly check the return value of the EngDeviceIoControl() call and return adequate value in DrvAssertMode(). 2019-01-02 21:12:19 +01:00
Giannis Adamopoulos 60448f83fb [NTUSER] Fix a few tests related to desktops and window stations
- NtUserOpenInputDesktop: Don't crash if there is no input desktop yet
- NtUserOpenInputDesktop: Fail if the process doesn't belong to the interactive window station
- NtUserCreateWindowStation: Clear error on success
- DesktopWindowProc: Use UserOpenInputDesktop to get a handle to the input desktop
2019-01-02 17:15:40 +02:00
Julio Carchi 1e141573e4 [TRANSLATION] Spanish translations (#944) 2019-01-02 12:01:44 +01:00
Pierre Schweitzer 01b580d876
[WIN32K] Deny deviceless calls to EngDeviceIoControl
This fixes BSOD happening in ntoskrnl coming from win32k under certain
conditions with 3rd party display drivers (such as VBox or VMware)
2018-12-31 20:35:17 +01:00
Katayama Hirofumi MZ f757a13519
[FONT][WIN32SS] Partially implement font/text rotation (#1207)
Partially implement font/text rotation by LOGFONT.lfEscapement and improve the rendering image. If the angle was not a multiple of 90 degrees, then the background won't be filled. CORE-11848, CORE-15319
2018-12-31 18:56:43 +09:00
Timo Kreuzer 71fefa32db
[NDK][NTOS] Add global definition of INIT_FUNCTION/INIT_SECTION (#779)
* Add an NDK header to define INIT_FUNCTION/INIT_SECTION globally
* Use _declspec(allocate(x)) and _declspec(code_seg(x)) on MSVC versions that support it
* Use INIT_FUNCTION on functions only and INIT_SECTION on data only (required by MSVC)
* Place INIT_FUNCTION before the return type (required by MSVC)
* Make sure declarations and implementations share the same modifiers (required by MSVC)
* Add a global linker option to suppress warnings about defined but unused INIT section
* Merge INIT section into .text in freeldr
2018-12-30 12:19:11 +01:00
Thomas Faber e3c8002dfc
[WIN32K:NTUSER] Reference menus owned by a popup menu. CORE-15504 2018-12-30 00:25:01 +01:00
Mark Jansen 86ea03bf51
[FONT][WIN32SS] Re-add casts for gcc 2018-12-29 20:06:04 +01:00
Mark Jansen 85db46d75c
[FONT][WIN32SS] Remove casts 2018-12-29 19:47:00 +01:00
Mark Jansen 971c657b80
[FONT][WIN32SS] Hold the freetype lock while accessing freetype data 2018-12-29 19:47:00 +01:00
Mark Jansen 2e44e5ce54
[FONT][WIN32SS] Fix a memory leak 2018-12-29 19:47:00 +01:00
Mark Jansen 1f13b95e5b
[FONT][WIN32SS] Fix a memory leak 2018-12-29 19:47:00 +01:00
Mark Jansen 1d1b7f46fc
[FONT][WIN32SS] Hold the freetype lock while accessing freetype data 2018-12-29 19:47:00 +01:00
Mark Jansen 436d8d962a
[FONT][WIN32SS] Hold the freetype lock while accessing freetype data 2018-12-29 19:46:59 +01:00
Mark Jansen 2fa400b521
[FONT][WIN32SS] Do not return an uninitialized variable 2018-12-29 19:46:59 +01:00
Thomas Faber c526f94b8c
[WIN32K:NTUSER] Acquire the user lock exclusively in NtUserGetSystemMenu. CORE-15512 2018-12-28 13:59:33 +01:00
Katayama Hirofumi MZ 65f0926086
[MENU][WIN32SS] Fix non-menubar menu text Y position (#1199)
CORE-15226
2018-12-28 12:12:42 +09:00
Katayama Hirofumi MZ 6ee576f91d [FONT][WIN32SS] Optimize a bit 2018-12-27 09:23:49 +09:00
Katayama Hirofumi MZ be84465883 [FONT][WIN32SS] Follow-up of #1184 2018-12-25 21:54:33 +09:00
Katayama Hirofumi MZ d6cfeaef51
[FONT][WIN32SS] Refactor rendering text background (#1184)
Simplify the background filling codes. CORE-14856
2018-12-25 20:41:25 +09:00
Katayama Hirofumi MZ 968c8f37f1
[WIN32SS] Fix RLE4 bitmap decoding (#1188)
CORE-10553, CORE-11399
2018-12-25 18:04:21 +09:00
Giannis Adamopoulos 1a8d9f12d6 [NTUSER] Implement creating the system threads
- Add UserCreateSystemThread function that will signal csrss to create a new system thread.
- NtUserCreateWindowStation: Create the raw input thread and the desktop thread when the IO window station gets created.
- IntMakeHungWindowGhosted: Create the ghost system thread that will own all ghost windows.
- Let the raw input thread manage the window station of csrss.

[USERSRV] Remove system threads creating hack
- Implement SrvCreateSystemThreads
- Don't create the system threads in UserServerDllInitialization.
2018-12-19 16:13:18 +02:00
Giannis Adamopoulos 3ec7b163c9 [WINSRV] Add a hack to fix giving the api port to win32k
- Register our api port with win32k in SrvRegisterLogonProcess because UserClientConnect is never really called.

[NTUSER] Silence a noisy trace
2018-12-19 16:13:18 +02:00
Giannis Adamopoulos dad76af8a4 [NTUSER] Fix desktop and window station assignment for csrss
- NtUserSetInformationThread: Stub UserThreadUseActiveDesktop and UserThreadRestoreDesktop
- Properly mark the first thread that enters win32k belonging to csrss. At this point we assume that since gpepCSRSS isn't initialized yet, it probably is the first thread.

[WINSRV] Use NtUserSetInformationThread to set the current desktop when needed
-When csrss needs to use user32 or enter win32k, it first needs to assign the current thread to a desktop.
2018-12-19 16:13:18 +02:00
Giannis Adamopoulos 298a46acbf [NTUSER] Don't crash when the current thread doesn't have a desktop 2018-12-19 16:13:18 +02:00
Giannis Adamopoulos b2a5f5dbb3 [WINSRV] Fix setting the console title 2018-12-19 16:13:18 +02:00
Katayama Hirofumi MZ 00dd17e6e5
[USER32] App Switcher Arrow keys (#1136)
Implement Arrow keys on App Switcher (Alt+Tab). CORE-15449
2018-12-16 08:42:20 +09:00
Katayama Hirofumi MZ aa04a0a6d3
[WIN32SS] Replace ASSERT(FALSE); in IntGhostWindowFromHungWindow (#1116)
CORE-11944
2018-12-12 08:03:49 +09:00
Katayama Hirofumi MZ 43e2089476
[WIN32SS][FONT] Check NULL of Face->style_name (#1113)
CORE-15433
2018-12-11 18:32:39 +09:00
Katayama Hirofumi MZ f469acacec
[WIN32SS][USER32] Add Ghost codes (retrial of #1100) (#1112)
CORE-11944
2018-12-11 12:30:59 +09:00
Katayama Hirofumi MZ 99b055a506
Revert "[WIN32SS][USER32] Add codes for Ghost Window (#1100)" (#1110)
This reverts commit 1adefd180c. ReactOS wouldn't startup.
2018-12-11 11:30:00 +09:00
Katayama Hirofumi MZ 1adefd180c
[WIN32SS][USER32] Add codes for Ghost Window (#1100)
CORE-11944
2018-12-11 10:48:23 +09:00
Pierre Schweitzer 958ae44599
[WIN32SS] Shhhhh! 2018-12-09 22:00:53 +01:00
Pierre Schweitzer 53a313f456
[USER32] Complete French translation 2018-12-09 09:38:31 +01:00
Stanislav Motylkov 6c7094acb8 [USER32] Update russian translation
Addendum to 6a944b5.
2018-12-08 23:36:06 +01:00
Katayama Hirofumi MZ e90954304d
[WIN32SS][FONT] Add some assertions (#1098) 2018-12-06 12:47:02 +09:00
Katayama Hirofumi MZ 93757884c1
[WIN32SS][FONT] Improve FamilyUnknown Penalty (#1097)
CORE-15419
2018-12-06 09:32:02 +09:00
Katayama Hirofumi MZ 88ddb37acb
[WIN32SS][FONT] Use HHEA table metrics if (fsSelection & 0x80) (#1093)
This PR will fix too tiny glyph rendering. CORE-15166
2018-12-05 21:05:42 +09:00
Katayama Hirofumi MZ 3fd2deefac
[USER32] Fix Task Switcher (#1086)
CORE-10481
2018-12-03 04:26:15 +09:00
Katayama Hirofumi MZ 6a944b556a
[USER32] Add Ghost window class (#1082)
CORE-11944
2018-12-02 18:51:44 +09:00