Commit graph

77 commits

Author SHA1 Message Date
Timo Kreuzer
9ea495ba33 Create a branch for header work.
svn path=/branches/header-work/; revision=45691
2010-02-26 22:57:55 +00:00
James Tabor
2afc207a55 [Win32k]
- If dc is window owned and not class owned do not set class if null pdce. Added debug prints to locate reentrancy issues due to a race condition.
- Add more checks to find dead windows.

svn path=/trunk/; revision=45671
2010-02-23 15:42:08 +00:00
James Tabor
2afb0124d2 [Win32k|User32]
- Updated DrawIconEx information for Meta support.

svn path=/trunk/; revision=45359
2010-01-31 18:38:45 +00:00
James Tabor
fc70f9c60c [Win32k|User32]
- Switch to the new user handle manager. Added more handle types to win32k. One or two step to WND, desktop heap supported.
- Test with every application in my test suite. Needs more testing and clean up. Bleeding edge!

svn path=/trunk/; revision=45085
2010-01-15 13:47:25 +00:00
Giannis Adamopoulos
b8882998c7 [win32k]
- Rewrite SetCursorPos and ShowCursror
- Store coursor show count in SYSTEM_CURSORINFO and not in GDIPOINTER
- Fix broken behaviour in ClipCursor

svn path=/trunk/; revision=44975
2010-01-06 12:44:31 +00:00
Gregor Schneider
b13b720381 [win32k]
- Add mask offset coordinates to GreStretchBltMask parameters, add code to handle a mask offset
- Only fail if the mask is smaller than the color bitmap, print sizes in this case
- Adapt callers to GreStretchBltMask changes
- DrawIcon: use new features to combine mask and color images
- Mouse control panel now shows cursors again (masks still need some work), fixes ~15 user32:cursoricon tests

svn path=/trunk/; revision=44803
2009-12-29 18:21:00 +00:00
Giannis Adamopoulos
5416a90f26 [win32k]
- Don't store SYSTEM_CURSORINFO inside WINSTATION_OBJECT. Use a global variable instead
- Remove IntGetCursorLocation. Use directly gpsi->ptCursor

svn path=/trunk/; revision=44655
2009-12-19 16:23:05 +00:00
Dmitry Gorbachev
145fbbd116 - Update address of Free Software Foundation.
- Update obsolete LGPL v2 to LGPL v2.1.

svn path=/trunk/; revision=43790
2009-10-27 10:34:16 +00:00
Timo Kreuzer
7b56dfa270 NtUserGetIconInfo: Move lockingunlocking out of SEH, as this is a bad idea. Get rid of RETURN(). Add a comment.
svn path=/trunk/; revision=42490
2009-08-08 02:47:32 +00:00
Gregor Schneider
0d14376113 Remove deprecated define
svn path=/trunk/; revision=42463
2009-08-07 12:06:04 +00:00
Timo Kreuzer
29c24f700e [win32k]
Implement GreMovePointer and GreSetPointerShape, calling the eng functions and use them instead of the former mess in IntSetCursor. Fix IntShowMousePointer, EngSetPointerShape to properly handle the color bitmap. We now have support for colored mouse cursors, like used by our paint.

svn path=/trunk/; revision=42447
2009-08-07 01:44:38 +00:00
Timo Kreuzer
6c2f42c953 [FORMATTING]
Apply consistent 4 space indentation
No code change

svn path=/trunk/; revision=42441
2009-08-06 23:09:13 +00:00
James Tabor
e0b7b058c3 - [Win32k] More Class work. Moved to use thread and process information structures.
- Tested wine, Firefox 1.15.xx and AbiWord 2.6.8.

