Commit graph

2603 commits

Author SHA1 Message Date
Timo Kreuzer fae2044a23 [CMAKE]
Integrate cmake stuff into trunk
Only files added.

svn path=/trunk/; revision=51783
2011-05-16 13:12:07 +00:00
Giannis Adamopoulos 683a4dc336 [win32k]
- Return the correct menu bar rect in GetMenuBarInfo

svn path=/trunk/; revision=51699
2011-05-13 15:36:25 +00:00
Giannis Adamopoulos 71fffa95de [win32k]
- Fix braindead logic that caused GetMenuItemRect to fail in every case

svn path=/trunk/; revision=51696
2011-05-13 14:47:36 +00:00
Giannis Adamopoulos c043e7495b [win32k]
- Dereference the SMWP object before deleting it. Fixes handle leak

svn path=/trunk/; revision=51690
2011-05-13 08:34:24 +00:00
Giannis Adamopoulos c3dc777c91 [win32k]
- When we run out of user handles show count of event and SMWP objects

svn path=/trunk/; revision=51689
2011-05-13 08:01:11 +00:00
Giannis Adamopoulos a9aea243ea [win32k]
- Implement counting user objects per process

svn path=/trunk/; revision=51682
2011-05-12 08:00:11 +00:00
Aleksey Bragin 037bb97747 Sam Arun Raj Seeniraj:
[WIN32CSR.DLL]
- Removed previous hack in CsrDefineDosDevice() that was stripping off extra trailing path separators.

[SUBST.EXE]
- The help message was not show aligned properly, fixing that.

See issue #993 for more details.

svn path=/trunk/; revision=51667
2011-05-10 15:48:54 +00:00
Gabriel Ilardi 5efd96cf71 re-add the assert, bug 5320 is still here, my fault, sorry.
svn path=/trunk/; revision=51638
2011-05-08 09:27:31 +00:00
James Tabor 25a579bc76 - Bug 5320 was closed.
svn path=/trunk/; revision=51637
2011-05-07 23:44:30 +00:00
James Tabor 8273f88beb [User32|Win32k]
- Standardize keyboard flags for the input thread and send input. Next round will update the rest of user32 defwnd.c, combo.c and appswitch.c.
- Add the missing keyboard flags needed for menu operations for in-user applications.
- Setup a function to be used to get, set and clear queue flags of special use for User32 functions.

svn path=/trunk/; revision=51587
2011-05-05 12:43:31 +00:00
James Tabor ae63513829 [Win32k]
- Move hook call close to the keyboard message post. This allows the registering of Aly keys before the hook call. This fixes all but one GetKeyState Api Test.
- Fix GetAsync/KeyState error codes and the return for GetAsyncKeyState. See http://appdb.winehq.org/objectManager.php?sClass=version&iId=8516&iTestingId=13644
- Fix TranslateMessage, check for window and use the window pti for re-posting to message queue.
- Peeking hardware queue should be the same as other Peek queue.

svn path=/trunk/; revision=51583
2011-05-04 23:37:35 +00:00
James Tabor 40222f1c75 [Win32k]
- Move up the chain to convert F10 to system key mode before going into the queue, so when in menu tracking, the message can be removed and processed, see bug 1009.

svn path=/trunk/; revision=51571
2011-05-04 01:31:47 +00:00
Gabriel Ilardi a3c6e37bce [win32k]
- Handle font height == 0 also in TextIntGetTextExtentPoint (bug 5305)
- Remove hardcoded font height (11) and replace it with 
the default font height from the device context by Timo.

svn path=/trunk/; revision=51566
2011-05-03 14:55:52 +00:00
James Tabor 7aadf33a61 [Win32k]
- Fix TranslateAccelerator and added the missing routines. User32 wine msg test_accelerators works.
- Test application: http://www.transmissionzero.co.uk/computing/win32-apps-with-mingw/

svn path=/trunk/; revision=51562
2011-05-02 22:44:48 +00:00
Rafal Harabien 6774978a84 [WIN32K]
* Fix ShowingCursor counter interpretation. Values >= 0 means cursor is shown, values <0 means cursor is hidden. Fixes few user32:cursoricon tests.

