Commit Graph
76 Commits
Author SHA1 Message Date
James Tabor 6995f22fa9 [Win32SS]
- Implement OEM bitmaps sizes for server information. If more is need, it will be added. This will be plugged in later.

svn path=/trunk/; revision=68603
2015-08-06 00:56:01 +00:00
Daniel Reimer e675ab0cb6 Fixing some incorrectly written Reactos -> ReactOS
CORE-7524 #comment Some less of these now.

svn path=/trunk/; revision=67239
2015-04-18 09:01:23 +00:00
Timo Kreuzer 12e465be82 [WIN32SS/INCLUDE]
- Add ntwin32.h, move declaration of PTHREADINFO, PPROCESSINFO and W32CLIENTINFO there
- Avoid language extensions that are not C++ compatible
- Avoid dependenence to PTHREADINFO/PPROCESSINFO in ntuser.h and use incomplete types instead
- Move duplicate definition of PATRECT from ntusrtyp.h to user32.h private header

svn path=/trunk/; revision=66888
2015-03-25 22:32:06 +00:00
Timo Kreuzer 40e758b16f [WIN32K/INCLUDE]
Add ntwin32.h

svn path=/trunk/; revision=66887
2015-03-25 22:30:28 +00:00
Timo Kreuzer 1ddbcff3ca [WIN32K]
Add definition for DIB_PAL_INDICES and fix typo in the related brush flag (BR_IS_DIBPALINDICES). See http://support.microsoft.com/kb/kbview/108497

svn path=/trunk/; revision=66884
2015-03-25 22:27:05 +00:00
Hermès Bélusca-Maïto 444d33d50b [WIN32K]
- Implement NtUserResolveDesktop, which opens a desktop and a window station based on a desktop path string (format: "WinSta\Desktop").
- Move NtUserConsoleControl to a more suitable file, and implement the control code that allows CSRSS to assign console input threads to given desktops.
- Simplify a bit the code in NtUserSetInformationThread.

[CONSRV]
Turn the console input thread to a real one. There should be one such thread per desktop. When a console process is started, we open the desktop on which the process is going to start, we create a new input thread (attach it to the desktop) if needed, or reuse the existing one, and then we open the terminal on the correct desktop.

CORE-9346 #resolve #comment Fixed in revision 66662.

svn path=/trunk/; revision=66662
2015-03-11 01:21:29 +00:00
Timo Kreuzer 7aa570c1fd [WIN32K]
Fix some annotations

svn path=/trunk/; revision=66635
2015-03-10 00:08:54 +00:00
Hermès Bélusca-Maïto 42c3492b5c Revert tree-restructure attempt: r66583, r66582, r66581, r66578, sauf ntdll changes, r66576 and r66575 sauf mvdm changes (ok with Aleksander).
svn path=/trunk/; revision=66588
2015-03-06 14:33:02 +00:00
Hermès Bélusca-Maïto ddb90f1e10 Start source tree (final, I hope!) restructuration. Part 1/X
Win32, Shell, Services, MVDM

svn path=/trunk/; revision=66575
2015-03-05 23:03:33 +00:00
Timo Kreuzer ebdb755ed6 [WIN32K]
Rewrite NtUserSetCursorIconData
Fixes:
- Memory leaks
- Cursors left in an unpredictable / unhealthy state, including pointers to freed memory, when an operation failed
- Decision whether a cursor uses an ACON or CURSOR as the underlying structure based on user provided flags, instead of cursor flags, which were not even set in the first place.
- Allowing a usermode caller to corrupt the cusor structure, by converting an ACON with a smaller allocation size into a CURSOR
CORE-9301 #resolve

svn path=/trunk/; revision=66528
2015-03-01 22:00:24 +00:00
Timo Kreuzer 5e781d44e0 [WIN32K]
Get rid of our old cursoricon implementation. Rename cursoricon_new.c to cursoricon.c and remove all traces of NEW_CURSORICON

