Commit graph

116 commits

Author SHA1 Message Date
Joachim Henze 9286a1fe0c [0.4.12][WIN32SS] WindowSnap must not affect the taskbar
This fixes regression CORE-16289 where we could not longer
move the taskbar at a different than default location,
as WindowSnap would interfere.

Many Thanks to the patches author Doug Lyons.

Eventually the heuristic that we use here to identify the
taskbar via used window-styles could be improved later.
Theoretically possible that it bails out on some other windows.

The regression was introduced by 0.4.12-dev-373-g
7e396787ed

patch is a backport from master 0.4.13-dev-962-g
4193b8d8ac
2019-08-20 12:11:36 +02:00
Joachim Henze d52cac4ca1 [0.4.12][WIN32SS] MENU_ShowPopup() We chicken out for this rls still
as the release data is close and we have to manage the risk.
This reverts last commit and all menu related code back to the state of
0.4.12-dev-369-g
007ec0310c

Although Mark Jansen seems to be on a very promising path in master,
we still revert one last time for this release to the more well known
state we had during 0.4.12dev'ing.

This will fix regressions CORE-16298, CORE-16297
and will keep CORE-15863 in fixed state.
Systray and nested desktop popups do work very well like this.

We therefore intentionally and willingly have to accept the broken
partial-offscreen-menus of CORE-15733.
Those are not as important as the other tickets.

Meanwhile we keep on improving master based on the more recent states.
2019-08-07 23:07:33 +02:00
Joachim Henze 3113d13793 [0.4.12][WIN32SS] Improve MENU_ShowPopup()
to fix regression CORE-15863
This is the work that Mark jansen committed into master
0.4.13-dev-791-g
a59df3858c
and
0.4.13-dev-792-g
7c45a646e9
and
0.4.13-dev-793-g
b5c6af459c

squashed into one single commit for 0.4.12RC.

It's not perfect yet anymore for positioning the
popup for systray icons if they contain many entries.
And also not perfect when pressing the context menu key
on desktop after a .lnk has been started,
but overall gives a better user-experience for nested popups
on the desktop, which is much more important.
We can build up on top of it later in master.
2019-08-06 21:48:35 +02:00
Joachim Henze 6f651b6ec5 [0.4.12][WIN32SS] Workaround Marlett drawing for Window close buttons CORE-16125
It regressed for RC by 0.4.12-RC-16-g
e1ac9dcd66

and for master by 0.4.13-dev-110-g
19fc9415bf

Thanks to Katayama Hirofumi MZ, the workarounds author.
We think it is a workaround, so we will not commit to master.

Testbot runs (executed on master) seem to be non-alarming
VBox https://reactos.org/testman/compare.php?ids=68471,68479
KVM https://reactos.org/testman/compare.php?ids=68472,68480
2019-07-08 00:05:00 +02:00
Joachim Henze ab7f77a021 [WIN32SS][NTUSER] Addendum to 0.4.12-dev-956-g0197c4f CORE-15893
Aims PixelPerfection for a regression that was introduced by
0.4.12-dev-954-g
1f619b2781

and then improved already by
0.4.12-dev-956-g
0197c4f875

The tweaking got ack of Jim Tabor. Test results:
https://reactos.org/testman/compare.php?ids=68026,68029

cherry-picked from 0.4.13-dev-397-g
3cc50cedaf
2019-06-10 15:38:23 +02:00
Joachim Henze a112b89ed5 [0.4.12] [NtUser] Apply review of jimtabor
to the workaround in last commit 0.4.12-RC-19-g
700779e643

Many thanks to reviewer jimtabor for this very prompt review!

I tested, the new state still succeeds in CORE-15477, CORE-14979, CORE-15599, CORE-15600, CORE-15654

Fixes 'multiple apps leaving the taskbar visible erroneously when switching into fullscreen.'
Please note that the problem with taskbar staying visible is only fixed for some, but not all apps
(see CORE-11242 for some still failing examples, e.g: Bound Around).

We now have the same state in 0.4.12RCs, that we just have committed to master in 0.4.13-dev-247-g
0f29b3faa7
2019-05-22 00:30:10 +02:00
Joachim Henze 700779e643 [0.4.12] [NtUser] Workaround regressions CORE-15477, CORE-14979, CORE-15599, CORE-15600, CORE-15654
Fixes 'multiple apps leaving the taskbar visible erroneously when switching into fullscreen.'
Please note that the problem with taskbar staying visible is only fixed for some, but not all apps (see CORE-11242 for examples).