svn path=/trunk/; revision=42234
2009-07-26 16:17:50 +00:00
James Tabor
928ed84e9f - [Win32k] Update window structure.
svn path=/trunk/; revision=42108
2009-07-20 23:18:16 +00:00
Gregor Schneider
1c62287842 More monochrome icon handling fixes in CreateIcon and CreateCursorIconHandle, fixes two cursoricon winetests
svn path=/trunk/; revision=40530
2009-04-15 16:00:22 +00:00
Gregor Schneider
35ac2a9da7 - CreateIcon: create color bitmap only if bitsPixel specifies a non-monochrome icon
- CreateCursorIconHandle: set hotspot for icons based on the bitmap size
- Fixes seven user32 cursoricon winetests

svn path=/trunk/; revision=40528
2009-04-15 15:39:46 +00:00
Timo Kreuzer
fc069970e4 Remove hBitmap from DC.rosdc and use DC.dclevel.pSurface instead.
svn path=/trunk/; revision=40509
2009-04-14 20:50:02 +00:00
Timo Kreuzer
fe1ed19dca Mouse pointer fix:
- Remove useless Status from the GDIPOINTER struct
- Remove MovePointer and use PDEVOBJ.pfnMovePointer instead, which is always set to a valid function.
- Implement IntEngSetPointerShape, calling either the Eng or the Drv function if available, set pfnMovePointer according to the result.
- Use IntEngSetPointerShape instead of doing the atuff in IntSetCursor.
- Don't misuse gpsi->ptCursor in IntShow/HideMousePointer and EngMovePointer, use ppdev->ptlPointer instead.
- Dont Lock and unlock the surface evertime the pointer is drwn, instead keep a shared lock.
- Implement IntEngCopyBits, that does the MouseSafety stuff and calls EngCopyBits.
Fixes the broken mouse cursor with VBox display driver and improves mouse performance

svn path=/trunk/; revision=40409
2009-04-07 01:36:22 +00:00
Aleksey Bragin
47325e09c4 Evgeniy Boltik <bstsoft@narod.ru>
- Enable and use mask support in UserDrawIconEx, fully compatible with Windows, based on tests in bug 4336.
- Remove IntSet[Text/Bk]Color hacks from UserDrawIconEx, no longer required due to fix in CreateCompatibleDC.
- Change a few comments in the code of UserDrawIconEx.
See issue #4336 for more details.

svn path=/trunk/; revision=40363
2009-04-04 18:52:14 +00:00
Timo Kreuzer
ea055dde70 Rename NtGdiDeleteObject to GreDeleteObject
svn path=/trunk/; revision=40240
2009-03-25 20:24:34 +00:00
Timo Kreuzer
b4cc54f089 Rename GDIDEVICE to PDEVOBJ. Is seems ms uses both PDEV and PDEVOBJ, whith the latter being the C++ representation. But we don't use C++ and PDEVOBJ seems to be a more appropriate name, as PDEV is often used by display drivers.
Make DC.ppdev of type PDEVOBJ* and remove a bunch of typecasts.

svn path=/trunk/; revision=40137
2009-03-20 18:02:55 +00:00
Timo Kreuzer
af62ba6188 Change most DC struct members to the names they have on Windows according to gdikdx
svn path=/trunk/; revision=40111
2009-03-20 01:35:49 +00:00
Timo Kreuzer
8d620098f5 win32k RECT/RECTL issues:
- Although RECT and RECTL are defined equal, the compiler treats them as incompatible. MS has created a lot of definitions with RECT and a lot with RECTL. So far we had to typecast them. Now with adding some defines into a win32k header file, we can finally treat them as equal inside win32k and get rid of a lot of type casts. Also use RECTL in favour of RECT internally, as this is the type that MS uses for the DDI and seems to be the more appropriate type.
- We had a lot of "const PRECT" stuff inside win32k. Note: there's difference between "const RECT *" (what you currently want) and "CONST PRECT" (which you proabably don't want). Despite the fact that CONST is not an official modifier (please stick to const) the main difference is that the former describes a pointer to a constant structure, while the latter describes a constant pointer to a modifyable structure.
- In an attempt to clean up the overpolluted IntGdi namespace, "objectify" the rect functions, moving them into their own namespace RECTL_Xxx.

