Commit graph

42498 commits

Author SHA1 Message Date
Timo Kreuzer a3214996fc [WIN32K]
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
2010-06-06 22:01:41 +00:00
Timo Kreuzer 9a05924c62 [WIN32K]
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
2010-06-06 20:56:58 +00:00
Timo Kreuzer dd95ec9a50 [WIN32K]
Disable the additional alignment code for now, it breaks selections (text / icons)

svn path=/branches/reactos-yarotows/; revision=47619
2010-06-06 11:11:30 +00:00
Timo Kreuzer b3317b3afb [WIN32K]
Add Windows compatible alignment code.

svn path=/branches/reactos-yarotows/; revision=47618
2010-06-06 09:09:04 +00:00
Timo Kreuzer 6068cac704 [WIN32K]
- 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
2010-06-06 07:02:15 +00:00
Timo Kreuzer ca7f8096ff [WIN32K]
Once again: Do not free the memory for the bitmap bits, when you have not allocated them.

svn path=/branches/reactos-yarotows/; revision=47611
2010-06-06 06:32:01 +00:00
Timo Kreuzer f705d5861b [WIN32K]
Add another failure check to EngAllocSectionMem

svn path=/branches/reactos-yarotows/; revision=47610
2010-06-06 05:47:31 +00:00
Timo Kreuzer 98f686c8fc [WIN32K]
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
2010-06-06 05:45:36 +00:00
Timo Kreuzer 0c60cdb311 [WIN32K]
- 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
2010-06-06 03:12:56 +00:00
Timo Kreuzer 160142322e [WIN32K]
Make the SURFACE structure a bit more like the half documented windows version.

svn path=/branches/reactos-yarotows/; revision=47603
2010-06-05 21:19:41 +00:00
Timo Kreuzer d325826ccd [WIN32K]
- 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
2010-06-05 15:58:01 +00:00
Timo Kreuzer ea194bb322 [WIN32K]
Implement EngCreateSection, EngMapSection, EngFreeSectionMem, EngAllocSectionMem, EngLoadModuleEx, EngLoadModule, EngLoadModuleForWrite, EngMapModule, EngFreeModule, EngMapFile, EngUnmapFile. Unused & untested.

svn path=/branches/reactos-yarotows/; revision=47583
2010-06-05 04:34:12 +00:00
Jérôme Gardou 6b75ed4ae3 [WIN32K] UserDrawIconEx
- 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
2010-05-31 14:19:37 +00:00
Jérôme Gardou d0c9ca5b82 [WIN32K]
- 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
2010-05-30 16:31:56 +00:00
Jérôme Gardou 5e6e009cd6 [USER32]
- 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
2010-05-28 21:58:33 +00:00
Jérôme Gardou de271b9b4f Sync with trunk r47367
svn path=/branches/reactos-yarotows/; revision=47369
2010-05-26 23:20:20 +00:00
Jérôme Gardou 40f4c114ee [WIN32K]
- sync subsystems/win32/win32k.objects/cliprgn.c with trunk.

svn path=/branches/reactos-yarotows/; revision=47368
2010-05-26 23:04:02 +00:00
Jérôme Gardou 5ba3469f7b [WIN32K]
- merge r47350, slightly modified to get it the yarotows way

svn path=/branches/reactos-yarotows/; revision=47366
2010-05-26 22:29:45 +00:00
Jérôme Gardou a37321ad04 revert something that should never have been commited
svn path=/branches/reactos-yarotows/; revision=47357
2010-05-26 00:20:00 +00:00
Jérôme Gardou 8f153d5806 [WIN32K]
- Set right flags when reading display modes from registry
  - Implement UserEnumRegistryDisplaySettings

svn path=/branches/reactos-yarotows/; revision=47356
2010-05-25 23:45:55 +00:00
Jérôme Gardou 75e296c6be [WIN32K]
- 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
2010-05-25 22:46:57 +00:00
Jérôme Gardou 46b40c489f [WIN32K]
- UserChangeDisplaySettings : add some checks and fixes to what was passed to us
More wine tests pass.

svn path=/branches/reactos-yarotows/; revision=47354
2010-05-25 22:17:52 +00:00
Jérôme Gardou 84f025a5a4 [WIN32K]
- 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
2010-05-25 20:24:21 +00:00
Jérôme Gardou c7b7713c5d [WIN32K]
- Initialize virtual device coordinates when creating a DC
All gdi32::mapping tests pass now

svn path=/branches/reactos-yarotows/; revision=47352
2010-05-25 14:41:44 +00:00
Jérôme Gardou 4170ce0625 sync with trunk r47346
svn path=/branches/reactos-yarotows/; revision=47347
2010-05-25 10:27:42 +00:00
Gabriel Ilardi d514045177 [USETUP]
- 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
2010-05-25 08:16:09 +00:00
Eric Kohl 1605abd1bc [USETUP]
Make the required minimum disk space configurable from the txtsetup.sif file.