svn path=/trunk/; revision=66526
2015-03-01 17:36:12 +00:00
Giannis Adamopoulos e52e391e68 fix build. I forgot this file
svn path=/trunk/; revision=66458
2015-02-25 20:04:53 +00:00
James Tabor 25b96c6299 [Win32ss]
- Cleanup and remove unused code.

svn path=/trunk/; revision=66364
2015-02-20 06:24:04 +00:00
James Tabor 0a97b2b39d [Win32ss]
- Fix wine msg:test_winevents.
- Fix global hooks while sending to same process different thread. Yes, interesting.
- Fix event hooks, use posting (faster) instead of sending. This fixed a problem while sending to the same thread.

svn path=/trunk/; revision=66310
2015-02-16 03:32:46 +00:00
Amine Khaldi aeaff2bf59 [WIN32K:INCLUDES] Some formatting fixes. NFC.
svn path=/trunk/; revision=66196
2015-02-07 19:14:42 +00:00
Hermès Bélusca-Maïto 159c00fe95 [WIN32k:includes] Whitespace fixes.
svn path=/trunk/; revision=66194
2015-02-07 16:19:57 +00:00
Hermès Bélusca-Maïto b8d8fbdc9d [WINLOGON][WIN32K]
Move the shutdown privilege check from winlogon to win32k (function "UserInitiateShutdown") as it should be done.

[WIN32K]
- Introduce the pair of UserInitiateShutdown/UserEndShutdown calls that should be called when WINSRV starts a shutdown (and when it finishes it). In particular it is in UserInitiateShutdown that we need to check whether the caller has the rights to perform a shutdown (it should also have a valid window station).
- Remove the ROS-specific TWOPARAM_ROUTINE_EXITREACTOS call that is traded for Win2k3-compatible call to UserInitiateShutdown.

[WINSRV]
Hackfix our current ExitWindowsEx functionality (based on a patch by Alex made against r46050 for win32csr) to make it "compatible" with the improvements in win32k: impersonate the caller and call the UserInitiateShutdown win32k system call (instead of the TWOPARAM_ROUTINE_EXITREACTOS). More will come later on.

[USER32]
Win32k can require performing shutdown in an asynchronous way (needed also on WINSRV side) so we need to put all the code in a worker thread.

Part 8/X (part 6 was r65693 and part 7 was r66186).

CORE-8322 #comment Start to add Alex' win32csr shutdown patch in WINSRV; fixes for winlogon and additions to win32k.

svn path=/trunk/; revision=66192
2015-02-07 15:26:42 +00:00
James Tabor fe753e82c7 [Win32ss]
- Setup system cursors and icons. Could help with Themes.
- Set default cursor to the message queue structure.
- Fix wine cursor icon tests. Fix ATI cursor passing issue.
- Fix that sticky mouse cursor while the screen saver is on.
- Move cursor code from User32 and shake that pop up window too.
- Setup for window station security checking.
- Dedicated to the great work by Jérôme Gardou. Doing ones best to preserve his original code!

svn path=/trunk/; revision=66166
2015-02-05 00:11:35 +00:00
James Tabor 87a268ef23 [Win32ss]
- Fix remaining DDE issues, re-sync DDE code from wine. Add QOS startup. Moved error debug prints to traces. Over all improvement with test results.

svn path=/trunk/; revision=66011
2015-01-08 22:57:09 +00:00
James Tabor 2d94b2173f [Win32s]
- Implement DDE from wine. Leaving debug errors on the run and later move to trace. See CORE-7447.
- Use callbacks to User32 to convert the data and track it in Win32k.
- Add a new Quality of Service atom.
- Add things to class.c.
- Shell32 tests run now too, or only 4 run. This might be fixed too, since locating a lParam write back issue.

svn path=/trunk/; revision=66000
2015-01-08 00:56:51 +00:00
James Tabor ee1b62f7f1 [Win32s]
- Implement Ime (only) class support. This is for the new synced class tests. Recommending Developers choice for testing real Imm32.dll support. Should include registry Loading of IMM via Win32k.
- Based on patch by Piotr Caban : Move IME window procedure to user32.