This partially reverts commit 09ab5ea7ed (SVN r75407)
I applied this interim solution into 0.4.12RCs for the very first time and rls-tests still
have to prove it being free of obvious side-effects.
Theoretically we could still switch to a better solution at any time.
The workaround never was applied to master to date.

https://reactos.org/testman/compare.php?ids=67536,67539
2019-05-21 22:51:45 +02:00
jimtabor 3e71805ae1 [0.4.12] [NtUser] Fix Theme Non Client Painting, fixes the visible parts of regression CORE-15934
Resizing a themed window does not longer show a flashing rectangle in the title-bar after the fix.

Still this seems to be work-in-progress even after this first commit, but makes me happy for 0.4.12RCs
for now.

See CORE-7166 & CORE-15934.

cherry picked from commit 0.4.13-dev-8-g
cfdf36e442
2019-05-10 01:45:37 +02:00
Joachim Henze 5ac548544f [0.4.12] [WIN32SS] Appease regression CORE-15429 & fix CORE-15911
By applying for the first time clientFix.patch from CORE-15911 contributed by JIRA-user 'I_Kill_Bugs'.

The patch acts as a better replacement for a workaround of DougLyons from CORE-15429
that aimed to hide the issue for our file-browser only.

The new approach gave good results for the testbots
https://reactos.org/testman/compare.php?ids=66723,66729
but wasn't tested much yet. In case it causes any problems during testing-cycle,
I might eventually switch back to our old workaround instead from the last releases.
2019-04-15 19:46:36 +02:00
Maxim Smirnov ffb4b674c7 [FONT] Fix FontSmoothing 2019-04-07 01:42:29 +02:00
jimtabor 0197c4f875 [NtUser] Fix maximizing to window edge
Cover up the edge of the frame while maximizing the window to desktop.
Fixes CORE-15893.
2019-03-27 17:39:04 -05:00
jimtabor 1f619b2781 [Win32SS] Fix maximized window positioning.
Fix CORE-5177 TaskMgr and ProcExp possionong when maximized.
2019-03-26 15:56:57 -05:00
jimtabor 68df5a50e6 [NtUser] Support SWP_FRAMECHANGED
Implement SWP_FRAMECHANGED support for non-changing window to force a
redraw.

Patch dedicated to Katayama Hirofumi MZ.
2019-03-18 17:28:33 -05:00
Timo Kreuzer ba893e1172 [WIN32K] Keep a reference on an ETHREAD while THREADINFO exists 2019-03-10 11:14:40 +01:00
Mark Jansen d7ae8690ab
[WIN32K:NTUSER] Do not try to reposition an off-screen menu as if it were a popup menu
CORE-15733
2019-02-16 15:45:46 +01:00
Hermès Bélusca-Maïto 7bbf8ae688
[WIN32SS:NTUSER] Bugcheck in case two mandatory initialization steps are not fulfilled.
- Bugcheck VIDEO_DRIVER_INIT_FAILURE in case initializing video fails.
- Bugcheck WIN32K_INIT_OR_RIT_FAILURE (Windows-compatible) in case
  the USER subsystem version does not match.