svn path=/trunk/; revision=47345
2010-05-24 22:32:23 +00:00
Eric Kohl bd925f8147 [USETUP]
Made the 'Copying file...' status line message left aligned like all the other status line messages.

svn path=/trunk/; revision=47343
2010-05-24 21:43:51 +00:00
Eric Kohl 6ed709da3d [USETUP]
- Add german translation of required minimum disk space warning.

svn path=/trunk/; revision=47342
2010-05-24 21:08:06 +00:00
Gabriel Ilardi d1f4ced4ab [USETUP]
- 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
2010-05-24 20:53:32 +00:00
Timo Kreuzer 8a591ca9df [WIN32K / WIN32CSR]
Get rid of FASTCALL specifier for static functions and functions with no parameters.

svn path=/trunk/; revision=47340
2010-05-24 13:34:08 +00:00
Timo Kreuzer c970cbb191 [WIN32K]
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
2010-05-24 12:57:03 +00:00
Aleksey Bragin c386b1ee3b - Revert 47310. Please find a way to enable kmtest only when building the testing cd image, not the installation/live one.
svn path=/trunk/; revision=47338
2010-05-24 08:51:52 +00:00
Jeffrey Morlan 975502bb74 [WIN32CSR] fix tuiconsole
svn path=/trunk/; revision=47337
2010-05-24 00:04:56 +00:00
Eric Kohl 4841dde246 [SMSS]
- Add the system environment variables PROCESSOR_LEVEL and PROCESSOR_REVISION.

svn path=/trunk/; revision=47336
2010-05-23 23:41:16 +00:00
Jeffrey Morlan 7fa77031b0 [WIN32CSR]
- 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
2010-05-23 22:38:16 +00:00
Eric Kohl 8f6739ed2e [REGEDIT]
Ignore the case when sorting value names.

svn path=/trunk/; revision=47334
2010-05-23 20:41:03 +00:00
Eric Kohl 88637f32f5 [SMSS]
- 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
2010-05-23 19:27:04 +00:00
Jeffrey Morlan 4b687b2792 [KERNEL32], [WIN32CSR] More fixes for console winetest
- 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
2010-05-23 17:40:54 +00:00
Eric Kohl 4bba2335c0 [SMSS]
- 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
2010-05-23 17:28:06 +00:00
Gabriel Ilardi 7a2b3d46d3 [INTL]
- Polish translation of Metric and Imperial by Olaf Siejka.

svn path=/trunk/; revision=47329
2010-05-23 17:07:56 +00:00
Gabriel Ilardi fd303a1a46 [REGEDIT]
- Don't display "finished" message if search is aborted.
Patch by Katayama Hirofumi.
See issue #5421 for more details.

svn path=/trunk/; revision=47328
2010-05-23 17:01:06 +00:00
Sylvain Petreolle 772c56e48d Perform case insensitive comparison against the selected language id.
svn path=/trunk/; revision=47327
2010-05-23 16:26:11 +00:00
Jeffrey Morlan 44ce7e4f55 [KERNEL32], [WIN32CSR] Implement the CREATE_NO_WINDOW flag which creates a console with an invisible window.
svn path=/trunk/; revision=47326
2010-05-23 15:56:37 +00:00
Michael Martin 38734242d5 [win32k]
- 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
2010-05-23 11:53:01 +00:00
Eric Kohl dcc025f6e3 [WINLOGON]
- Set the APPDATA environment variable without loading shell32.dll.
This should fix bug #5398.

svn path=/trunk/; revision=47324
2010-05-23 11:35:08 +00:00
Giannis Adamopoulos 89b45a7e71 [kernel32_winetest]
- kernel32 tests need a resource file

svn path=/trunk/; revision=47322
2010-05-23 10:59:41 +00:00
Jeffrey Morlan 0b077c2961 [WIN32CSR] Implement FILE_SHARE_* flags for console handles. Fixes some more winetests.
svn path=/trunk/; revision=47319
2010-05-23 09:10:02 +00:00
Jeffrey Morlan 85b0f2bc12 [WIN32CSR] Delete even the active screen buffer when all handles are closed. Fixes a winetest.
svn path=/trunk/; revision=47318
2010-05-23 06:04:15 +00:00
Jeffrey Morlan 3c777cde9c [WIN32CSR]
- Simplify locking: having a lock for each screen buffer is overkill since most programs only use one screen buffer at a time. (besides, almost all APIs were taking the console lock anyway) Reduce to just having one lock for a console.
- Instead of keeping track of how many references a screen buffer has, keep track of handles only.  When all handles to a screen buffer are closed, it should be deleted even if it's the active buffer (not yet implemented).

svn path=/trunk/; revision=47317
2010-05-23 05:33:21 +00:00