svn path=/trunk/; revision=65977
2015-01-04 19:27:40 +00:00
James Tabor e004d2381e [Win32ss]
- Use proper structure name for packed DDE.

svn path=/trunk/; revision=65948
2015-01-03 06:22:31 +00:00
Timo Kreuzer e6475301eb [GDI32]
Import metafile code from wine. The wine code is unmodified (please keep it that way) and used through a wrapper function dispatcher and some helpers. Fixes 1931 wine tests.

svn path=/trunk/; revision=65893
2014-12-29 14:25:30 +00:00
Hermès Bélusca-Maïto a306e56c55 [WIN32K]
- Put GDI initialization function(s) in a dedicated file.
- Whitespace fixes...

svn path=/trunk/; revision=65852
2014-12-27 19:16:05 +00:00
James Tabor 5960c70f39 [Win32ss]
- Add header for Ime information. Setup support for Ime types and hot keys.
- Finish keyboard processing changes and call Imm process key for callback to user mode.

svn path=/trunk/; revision=65845
2014-12-27 06:59:29 +00:00
James Tabor 594e534dd0 [Win32k]
- Move IME from stubs into its own file. Add flags and types to main header.
- Later, how to add Ime.h from mingw (tested it and works) and not effect VC++ ? VC SDK has Ime.h.
- Getting ready for Window Class update based on current wine tests.

svn path=/trunk/; revision=65842
2014-12-27 03:00:09 +00:00
Hermès Bélusca-Maïto 5195c10036 [WIN32K]: Change the enum id name for something meaningful (here: PROC == process and not procedure).
svn path=/trunk/; revision=65824
2014-12-25 15:27:31 +00:00
Hermès Bélusca-Maïto 7afb72e9a2 [WIN32K]
Fix NtUserProcessConnect to use the process handle we give to it, instead of the "current process"... This should fix the user32 CSR connection that I was failing to fix in previous revisions...
CORE-8949

svn path=/trunk/; revision=65820
2014-12-24 15:48:37 +00:00
James Tabor b037edeae8 [Win32k]
- Crash is due to receiving an APC for the current sending thread. Prematurely freeing the data block and while the receiving thread did not have a chance to process it. Interception and calling back to user mode will allow thread to go away. What about the memory block, is it still allocated? A cleaver Hack can fix this, but still the application crashed leaving issues and trash laying about. See CORE-8779.

Reference:
http://msdn.microsoft.com/en-us/library/windows/hardware/ff565592(v=vs.85).aspx
"Yes, for thread termination. No, for user APCs."

svn path=/trunk/; revision=65744
2014-12-18 23:45:11 +00:00
Timo Kreuzer 2768e3abbd [WIN32K]
More improvements to region.c:
- PROSRGNDATA -> REGION, void -> VOID, int -> INT, uppercase struct names
- do not put assignments into if statements
- !x -> x == NULL for pointers
- Add additional parentheses / curly braces
- rename RGN_ATTR::Flags to iComplexity

svn path=/trunk/; revision=65720
2014-12-18 08:11:19 +00:00
Hermès Bélusca-Maïto c6fccde6d2 [WIN32K]
- Code formatting for NtUserProcessConnect.
[USER32]
- Hack a call to GetConnected in ClientThreadSetup in an attempt to temporarily "fix" a bug that makes the bots fail. Now we really need to fix user32 init!

svn path=/trunk/; revision=65714
2014-12-18 00:30:27 +00:00
Hermès Bélusca-Maïto 672f036f93 [HEADERS]
- Play around and declare USERSRV_API_CONNECTINFO (CSR-style-name connect info structure type) as an alias to USERCONNECT (win32k-style-name) structure that is used to perform... "connections" between user32 and winsrv/win32k subsystem.

[WIN32K]
- Make UserThreadCsrApiPort case of NtUserSetInformationThread return success to make usersrv happy (while saving CSR port handle in win32k is still not implemented).