svn path=/trunk/; revision=40100
2009-03-19 01:42:34 +00:00
Matthias Kupfer
40329ba147 - Add a hackfix comment for issue #4243 due to several requests.
svn path=/trunk/; revision=39997
2009-03-13 00:20:48 +00:00
Matthias Kupfer
f7a722ebda Evgeniy Boltik <bstsoft AT narod DOT ru>
- Fix draw icon with alpha in 32 bit.
- See issue #4243 for details.

svn path=/trunk/; revision=39989
2009-03-12 21:25:49 +00:00
Timo Kreuzer
7ce2261b67 - Remove the dib pointer from SURFACE
- Handle mapped sections in SURFACE_Cleanup
- Handle user provided bitfields, when creating a dib
- Some code cleanup

svn path=/trunk/; revision=38658
2009-01-09 02:06:39 +00:00
Timo Kreuzer
8560b3bcc3 Rename BITMAPOBJ to SURFACE as it's called on windows. Also rename related functions and variables.
svn path=/trunk/; revision=38645
2009-01-08 16:33:40 +00:00
Gregor Schneider
06332c431c - Fix a coordinate problem that occurred with alphablend in DrawIconEx (32bpp mode only)
- Welcome back mixer icon in 32bpp mode!
- Note for other invisible icons in that mode: 32bpp icon variants are most likely missing in the *.ico file; ReactOS image bpp conversion functions currently clear the alpha channel -> invisibility
- Update function names in debug prints, remove duplicate code, slightly improve code readability

svn path=/trunk/; revision=38607
2009-01-06 17:12:07 +00:00
Dmitry Gorbachev
fa287a1e62 Do not return garbage in cbSize field of CURSORINFO.
svn path=/trunk/; revision=38402
2008-12-28 07:35:26 +00:00
James Tabor
1d97cdc07b - Fix typo.
svn path=/trunk/; revision=38344
2008-12-25 11:36:51 +00:00
James Tabor
af2f0d64d5 - Check for same intput desktop with GetCursorPos. Cleanup GetCursorInfo.
svn path=/trunk/; revision=38343
2008-12-25 11:29:53 +00:00
James Tabor
d120bf4591 - Use Cursor position from server information. I guess the logic is, one workstation per system with multiple desktops. So we would always have one cursor pointer, not one per desktop.
svn path=/trunk/; revision=38342
2008-12-25 00:35:02 +00:00
KJK::Hyperion
1bd07ee187 modified include/reactos/probe.h
Workaround for gcc 4.1.3. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7

modified   ntoskrnl/include/internal/mm.h
   gcc 4.3.2 doesn't like to be told to inline MmAcquirePageListLock

modified   ntoskrnl/include/internal/probe.h
   Cleaning up after TSVN's buggy "apply patch"

modified   subsystems/win32/win32k/ntuser/message.c
   Silence a gcc 4.3.2 warning (possibly incorrectly)

modified   dll/directx/ddraw/ddraw.rbuild
modified   dll/win32/gdi32/gdi32.rbuild
modified   dll/win32/kernel32/kernel32.rbuild
modified   dll/win32/psapi/psapi.rbuild
modified   dll/win32/setupapi/setupapi.rbuild
modified   dll/win32/syssetup/syssetup.rbuild
modified   dll/win32/user32/user32.rbuild
modified   drivers/input/kbdclass/kbdclass.rbuild
modified   drivers/input/mouclass/mouclass.rbuild
modified   drivers/network/afd/afd.rbuild
modified   drivers/network/tcpip/tcpip.rbuild
modified   lib/rtl/rtl.rbuild
modified   subsystems/win32/win32k/win32k.rbuild
modified   subsystems/win32/win32k/objects/gdiobj.c
   gcc 4.1.3 workarounds. See embedded comments

modified   base/services/eventlog/eventlog.h
modified   dll/win32/advapi32/advapi32.h
   Removed superfluous includes of pseh/pseh.h