svn path=/trunk/; revision=51552
2011-05-02 11:38:30 +00:00
James Tabor 110864eec5 [Win32k]
- Fix shift key handling, see bug 6175.

svn path=/trunk/; revision=51540
2011-05-02 07:40:04 +00:00
Rafal Harabien aea7bfcd56 [TASKMGR]
* Make buttons on applications page longer, so polish text fits

svn path=/trunk/; revision=51530
2011-05-01 14:35:58 +00:00
Rafal Harabien 3fe6ca77a5 [WIN32K]
* Do not reference current thread before sending message to it. It was causing thread to be a ghost if ExitThread was called in WndProc.
* Hold only UserRefObjectCo reference on windows when sending messages to them.

svn path=/trunk/; revision=51527
2011-05-01 13:15:30 +00:00
Rafal Harabien e094f54623 [WIN32K]
* Redraw desktop after change of system colors. Inspired by Wine

svn path=/trunk/; revision=51525
2011-05-01 12:59:48 +00:00
James Tabor 0f43b7af51 [Win32k]
- Patch by Erich HooverSend: WM_SYSKEYDOWN and WM_SYSKEYUP when the 'F10' key is used. See wine bug 19383 and http://www.winehq.org/pipermail/wine-patches/2009-October/079871.html for details.
- Update key state for all hardware postings.

svn path=/trunk/; revision=51521
2011-05-01 11:51:22 +00:00
Giannis Adamopoulos 5f8889d8b2 [win32k]
- Do not try to initialize thread info in UserGetWindowObject. Do it in thread callout. Removing this hack is needed in order to use UserPostMessage in ProcessCallout when a process is terminating
- Notify winlogon that the shell is exiting in order to restart the shell

svn path=/trunk/; revision=51519
2011-05-01 09:20:15 +00:00
James Tabor 94050d9e54 [Win32k]
- Update key state when key and hardware is set before the event set. This allows input.c to post and set key states.

svn path=/trunk/; revision=51512
2011-04-30 22:17:55 +00:00
James Tabor 452b5fc972 [Win32k]
- Clear and set send erase background bit when sending WM_ERASEBKGND and if return zero reset the bit. This prevents a message loop in riched20 when calling GetUpdateRect. Spotted by Michael Martin.

svn path=/trunk/; revision=51509
2011-04-30 21:14:11 +00:00
Giannis Adamopoulos 1396412b7c [win32k]
- UserSetProcessWindowStation: Use PsGetProcessWin32WindowStation and PsSetProcessWindowStation. Close the prevoious window station handle only when the window station was not set by UserSetProcessWindowStation (should be the case for console apps)

svn path=/trunk/; revision=51496
2011-04-29 17:50:30 +00:00
Giannis Adamopoulos 16afe3648f [win32k]
- Store the initial desktop handle and use it evey time a new thread is created.

svn path=/trunk/; revision=51483
2011-04-28 20:33:16 +00:00
Gregor Schneider 7d857e4ff3 [win32csr] Implement routines to allow copy, paste and select all on console windows
See issue #4068 for more details.

svn path=/trunk/; revision=51481
2011-04-28 19:59:16 +00:00
Giannis Adamopoulos f2fa7073c4 [win32k]
- Use ObCloseHandle instead of ZwClose when closing window station handles

svn path=/trunk/; revision=51480
2011-04-28 19:52:23 +00:00
Giannis Adamopoulos 654d08212e [win32k]
- Call update_input_key_state correctly

svn path=/trunk/; revision=51479
2011-04-28 19:26:09 +00:00
Timo Kreuzer f685f1aeb0 [WIN32K]
- Don't use exclusive locks for pens
- Don't try to delete the window update region
- Don't ignore pid in GreIsHandleValid
- Check if handle is valid before deleting it in DC_Cleanup
- Silence a DPRINT

svn path=/trunk/; revision=51475
2011-04-28 14:29:47 +00:00
Timo Kreuzer c0dcdb6728 Fix release build
svn path=/trunk/; revision=51472
2011-04-28 08:50:27 +00:00
Timo Kreuzer 9ff568fd7d [WIN32K]
Rewrite of the GDI handle manager