2019-02-10 22:44:24 +01:00
Mark Jansen e022d8d7cb
[WIN32SS] Require at least the amount of extra memory, not the exact amount
This fixes Civ II trying to create scrollbars based on 'native' scrollbars.
2019-01-21 22:25:29 +01:00
Katayama Hirofumi MZ efe4605177
[WIN32SS][NTUSER] Fix caret position of Ghostscript (#1271)
CORE-13934, CORE-15656
2019-01-20 23:11:54 +09:00
Denis Malikov 37af78775d [WIN32SS:NTUSER] Fix Window-snap madness (#1246)
Desktop window was treated as possible to resize.
Fix for 7e396787

CORE-15624
2019-01-19 23:05:19 +01:00
Katayama Hirofumi MZ d0d909245f
[WIN32SS][NTUSER] Refactor PR #1226 (#1266)
Refactoring of #1226. CORE-12845
2019-01-19 23:56:33 +09:00
Katayama Hirofumi MZ 87bfbb3ec7 [WIN32SS][NTUSER] Fix PostTimeMessage message time 2019-01-16 22:59:36 +02:00
Denis Malikov 7e396787ed [WIN32SS:NTUSER] Implement "Window Snap" feature (#1226)
Implemented the following actions: stick the window on the left/right or maximize it,
with the following shortcuts:
 - Win key + Arrows;
 - drag to left/right screen border;
 - double-click on top/bottom.

CORE-12845
2019-01-15 14:36:41 +01:00
Mark Jansen 007ec0310c [WIN32K:NTUSER] Fix a case where the menu was off-screen on the other side
Found by Denis Malikov
CORE-15001
CORE-9037
2019-01-15 14:34:53 +02:00
Katayama Hirofumi MZ 8ca854251a
[WIN32SS][NTUSER] Don't freeze Task Bar in switching the app (#1243)
This avoids taskbar hung up.
2019-01-15 13:45:28 +09:00
Mark Jansen d2626f0c2a
[WIN32K:NTUSER] Find a better position for a menu that is off-screen
Previously, we would just stick the menu on the edge of the screen.
We should actually try to flip the menu around the point of origin,
and only when that fails move it to the edge of the screen.
CORE-15001
CORE-9037
2019-01-10 19:55:39 +01:00
Thomas Faber b2dcb8e0d8
[WIN32K:NTUSER] Avoid dereferencing a null pointer in NC_DoNCPaint. CORE-15569 2019-01-08 11:27:33 +01:00
Baruch Rutman 123a7c80e0
[NTUSER] Fix SetProcessDefaultLayout() (#1013)
- Add a check in co_UserCreateWindowEx() for parentless windows,
  that checks the default layout direction; if it's LAYOUT_RTL
  add the WS_EX_LAYOUTRTL flag to the extended window styles.

- Make the internal routine accepting also LAYOUT_LTR as a value for SetProcessDefaultLayout().
  Limit receiving value to LAYOUT_ORIENTATIONMASK (and not just LAYOUT_RTL)
  or LAYOUT_LTR, as per written in:
  https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-setprocessdefaultlayout

Now all the applications that call SetProcessDefaultLayout() to mirror the layout get mirrored.
This is based on Wine.
2019-01-06 04:35:51 +01:00
Hermès Bélusca-Maïto ca24df9c85
[WIN32SS:NTUSER] Completely update the metrics in co_IntInitializeDesktopGraphics().
This change is similar to what is done in UserChangeDisplaySettings()
after changing screen video mode.

This allows e.g. having windows to be correctly maximized during
2nd-stage GUI setup. To compare and reproduce during 2nd-stage GUI
setup, open cmd.exe (Shift-F10) and from there a GUI app, e.g.
regedit.exe, and maximize it. Observe the limits used by the window.
2019-01-05 16:42:16 +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
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
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
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
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
Katayama Hirofumi MZ aa04a0a6d3
[WIN32SS] Replace ASSERT(FALSE); in IntGhostWindowFromHungWindow (#1116)
CORE-11944
2018-12-12 08:03:49 +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
Katayama Hirofumi MZ b09487fb44
[WIN32SS] Add IntGoGhost function (stub) (#1081)
CORE-11944
2018-12-01 20:59:07 +09:00
Andrew Boyarshin f48eb70af3 [WIN32K][NTUSER] Specify constant name explicitly (#1067)
Reduce confusion by specifying the omitted constant HWND_TOP == 0.
2018-11-25 14:31:23 +01:00
Andrew Boyarshin 62ec69278d [WIN32K][NTUSER] Tiny codestyle fix to NtUserLockWindowUpdate (#1066)
Fix indentation (inconsistent with the rest of the file) and return actual BOOL.
2018-11-25 14:31:04 +01:00
Katayama Hirofumi MZ e39863bdf6
[WIN32SS] Fix SwitchToThisWindow for #998 (#999)
Reduce a failure in SwitchToThisWindow testcase of #998. CORE-15165
2018-10-30 17:24:47 +09:00
Katayama Hirofumi MZ 41b5f29514
[WIN32SS] Make window foreground in SwitchToThisWindow (#995)
CORE-15165
2018-10-30 08:13:05 +09:00