reactos/win32ss/user/ntuser
Joachim Henze 13133ecefa [0.4.7][USER32][NTUSER][3DTEXT] Squashed backport
[USER32] GetQueueStatus() should not return 0 when passing QS_ALLINPUT flag that includes QS_RAWINPUT (#4115)

GTK applications call GetQueueStatus(QS_ALLINPUT), where QS_ALLINPUT
specifies the QS_RAWINPUT flag as well, when these are compiled for
Windows XP+, and they expect the call to succeed on this platform.

On one side, ReactOS does not currently support this flag at all, but
since it claims to be XP/2003-compatible, applications may implicitly
expect the flag to be supported by GetQueueStatus() and the function
*NOT* failing when this flag is set.
(Later GTK apps don't care and just call GetQueueStatus(QS_ALLINPUT)
that includes QS_RAWINPUT, and therefore would fail as well on e.g.
Windows 2000...)

Otherwise, an observable effect is that some versions of libgdk-win32-2.0.0.dll
enter into an infinite loop when calling GetQueueStatus(QS_ALLINPUT),
since this call always failed on ReactOS.

On the other side, however, we should honour our winetests that handle
the presence of the QS_RAWINPUT flag and behave differently accordingly.
But since we do not support QS_RAWINPUT yet, we should keep their old
behaviour where QS_RAWINPUT is unused.

Thus, in order to accomodate both sides, we don't fail the GetQueueStatus()
call, but just set the ERROR_INVALID_FLAGS last error and continue it.

This fixes:
'All user32:TrackMouseEvent tests'
CORE-15686: Gimp 2.8.22 from rapps hangs after startup with 90%-100% CPU usage
and many dupes of that ticket like:
CORE-17551: Ardour hangs at the first start (GTK2 issue)
CORE-15151: newer "Inkscape 0.92.3" is unusable due to WIN32SS message queue lockup
CORE-14086: RawTherapee 5.0-r1-gtk2 fails to start (using 100% CPU)
CORE-11850: Geany 1.28 hangs with endless MsqSendMessage timed out
CORE-8475: Wireshark hangs after launch

It will also slightly appease, but not entirely fix:
CORE-8217: 3D Text ScreenSaver freezes system

Fix picked from 0.4.15-dev-3407-g 9c4397afdf
---------------------
[NTUSER] Do not remove message from the Msg Queue if it is not for us. (#4129)

CORE-8217 This part of the fix keeps the buttons working (Cancel/Ok/top-Right-X) even under high CPU-load
Patch from 'I_Kill_Bugs' contributor.

Fix picked from 0.4.15-dev-3499-g 7d1b50394b
---------------------
[3DTEXT] Fix 3dtext.scr using near 100% CPU (#4125) CORE-17866, CORE-8217

Fix picked from 0.4.15-dev-3443-g 5c9fdcb1de
2022-02-08 13:07:55 +01:00
..
misc
accelerator.c
accelerator.h
callback.c
callback.h
callproc.c
caret.c
caret.h
class.c
class.h
clipboard.c [0.4.7][WIN32SS] Fix BSOD 0x1E nullptr deref via Git-bash CORE-16586 2021-01-16 15:53:21 +01:00
clipboard.h
console.c
csr.c
csr.h
cursoricon.c
cursoricon.h
dce.h
dde.c
defwnd.c [0.4.7][WIN32SS] Fix last user visible parts of regression CORE-10855 2020-11-09 22:50:03 +01:00
desktop.c [WIN32K][DESK.CPL]: Add fit and fill background placement options (#28) 2017-10-13 21:44:02 +02:00
desktop.h
display.c [0.4.7][WIN32SS] Fix many regressions of fullscreen switching, all caused by SVN r75407 2020-10-07 02:55:20 +02:00
draw.c [0.4.7][WIN32SS] Fix Mask for Draw Frame States CORE-8808 2022-01-30 22:51:37 +01:00
event.c
focus.c [0.4.7][WIN32SS] Improve many apps not starting with active taskbar pane (#2396) 2020-12-19 20:53:37 +01:00
focus.h
guicheck.c
guicheck.h
hook.c
hook.h
hotkey.c
hotkey.h
ime.c
input.c
input.h
kbdlayout.c
keyboard.c
layered.c
main.c [0.4.7][NTUSER] Fix regression CORE-11828 2020-10-11 23:48:59 +02:00
menu.c [0.4.7][NTUSER][USER32] Tracking menu CORE-17338 (#4048), [EXPLORER] Send WM_POPUPSYSTEMMENU asynchronously (#4047) CORE-16353 2022-01-10 07:20:11 +01:00
menu.h
message.c
metric.c
misc.c [0.4.7][WIN32SS] Remove an ambiguous assert entirely CORE-16738 2022-02-05 01:59:29 +01:00
mmcopy.h
monitor.c
monitor.h
mouse.c [0.4.7] cherry-pick [WIN32K] Check if the window being destroyed is currently tracked. by mjansen CORE-13619 (to fix several related BSODs) 2017-11-05 14:22:49 +01:00
msgqueue.c [0.4.7][USER32][NTUSER][3DTEXT] Squashed backport 2022-02-08 13:07:55 +01:00
msgqueue.h
nonclient.c [0.4.7][WIN32K:NTUSER] Avoid dereferencing a null pointer in NC_DoNCPaint. 2020-10-12 23:08:56 +02:00
ntstubs.c [0.4.7][WIN32K][NTUSER] Tiny codestyle fix to NtUserLockWindowUpdate (#1066) 2020-12-21 10:14:51 +01:00
ntuser.c
ntuser.h
object.c
object.h
painting.c [0.4.7][WIN32K:NTUSER] Properly fix IntSendChildNCPaint() & IntLinkWindow() 2020-12-23 02:23:59 +01:00
painting.h
prop.c
prop.h
scroll.h
scrollbar.c [0.4.7][WIN32SS] Fix scrollbar bug CORE-15557 & CORE-13986 2020-12-01 16:37:58 +01:00
scrollex.c
session.c
shutdown.c
shutdown.h
simplecall.c
sysparams.c [WIN32K][DESK.CPL]: Add fit and fill background placement options (#28) 2017-10-13 21:44:02 +02:00
sysparams.h [WIN32K][DESK.CPL]: Add fit and fill background placement options (#28) 2017-10-13 21:44:02 +02:00
tags.h
timer.c
timer.h
useratom.c
useratom.h
userfuncs.h
usrheap.c
usrheap.h
vis.c
vis.h
win32.h
win32kdebug.h [0.4.7][WIN32K] Fix DBG_PRINT macro. 2020-12-21 09:26:51 +01:00
windc.c
window.c [0.4.7][WIN32K:NTUSER] Properly fix IntSendChildNCPaint() & IntLinkWindow() 2020-12-23 02:23:59 +01:00
window.h
winpos.c [0.4.7][WIN32K:NTUSER] Properly fix IntSendChildNCPaint() & IntLinkWindow() 2020-12-23 02:23:59 +01:00
winpos.h
winsta.c [0.4.7][WIN32K] Implement UOI_FLAGS in NtUserGetObjectInformation(). 2020-11-01 17:48:28 +01:00
winsta.h