- The old handle manager used a completely retarded spinlock in combination with KeDelayExecutionThread() for both exclusive
and shared locks. This is probably the most uneffective algorithm possible. It was also duplicating code everywhere and it was a overall mess It 

is now replaced with a lock-free reference counter for shared locks and a pushlock for exclusive locks. -> Better performance and scalability.
- Allocate user mode object attributes from the new gdi pool. This way, we don't need any caching, since the pool serves as a cache. Its also 

much faster and uses much less memory.
- Allow object allocations of different size, instead of fixed size from a table. This way a single allocation can take care of actual needs.
- Allow allcoating objects without a handle and insert them into the handle table later
- Properly synchronize the process GDIHandleCount. Now gdiview and taskmanager show the correct number of gdi handles.
- Implement a new event tracking system, that is capable of tracking all reverences and locks of objects and pool allocations to help track 

possible leaks
- Make sure that all objects of a process are deleted in cleanup
- Make sure all usermode memory allocations are freed, when cleaning up the process pool.
- Make sure that each object type is using the correct type of lock (either shared or exclusive, not a mixture)
- Fix some object / reference leaks
- Lots of inferface improvements
- Use global variables for certain things instead of members in the mapped gdi handle table
- Make IntSysCreateRectpRgn create a region without a handle
- Fix detection od source and mask use in GreStretchBltMask
- Use GDIOBJ_bLockMultipleObjects in NtGdiCombineRegion to avoid possible deadlocks
- Fix NtGdiAbortPath to reset DCPATH_ACTIVE flag in the dc and only bail out on error, instead of always
- Replace DC_AllocateDcAttr and DC_AllocDcAttr with DC_bAllocDcAttr using the new user mode pool
- Remove DCU_SyncDcAttrtoUser and DCU_SynchDcAttrtoUser. Those functions were unused and didn't do anything useful anyway,
- Replace IntGdiSetDCOwnerEx and DC_SetOwnership with GreSetDCOwner, remove unused NoSetBrush parameter
- Replace GDIOBJ_bValidateHandle and IsObjectDead with GreIsHandleValid
- Chage GDIOBJ_bLockMultipleObjects: pass object type, return a BOOL, whether all objects could be locked, cleanup on failure

svn path=/trunk/; revision=51470
2011-04-28 08:26:46 +00:00
Timo Kreuzer de078e7357 [WIN32K]
Don't send messages from or to a thread in cleanup. Fixes possible deadlock.

svn path=/trunk/; revision=51469
2011-04-27 23:49:09 +00:00
James Tabor b39193c83d [Win32k]
- Fix KsStudios actions with Hooks. 

svn path=/trunk/; revision=51468
2011-04-27 23:09:45 +00:00
Giannis Adamopoulos e29b0d8b1f [win32k]
-Fix a case when a window is created and we don't have a monitor created yet. (This can happen when we may attempt to use gui on demand)

svn path=/trunk/; revision=51464
2011-04-27 12:33:16 +00:00
James Tabor ee43f54510 [Win32Csr]
- Hack ReactOS to boot again! See bug 5655.

svn path=/trunk/; revision=51460
2011-04-26 00:01:03 +00:00
James Tabor 16f7899e27 [User32|Win32csr]
- Move AppSwitch to User32.

svn path=/trunk/; revision=51459
2011-04-25 23:14:06 +00:00
Timo Kreuzer 7ba64c2ad6 [win32k]
Acquire ownership of the window clip region, before deleting it. Fixes a region leak.

svn path=/trunk/; revision=51457
2011-04-25 21:53:06 +00:00
Aleksey Bragin 3d60cef193 Sam Arun Raj Seeniraj:
[NTOSKRNL.EXE]
- Complemented existing stub routines ObpDeleteSymbolicLinkName() and ObpCreateSymbolicLinkName(). Now when symbolic links are created, they are checked for dos drive mapping and ObSystemDeviceMap is updated accordingly.
- Updates to ObpDeviceMapLock are protected by a guarded mutex (changed from fast mutex by Aleksey Bragin).
- Aleksey Bragin: Fix concurrent access issues in ObDereferenceDeviceMap. The DeviceMap read/write operation must be atomic (within the ObpDeviceMapLock region).