modified   dll/directx/ddraw/Ddraw/ddraw_displaymode.c
modified   dll/directx/ddraw/Ddraw/ddraw_main.c
modified   dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c
modified   dll/directx/ddraw/Ddraw/GetCaps.c
modified   dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c
modified   dll/directx/ddraw/main.c
modified   dll/directx/ddraw/rosdraw.h
modified   dll/directx/ddraw/Surface/surface_main.c
   ddraw migrated to PSEH 2.0

modified   dll/win32/gdi32/include/precomp.h
modified   dll/win32/gdi32/misc/misc.c
modified   dll/win32/gdi32/objects/bitmap.c
   gdi32 migrated to PSEH 2.0

modified   dll/win32/kernel32/except/except.c
modified   dll/win32/kernel32/file/find.c
modified   dll/win32/kernel32/k32.h
modified   dll/win32/kernel32/mem/isbad.c
modified   dll/win32/kernel32/misc/console.c
modified   dll/win32/kernel32/process/procsup.c
modified   dll/win32/kernel32/string/lstring.c
modified   dll/win32/kernel32/thread/thread.c
   kernel32 migrated to PSEH 2.0

modified   dll/win32/psapi/precomp.h
modified   dll/win32/psapi/psapi.c
   psapi migrated to PSEH 2.0

modified   dll/win32/setupapi/cfgmgr.c
modified   dll/win32/setupapi/setupapi_private.h
   setupapi migrated to PSEH 2.0

modified   dll/win32/syssetup/wizard.c
   syssetup migrated to PSEH 2.0

modified   dll/win32/user32/include/user32.h
modified   dll/win32/user32/windows/class.c
modified   dll/win32/user32/windows/text.c
modified   dll/win32/user32/windows/window.c
   user32 migrated to PSEH 2.0

modified   drivers/input/kbdclass/kbdclass.c
modified   drivers/input/kbdclass/kbdclass.h
   kbdclass migrated to PSEH 2.0

modified   drivers/input/mouclass/mouclass.c
modified   drivers/input/mouclass/mouclass.h
   mouclass migrated to PSEH 2.0

modified   drivers/network/afd/afd/info.c
modified   drivers/network/afd/afd/lock.c
modified   drivers/network/afd/afd/tdi.c
modified   drivers/network/afd/afd/tdiconn.c
   afd migrated to PSEH 2.0

modified   drivers/network/lan/lan/lan.c
   lan migrated to PSEH 2.0

modified   drivers/network/tcpip/tcpip/dispatch.c
   tcpip migrated to PSEH 2.0

modified   lib/rtl/debug.c
modified   lib/rtl/res.c
modified   lib/rtl/rtl.h
modified   lib/rtl/unicode.c
modified   lib/rtl/workitem.c
   rtl migrated to PSEH 2.0

modified   ntoskrnl/include/precomp.h
   ntoskrnl migrated to PSEH 2.0

modified   subsystems/csr/csrsrv/api.c
   csrsrv migrated to PSEH 2.0