[USER32]
- Clean up "a bit" DllMain, call CsrClientConnectToServer to connect to usersrv (copy-paste of what we do in kernel32 for base and console connection) and now determine properly whether we are doing server-to-server calls (i.e. properly set gfServerProcess).
- Reorganize GdiDllInitialize calls and put them all to the end of DllMain instead.
- No need to support DLL_THREAD_ATTACH/DETACH so call the magic DisableThreadLibraryCalls function.

[USERSRV]
- Implement UserClientConnect with the patch of Timo CORE-7505: it gives a CSR port handle to win32k (if not already done), then do process connection.

CORE-7505

svn path=/trunk/; revision=65710
2014-12-17 22:22:05 +00:00
Hermès Bélusca-Maïto 5b22f2c5c3 [WIN32K]
- Simplify NtUserInitialize: we can check whether gpepCSRSS is != NULL to see if we are initialized or not (instead of using gbInitialized).
- The UserInitialize helper doesn't need to take parameters. The two event handles (power and media, used when we receive a power event -- for sleep, etc... -- and a media event -- like USB key insertion and such --) just need to be used in the not-yet-implemented "Initialize Power Request List" and "Initialize Media Change" steps.
- Something that should be done is to bugcheck if the USER version reported is != 5.0 (as windows does).

[WINSRV]
- Collapse common inclusions from usersrv and consrv into the common header winsrv.h.