[SUBST.EXE]
- Removed hard coded strings and moved it to resource file.

[WIN32CSR.DLL]
- Added a workaround, when target path end with a trailing '\', the substituted drive fails to parse to the target, this is a bug in the object manager, but working around it in CsrDefineDosDevice() by stripping trailing '\'.

See issue #993 for more details.

svn path=/trunk/; revision=51452
2011-04-25 16:08:00 +00:00
James Tabor f34a5b0b2d [Win32k]
- Need this file too.

svn path=/trunk/; revision=51451
2011-04-25 15:31:49 +00:00
James Tabor 6c4a25f386 [User32|Win32k]
- Isolated Alt-Tab/Esc issues. Placed update_input_key_state when posting to a queue like wine. This fixed the shift key checks. The Alt-Space is handled after a Translate Message call (WM_SYSCHAR), developers need to check application code to help support it (ConCtrl32). Will move AltSwitch.c from win32csr and port patch from bug 5378 to User32. ReactOS registers the Switch Class in Win32k and it is not used.
- Implemented the rest of HotKey Support. ReactOS Explorer does not save hotkey actions.
- See related bugs 1091.

svn path=/trunk/; revision=51450
2011-04-25 15:18:39 +00:00
Olaf Siejka 6b21aeb9a3 - Slovakian translation updates for rapps, shell32 and win32csr.
[CALC] 
- Conversion fix for Farenheit.

Patches by Mario Kacmar

svn path=/trunk/; revision=51448
2011-04-25 11:32:28 +00:00
Timo Kreuzer be4bb69ef8 [WIN32K]
Don't try to lock a dcs clip region if its NULL

svn path=/trunk/; revision=51411
2011-04-20 21:10:13 +00:00
James Tabor 81a19f5ad5 [Win32k]
- This should fix the dcattr leaked when deleting a DC, See bug 6119.

svn path=/trunk/; revision=51405
2011-04-19 18:18:19 +00:00
James Tabor b307a60502 [Win32k]
- Replace patch point for forced DC removal. See bug 6119.

svn path=/trunk/; revision=51403
2011-04-19 17:18:05 +00:00
Gabriel Ilardi e3c5f3cdd8 [win32csr/file.c]
Add missing new lines to some DPRINT1

svn path=/trunk/; revision=51399
2011-04-19 07:59:23 +00:00
Aleksey Bragin a63e424516 Sam Arun Raj Seeniraj:
[KERNEL32]
- DefineDosDeviceW() is implemented and calls into csrss.exe CsrDefineDosDevice().
- Fixed a minor bug in DefineDosDeviceA(), as calling RtlCreateUnicodeStringFromAsciiz() prevented NULL lpTargetPath to be passed down to DefineDosDeviceW().
- Fixed a minor bug in QueryDosDeviceW() that causes lpTargetPath buffer to be returned with NULL string terminator placed at the wrong point in the buffer.

[WIN32CSR.DLL]
- Implemented CsrDefineDosDevice() in win32csr.dll, the symbolic links are created in global name space currently.

[SUBST.EXE]
- Implemented a subst.exe clone.
See issue #993 for more details.

svn path=/trunk/; revision=51393
2011-04-18 21:48:19 +00:00
Timo Kreuzer 46662954bd [WIN32K]
- Use shared locks for surfaces and palettes

svn path=/trunk/; revision=51392
2011-04-18 19:09:05 +00:00
Timo Kreuzer 186ed6e13d [WIN32K]
Set ulShareCount of static palettes to 1, so they won't get dereferenced to 0

svn path=/trunk/; revision=51391
2011-04-18 14:15:18 +00:00
Giannis Adamopoulos f53d1fd407 [win32k]
- GetKeyboardState and SetKeyboardState should use the thread key state and not the global key state

svn path=/trunk/; revision=51389
2011-04-18 09:13:31 +00:00
Giannis Adamopoulos 3026082bde [win32k]
- Improve IS_KBD_MESSAGE macro. Should fix some more tests

svn path=/trunk/; revision=51379
2011-04-17 12:33:29 +00:00