modified   subsystems/win32/win32k/eng/bitblt.c
modified   subsystems/win32/win32k/eng/mem.c
modified   subsystems/win32/win32k/include/mmcopy.h
modified   subsystems/win32/win32k/misc/copy.c
modified   subsystems/win32/win32k/ntuser/callback.c
modified   subsystems/win32/win32k/ntuser/class.c
modified   subsystems/win32/win32k/ntuser/clipboard.c
modified   subsystems/win32/win32k/ntuser/cursoricon.c
modified   subsystems/win32/win32k/ntuser/display.c
modified   subsystems/win32/win32k/ntuser/hook.c
modified   subsystems/win32/win32k/ntuser/input.c
modified   subsystems/win32/win32k/ntuser/kbdlayout.c
modified   subsystems/win32/win32k/ntuser/menu.c
modified   subsystems/win32/win32k/ntuser/misc.c
modified   subsystems/win32/win32k/ntuser/ntstubs.c
modified   subsystems/win32/win32k/ntuser/painting.c
modified   subsystems/win32/win32k/ntuser/simplecall.c
modified   subsystems/win32/win32k/ntuser/sysparams.c
modified   subsystems/win32/win32k/ntuser/window.c
modified   subsystems/win32/win32k/objects/bitblt.c
modified   subsystems/win32/win32k/objects/bitmaps.c
modified   subsystems/win32/win32k/objects/brush.c
modified   subsystems/win32/win32k/objects/cliprgn.c
modified   subsystems/win32/win32k/objects/color.c
modified   subsystems/win32/win32k/objects/coord.c
modified   subsystems/win32/win32k/objects/dc.c
modified   subsystems/win32/win32k/objects/dcutil.c
modified   subsystems/win32/win32k/objects/dibobj.c
modified   subsystems/win32/win32k/objects/fillshap.c
modified   subsystems/win32/win32k/objects/font.c
modified   subsystems/win32/win32k/objects/freetype.c
modified   subsystems/win32/win32k/objects/icm.c
modified   subsystems/win32/win32k/objects/line.c
modified   subsystems/win32/win32k/objects/path.c
modified   subsystems/win32/win32k/objects/pen.c
modified   subsystems/win32/win32k/objects/print.c
modified   subsystems/win32/win32k/objects/region.c
modified   subsystems/win32/win32k/objects/text.c
modified   subsystems/win32/win32k/pch.h
   win32k migrated to PSEH 2.0

svn path=/trunk/; revision=37776
2008-11-30 19:28:11 +00:00
Stefan Ginsberg
ef394b196f - Less STDCALL, more WINAPI/NTAPI/APIENTRY
svn path=/trunk/; revision=37752
2008-11-29 22:48:58 +00:00
Stefan Ginsberg
41bcb8cc77 - Correct some type casts
svn path=/trunk/; revision=37630
2008-11-25 13:57:26 +00:00
Christoph von Wittich
f48aacb658 use ExFreePoolWithTag
svn path=/trunk/; revision=37018
2008-10-27 11:16:31 +00:00
Timo Kreuzer
d13301ae65 Win32 structure cleanup part 1 / x:
- replace W32THREAD with THREADINFO, define W32THREAD like it's on Windows and make it part of THREADINFO.

svn path=/trunk/; revision=36769
2008-10-16 17:52:38 +00:00
Gregor Schneider
5c169cc017 No need to unlock, if locking failed. Fixes CID 186.
svn path=/trunk/; revision=36767
2008-10-16 17:12:25 +00:00
Gregor Schneider
bd0da13d89 hColor is not needed in IntSetCursor, fixes Coverity CID 40.
svn path=/trunk/; revision=36606
2008-10-01 09:57:51 +00:00
Hervé Poussineau
c1f3e0fa1c win32k: Add tags when allocating memory
ntoskrnl: Relax checks when freeing a string

svn path=/trunk/; revision=35769
2008-08-29 21:19:41 +00:00
Timo Kreuzer
4e4095383f - Set the BaseObject.hHmgr field in GDIOBJ_AllocObj
- rename RGNDATA_ functions to REGION_ to have a consistent naming.
- move REGION prototypes to region.h
- rename REGION_AllocRgn to REGION_AllocRgnWithHandle and make it return a pointer to a locked region.
- rename UnsafeIntGetRgnBox to REGION_GetRgnBox
- rename UnsafeIntRectInRegion to REGION_RectInRegion
- remove UnsafeIntUnionRectWithRgn maco
- implement REGION_SetRectRgn and call it from NtGdiSetRectRgn
- reorder some parameters
- remove REGION_CropRgn, use REGION_CropAndOffsetRegion instead
- Implement UserShowCursor based on the code from NtUserCallOneParam and call it from inside the switch statement.