[USERSRV]
- _UserSoundSentry is NTAPI
- Stub UserClientConnect (Timo's patch contains more involved code. I will commit it later).
- Our NtUserInitialize(0, NULL, NULL); call (that made Windows BSOD) is wrong. It should be done with its first parameter correctly set to the USER version (5.0) and the two other parameters are handles to power and media events (see above). We should create them before.
This is part of patch by Timo Kreuzer.
CORE-7505 #comment UserClientConnect stubbed (it should be better implemented, I will commit the code from the patch later on); power&media events initialized; NtUserInitialize corrected.

svn path=/trunk/; revision=65696
2014-12-17 00:33:40 +00:00
James Tabor 0bc45dba49 [Win32k]
- Use thread state for GetMessageExtraInfo.

svn path=/trunk/; revision=65540
2014-12-01 14:47:05 +00:00
Giannis Adamopoulos 5b12c58f87 [WINSRV]
* Stop using ONEPARAM_ROUTINE_CSRSS_GUICHECK

[WIN32K]
* Move the manual gui check for console windows entirely in win32k
* This shouldn't cause any regressions to the ancient gui-on-demand feature

svn path=/trunk/; revision=65538
2014-12-01 09:38:04 +00:00
Hermès Bélusca-Maïto e5d2106458 [WIN32K][ROSTESTS]
So...
... first of all NtUserQueryInformationThread takes only 4 parameters in Win2k3 so do it as well...
... and since we claim at being compatible with Win2k3 (and not XP), one **MUST** review **ALL** our win32k exports, in win32ss/w32ksvc.db database first, and then in our w32kdll apitests !!!!!
But I won't do it !

svn path=/trunk/; revision=65519
2014-11-28 23:19:25 +00:00
Jérôme Gardou 1c19d25eb3 [WIN32K]
- "Convert" new cursor & icons implementation to the new user object handle manager.
 - Fix a few idiosyncracies in the way cursor handles are used (only with USE_NEW_CURSORICON_ENABLED)
[WIN32SS]
 - Storm out the flowers out of how classes use icon and cursor objects, with proper refcounting and all those joyous things.
Handles are for the powerless, kernel mode use pointers.
Only with USE_NEW_CURSORICON enabled (soon!)
CORE-7575

svn path=/trunk/; revision=64877
2014-10-21 18:59:44 +00:00
Jérôme Gardou 01da3a14ed [WIN32K]
- Introduce the base of what should become a proper user object manager, with proper refcounting, handle management, cleanup callbacks and inter-object referencing.
Approved by Jim and Giannis.
CORE-8539 #resolve

svn path=/trunk/; revision=64219
2014-09-21 17:44:40 +00:00
Hermès Bélusca-Maïto df0cd9c93d [WIN32K]: TWOPARAM_ROUTINE_SETCARETPOS does exist in windows, and we also have it in our SimpleCallRoutines enumeration.
svn path=/trunk/; revision=63611
2014-06-17 20:47:55 +00:00
James Tabor 4dc4711006 [Win32k]
- Fix removing menus and submenus. Dedicated to David Quintana and the New Explorer and Shell team.

svn path=/trunk/; revision=63502
2014-05-30 12:38:04 +00:00
James Tabor db241f482b [Win32k]
- Fix G/SetSystemMenu. Move code into menu.c.
- Add loading for MDI system menu.

svn path=/trunk/; revision=63455
2014-05-26 01:26:45 +00:00
James Tabor 8546e5f645 [Win32k]
- Fix load menu callback. Use it for loading system menus.
- Sync in more wine code, fix sub-menu arrow drawing. See WinMerge.
- Miscellaneous code changes.

svn path=/trunk/; revision=63380
2014-05-20 03:40:42 +00:00
James Tabor 5e23122314 [Win32k]
- Utilize the new menu structures and use item array instead of the list method. Make sure your applications Appends are in order (reference Mdi.c). Sync ported more wine code too.
- See CORE-5605, CORE-7447, CORE-7967 (Main Bug), CORE-8098 and CORE-8107

svn path=/trunk/; revision=63179
2014-05-06 18:09:07 +00:00
Amine Khaldi 265daca71e [USER32]
* Zap WindowFromPhysicalPoint().
[WIN32K]
* Zap NtUserWindowFromPhysicalPoint().
CORE-8174

svn path=/trunk/; revision=63160
2014-05-04 18:06:06 +00:00
James Tabor ce150eca7b [Win32k]
- Goodbye to menu ntuser bad functions.

svn path=/trunk/; revision=63028
2014-04-28 05:54:43 +00:00
James Tabor 9e6fb311ed [Win32k]
- Moved to new menu structures, synced in wine code and started first phase to server side. Resulting that more tests are running and failing less. Unplugged ntuser bad functions.
- See CORE-5605, CORE-7447, CORE-7967, CORE-8098 and CORE-8107

svn path=/trunk/; revision=63027
2014-04-28 03:55:23 +00:00
James Tabor 5a02327fd0 [Win32SS]
- Improvements to the message system. Fix hook write backs. Reduced memory when calling back from server side. Disabled post or send, leaving it in place just for a while, to test. See CORE-7447.

svn path=/trunk/; revision=61251
2013-12-09 01:55:48 +00:00
Jérôme Gardou 26b89c0907 [WIN32SS]
- Commit everything I got on new cursor/icon implementation
 - Implement loading animated cursors (no display yet)
 - Get rid of this m:n relation between cursors and processes. (ie. proper implementation of LR_SHARED)
 - Get rid of the global linked list of cursors (ditto)
 - Use atoms instead of copying the module name into the object. (aka stop using non paged pool for nothing)
 - Misc fixes

svn path=/trunk/; revision=60978
2013-11-13 20:06:01 +00:00
Hermès Bélusca-Maïto 92bd19337b [CONSRV][WIN32K]
- Fix console palette setting; introduce the ConsoleMakePalettePublic control code for NtUserConsoleControl API which
  is called by the SetConsolePalette to make the given palette handle public (indeed, the caller to SetConsoleHandle
  gives to this API a GDI palette handle which is aimed at being used by another process, i.e. by CSRSS.EXE; in normal
  operation this is impossible unless saying to GDI that the handle is meant to be public; that's what it's done there).

  Thanks to Aleksander and David (who provided tests) and Timo (see revision 60725) for having helped me in understanding
  what happened exactly there.

- Remove now-unneeded DPRINT1s and the hacked palette that was introduced in revision 60629/60641.

Part 1/2

svn path=/trunk/; revision=60726
2013-10-20 22:35:15 +00:00
James Tabor 98060c28c8 [Win32k]
- Fix CORE-6945.
- Miscellaneous adds and changes.

svn path=/trunk/; revision=60622
2013-10-11 21:46:30 +00:00