- More BITMAPV5INFO fun
- Probe max size we are asked for when converting to V5 Info
[USER32] [WIN32K]
- CreateDIBitmap : Move safety handling to win32k, where it belongs. More code cleanness!
svn path=/branches/reactos-yarotows/; revision=47701
NtGdiGetDIBitsInternal: don't use the unsafe usermode pointer after the BITMAPINFO has been converted and protect writing back the result with SEH.
svn path=/branches/reactos-yarotows/; revision=47692
- remove duplicate prototypes.
- Add missing trail to debug print
- replace some now superfluous checks on bitmap palette with sanity ASSERTS
- begin using BITMAPV5HEADER as a default bitmap format, and introduce conversion to and from everything prior that.
Congratulations to BITMAPCOREHEADER, for its backward compatibility personal failure.
svn path=/branches/reactos-yarotows/; revision=47690
Introduce GreCreateBitmapEx, which has the extended functionality needed by some callers, GreCreateBitmap calls GreCreateBitmapEx to keep the simple syntax. Use it in DIB_CreateDIBSection to fix build. Also pass the size of the image (still ignored), which is needed for compressed bitmaps (we currently assume that RLEs take as much space as an uncompressed bitmap)
svn path=/branches/reactos-yarotows/; revision=47663
Rewrite the bitmap API. There were a lot of bugs. NtGdiCreateBitmap allowed a negative height, leading to either topdown or bottomup bitmaps, a behaviour that Windows doesn't have. The function copied the bitmap bits directly from the caller to the bitmap using RtlCopyMemory, ignoring different scanline length and direction (resulting in bitmaps being upside down), not SEH protected. This function (IntSetBitmapBits) is replaced by a better solution UnsafeSetBitmapBits, that takes these things into account. The name is chosen to give a hint that the function can/should be SEH protected. IntSetBitmapBits is still there, as its retarded behaviour is actually required in some places. There were also IntCreateBitmap and IntGdiCreateBitmap, now both being replaced by GreCreateBitmap. The code that set the palette is removed, as it's already done in SURFACE_AllocSurface, here gpalRGB is replaced with gpalBGR, fixing some inverted color issues. The alignment correction in SURFACE_bSetBitmapBits is reapplied, now that the callers are behaving as they are supposed to do.
svn path=/branches/reactos-yarotows/; revision=47641
Make the bitmap data for the extpens (making extpens bitmaps is a bad idea anyway) 4 bytes long instead of 3, to fulfill alignment requirements.
svn path=/branches/reactos-yarotows/; revision=47638
- Move RLE specific code to it's own file (rlecomp.c)
- Relace BitsPerFormat function with an array of UCHARs
- Rewrite surface creation. Surfaces are now allocated from one central function SURFACE_AllocSurface, which sets the size, iType, iUniq, the handle and the default palette.
- Implement SURFACE_vSetDefaultPalette, which sets the default RGB palette, based on bit depth.
- Implement SURFACE_bSetBitmapBits, wich sets cjBits, pvBits, pvScan0 and lDelta and allocates memory if neccessary.
- Use these functions for EngCreateBitmap, EngCreateDeviceBitmap, EngCreateDeviceSurface and IntCreateBitmap
svn path=/branches/reactos-yarotows/; revision=47612
Do not free the memory for the bitmap bits, when you have not allocated them. Fixes bugcheck with VBox driver.
svn path=/branches/reactos-yarotows/; revision=47609
- Allocate bitmaps as kernel sections, instead of from paged pool, like it's done in windows.
- Fix SURFACE_Cleanup. It was only freeing the memory for API_BITMAPs. If memory was allocated by a driver it never got freed.
- Add BMF_RLE_HACK flag to free decompressed RLE bits
- Support FL_ZERO_MEMORY in EngAllocSectionMem
- Set SURFOBJ::iType when creating a surface
svn path=/branches/reactos-yarotows/; revision=47606
- Simplify the logic of the mapping functions a bit, by using either FILEVIEW or ENGSECTION, not both.
- Set FILEVIEW::LastWriteTime
svn path=/branches/reactos-yarotows/; revision=47591
- There is no need to recalculate size of the Icon, we already have this piece of information
- Draw monochrome cursor/icons, not only their mask.
svn path=/branches/reactos-yarotows/; revision=47495
- Simplify UserDrawIconEx
- NtUserCreateCursorIconHandle : Get Information from bitmaps even on indirect creation and fix calculation of icon height in case of monochrome icons.
Fixes ~15 user32:cursoricon winetests.
svn path=/branches/reactos-yarotows/; revision=47451
- Change ChangeDisplaySettingsExA to look more like wine's one
[WIN32K]
- Return correct value if buffer is to small in UserChangeDisplaySettings (wine tests)
- Do not set an invalid size to the devmode we're passing ti UserChangeDisplaySettings, we might access garbage
Now all ChangeDisplaySettings related wine tests pass.
svn path=/branches/reactos-yarotows/; revision=47386
- Set right flags when reading display modes from registry
- Implement UserEnumRegistryDisplaySettings
svn path=/branches/reactos-yarotows/; revision=47356
- Check devmode size in NtUserChangeDisplaySettings
- Copy memory instead of setting fields in UserEnumDisplaySettings, so we don't lost anything.
svn path=/branches/reactos-yarotows/; revision=47355
- UserChangeDisplaySettings : add some checks and fixes to what was passed to us
More wine tests pass.
svn path=/branches/reactos-yarotows/; revision=47354
- Set DISPLAY_DEVICE_PRIMARY_DEVICE to Graphics device object when creating the primary device object
- switch state flags of the graphics device objects when switching mode
- Only compare valid fields when searching for a device mode in a device object
- implement CDS_TEST flag in NtUserSetDisplaySettings
svn path=/branches/reactos-yarotows/; revision=47353
- Polish and Czech (#5429) translations of required disk space by Maciej Bialas and Radek Liska
- Some fixes and updates to Italian and Spanish resources
svn path=/trunk/; revision=47346
- Check for required minimum disk space eventually warn the user.
- Added Italian and Spanish warnings, the other languages need translation.
- Patch by R.T.Sivakumar modified by me.
See issue #3302 for more details.
svn path=/trunk/; revision=47341
When destroying a window, generate a mouse move message, so that the underlying window is notified about the mouse position and can update the pointer if neccessary. Fixes bug #4499 and bug #3893
See issue #4499 for more details.
svn path=/trunk/; revision=47339
- Make consistent use of RECT/SMALL_RECT structures: a RECT uses pixel coordinates relative to the window client area and is endpoint-exclusive; a SMALL_RECT uses character coordinates relative to the screen buffer and is endpoint-inclusive.
- Allow text selections outside of the visible window
- Implement GetConsoleSelectionInfo
svn path=/trunk/; revision=47335
- Remove the system environment variable OS from the hivesys*.inf files.
- Change the type of the system environment variable PATHEXT in the hivesys*.inf files from REG_EXPAND_SZ to REG_SZ.
- Let SMSS add the system environment variables OS and NUMBER_OF_PROCESSORS to the registry.
svn path=/trunk/; revision=47333
- BasepInitConsole: Initialize console input EXE name
- GetConsoleProcessList: Use capture buffer; only copy IDs if buffer has enough room for all of them; return total number of processes.
svn path=/trunk/; revision=47331
- Remove the system environment variable PROCESSOR_ARCHITECTURE from the hivesys*.inf files.
- Let SMSS add the system environment variables PROCESSOR_ARCHITECTURE and PROCESSOR_IDENTIFIER to the registry.
svn path=/trunk/; revision=47330
- Don't display "finished" message if search is aborted.
Patch by Katayama Hirofumi.
See issue #5421 for more details.
svn path=/trunk/; revision=47328
- For the Low Level Mouse Hook (WH_MOUSE_LL), input can come from the mouse driver or mouse_event. Both of which result in a call to UserSetCursorPos.
UserMode SetCursorPos API also ends up here. Add BOOL parameter that can be used to determine if hooks are to be called.
- Move the code related to calling the hook procedure from MsqInsertSystemMessage into UserSetCursorPos and call the hook procedure here if needed.
If hook procedure returns non 0 value. Dont insert the system message.
- Fixes a recursive call to the hook procedure resulting thread using to much stack exposed by user32 winetest for input.
svn path=/trunk/; revision=47325