svn path=/trunk/; revision=32713
2008-03-17 22:17:48 +00:00
Timo Kreuzer
9457b015d6 - Simplify IntSetCursor
- Make NtUserSetCursor hide Cursor on hCursor = NULL
- Don't set the cursor pos if the cursor is hidden in IntMouseInput
- remove 2 useless ASSERTs
- Dereference old cursor- Make the screensaver lib hide the cursor directly after creating it (the window never recieves a WM_SETCURSOR)
partly fixes bug 2965
See issue #2965 for more details.

svn path=/trunk/; revision=32676
2008-03-14 00:05:58 +00:00
Timo Kreuzer
c11d265144 Bye, bye, GDIOBJ header! You've served us well, but now the time has come for you to make room for BASEOBJECT.
Also bye, bye, HandleTable parameter. You've never done any reasonable job, so no one will be missing you.

svn path=/trunk/; revision=32497
2008-02-26 23:09:20 +00:00
Timo Kreuzer
16956db4f1 - Reference CursorIcon before deleting it
- IntGetPaintMessage: Set MessageQueue->PaintCount to 0, if no dirty Window is found. Stops spamming the debuglog, once is enough.
- UserGetDCEx: Check if a dce's hDC is valid, if not warn and create a new one. With our current code those hDCs should never get deleted, but this is also a hack, on Windows you can delete them.
- Don't dump the stack backtrace twice in GDIOBJ_Xxx functions

svn path=/trunk/; revision=32473
2008-02-25 01:32:17 +00:00
Timo Kreuzer
ebc9271c72 some cleanup
- move NtGdiFlushUserBatch prototype to ntgdi.h
- move pool tags from ntgdihdl.h to win32k/tags.h
- move DC struct from ntgdihdl.h to win32k/dc.h
- replace GDIEMPTYHDR with BASEOBJECT
- use BASEOBJECT in DC and GDIDEVICE structures
- rename some NtGdiXxx functions that don't deserve that name and remove some that were defined by a macro, but don't exist on windows (#if 0'ed atm)
- remove RetrieveDisplayHDC() prototype (doesn't exist)

svn path=/trunk/; revision=32419
2008-02-18 23:05:41 +00:00
Timo Kreuzer
a8c044b6cb Big ntuser fix:
- rename ObmXxx functions to UserXxx functions
- remove some macros
- move prototypes to object.h
- implement UserreferenceObjectByHandle creating a reference to the object, used for cursoricon stuff so far
- rewrite object manager functions to reasonably handle references
- dereference cursoricons correctly, so they will really get deleted -> fixes a cursoricon leak
- destroy submenus in NtUserDestroyMenu -> fixes a big menu leak
- free the buffer of the menu text -> fixes a mem leak
- delete old bitmaps in NtUserSetCursorContent -> fixes a bitmap leak
- delete monitor object on failure
Now taskmgr doesn't leak memory anymore. we still leak some user handles here and there even after terminating a process, but it's much better now.

svn path=/trunk/; revision=32336
2008-02-13 00:46:23 +00:00
Timo Kreuzer
005a190594 fix a DC handle leak
svn path=/trunk/; revision=32106
2008-02-03 14:26:52 +00:00
Ged Murphy
1300cdce17 - Fall back onto some of the previous win32k icon handling code, and fix user32 to suit.
- This fixes the handle problem we were seeing which was caused by a failing NtUserFindExistingCursorIcon call in user32. It was incompatible with the new code and thus, creating a new icon for all LR_SHARED resources.
- The new code is correct, and will be re-enabled once I've finished the cursoricon object rewrite (which will make it compatible with windows)
- You'll probably need to 'make win32k_clean' before building

svn path=/trunk/; revision=31687
2008-01-09 16:04:34 +00:00
Ged Murphy
da6e62e245 return the icon bpp in the call to NtUserGetIconInfo
svn path=/trunk/; revision=31304
2007-12-18 14:28:56 +00:00
Ged Murphy
4bce737574 - Fix NtUserGetIconInfo and use SEH directly.
- Fix the NtUserSetCursorIconData definition and rewrite it (not fully complete)

svn path=/trunk/; revision=31301
2007-12-18 13:49:00 +00:00