Commit graph

792 commits

Author SHA1 Message Date
Julen Urizar Compains f7cab5a1d4
[TRANSLATION] Multiple minor fixes and addings. (#2516)
- Applications: eventvwr, fltmgr, servman.
- rosapps: arping, CTM, fontsub, fraginator, imagesoft, systeminfo, vcdcontroltool, vgafontedit.
- CPLs: desk.cpl.
- ReactOS Setup GUI app.
- Screensavers: butterflies, maze, Starfield.
- System: NTVDM, printing/monitors/localmon; the freeze dialog in user32, the error strings in usersrv.
2020-04-09 18:13:46 +02:00
James Tabor ee3ee2a65f [User32] Fix Dialog Hang
Patch by JIRA contributor I_Kill_Bugs. See CORE-5078.

Also: https://bugs.winehq.org/show_bug.cgi?id=48749
2020-04-08 14:49:38 -05:00
James Tabor acf135d16d [Win32SS] Fix Mask for Draw Frame States
Fixes drawing of caption bar buttons.

See CORE-8808.
2020-04-05 21:11:44 -05:00
Serge Gautherie ded98b846e
[WIN32K:NTUSER] ntuser.h: Rename NtUserWaitForInputIdle() 3rd parameter (#2499)
Addendum to 568b6d05.
2020-04-03 15:06:25 +02:00
James Tabor 568b6d0558 [NTUser] Fix Strings and Format to Hooks
Allocate heap instead of data segment to be used for callbacks on user side.
Move and correct initial hook call out setup. Use it in more than one hook call.

This fixes issues with strings out of alignment and use of kernel pointers.

See CORE-13907 and CORE-16769. KsStudio still needs retested.

Small wow update.
2020-04-03 03:58:29 -05:00
Tibor Lajos Füzi 6020af2014
[GDI32] Allow BI_BITFIELDS compression in CreateDIBitmap (#2448)
CORE-16750, CORE-15960
2020-03-30 12:11:38 +02:00
jimtabor 915a5764a9 [Win32SS] Form Sanity to Hook Callbacks
Fix WH_CALLWNDPROC/RET data to user hook calls. See CORE-13019 and CORE-13907.
2020-03-28 14:18:14 -05:00
jimtabor d8add40e89 [User32] Fix null return.
See CORE-16769.
2020-03-28 14:03:15 -05:00
Hervé Poussineau ae5d2dbb9e [WIN32K] Add some static specifiers, to prevent exporting FORCEINLINE function outside compilation unit 2020-03-26 16:39:16 +01:00
Jérôme Gardou 2928084e2f [WIN32K] Fix bounds calculation when drawing with a pen 2020-03-24 14:39:27 +01:00
Timo Kreuzer 4860aa645c [WINSRV] Use DIB section for frame buffer bitmap 2020-03-22 12:05:05 +01:00
Katayama Hirofumi MZ 8c5308b5e8
[USER32] Relax conditions for creating MDI windows (#2454)
The creation conditions of MDI window was too strict. CORE-15633
2020-03-20 07:38:33 +09:00
Thomas Faber 72c51aabba
[NTOS:IO][GDI32][CMD] Fix some under-sized variables. CORE-14922
Fixes x64 boot with RTC.
2020-03-13 20:45:06 +01:00
Joachim Henze 8bb9434d3e [WIN32SS] Fix regression CORE-16721
"Scrolling by pressing the scrollbar arrows does not draw the arrows as pressed"
Fixed by a patch of JIRA-user 'I_kill_bugs'. Thank you very much!

The regression was introduced by 0.4.11-dev-586-g
929a2c6637
(which itself aimed to fix CORE-13986,
but not CORE-13918 as erroneously stated in commit comment)

I intend to port this back into 0.4.13-RC later.
2020-03-12 22:55:04 +01:00
Timo Kreuzer c735dbac35 [PRINTING] Add x64 print environment keys and folders 2020-03-09 07:03:47 +01:00
Hermès Bélusca-Maïto b596a2cc31
[USER32] Fix crash in Edit control. CORE-16727
The #ifdef prevents setting the variable, es, to NULL, which lead to an illegal access.
This didn't match dll/comctl32/edit.c .

Patch by 'I_Kill_Bugs' contributor.
2020-03-06 20:02:03 +01:00
JoachimHenze 848d7ec633
[NTUSER] Fix ShellHook notifications when creating/activating windows (#2396) 2020-03-05 15:39:23 +01:00
Joachim Henze 00adb1a3f9 [WIN32SS] Improve Drawing Scrollbars
A very nice patch of JIRA user "I_kill_Bugs". Many many Thanks!

It addresses:
- CORE-14755 fixed, flashing scrollbar triangles (we know 131 affected apps just from rapps!)
- CORE-13931 fixed, FamiTracker invisible about-dlg
- CORE-14685 improves a bit, but is not entirely fixed
- CORE-11561 improves a bit, but is not entirely fixed
- The patch avoids unnecessary redraws, speeds up GUI interaction and NSIS install times

Jim Tabor had no complains about it, I just did some white-space-tweaks on EOL and indentation.

FTR A testbot run (not on master but on 0.4.13-RC-48-g818e5bc)
https://reactos.org/testman/compare.php?ids=71645,71666 VBox LGTM
https://reactos.org/testman/compare.php?ids=71646,71667 KVM LGTM

I felt tempted to port back, but decided to play safe and commit to master just.
2020-03-04 02:12:06 +01:00
Hermès Bélusca-Maïto e8df1a38bd
[CONSRV] Fix a corruption of the CONSRV memory when converting read input events back to ANSI.
This fixes a 6-year old copy-paste bug introduced by commit b47d51c6 (r64004).
2020-03-02 01:08:41 +01:00
Hermès Bélusca-Maïto 7babd93107
[CONSRV] Some code simplification and tidy up. 2020-03-02 01:08:41 +01:00
Hermès Bélusca-Maïto 31c13e89fe
[CONSRV] Use NtClearEvent() and NtClose() instead of the Win32 functions. 2020-03-02 01:08:40 +01:00
Hermès Bélusca-Maïto e624be1eb2
[CONSRV] Tidy up lineinput.c by moving the History* helper prototypes to a suitable header file. 2020-03-02 01:08:39 +01:00
Hermès Bélusca-Maïto 19596768cb
[CONSRV] Support history resizing from console settings and from SetConsoleHistoryInfo() server implementation.
In addition, honour the maximum number of history buffers allowed when
creating new ones.

Some implementation information has been obtained from
https://github.com/microsoft/terminal
(under MIT License).
2020-03-02 01:08:35 +01:00
Hervé Poussineau 340d9360c3 [VIDEOPRT] Workaround bug CORE-16695 (infinite loop when reading EDID on LiveCD in QEMU)
For some reason, we don't get valid EDIDs when using LiveCD on QEMU.
We ignore them, and try to read the one of the next child.
This leads to a infinite loop and then, an out of memory error.

As it can also happen in other circonstances, stop enumeration as soon
as an invalid EDID is detected.

This breaks configurations with graphic cards with 2+ outputs, where
the first one is not plugged to a monitor, and the second one is plugged
to a monitor.

CORE-16695
2020-03-01 10:12:13 +01:00
Doug Lyons 3077c0e43e
[WINSPOOL] Implement DocumentPropertiesA including DEVMODE conversions (#2339)
Co-authored-by: Doug Lyons <douglyons@douglyons.com>
Co-authored-by: Colin Finck <colin@reactos.org>
2020-02-25 08:02:46 +01:00
Colin Finck 5d8c39753e
[GDI32] GdiConvertToDevmodeW: Import WINE commit 32393796bb534e9cf11dd988dce88722c67f7906 ("gdi32: GdiConvertToDevmodeW should not refer to unintialized name bytes.")
This makes our GdiConvertToDevmodeW equivalent to the WINE counterpart again.
2020-02-24 19:17:56 +01:00
Hermès Bélusca-Maïto 1d3fb3e370
[CONSRV] Fix setting the default screenbuffer and console view sizes when creating a new screenbuffer.
For more information, see:
https://docs.microsoft.com/en-us/windows/console/createconsolescreenbuffer#remarks
2020-02-23 22:43:02 +01:00
Joachim Henze 820dbfccd0 [NTUSER] Fix regression CORE-11828
Fixes symptom "mouse pointer vanishes when closing
applications via x in title-bar"

The bug in WIN32SS was unhidden by SVN r65496 == git
5c1a8109c8
, when we introduced explorer_new. The old explorer
had a workaround built within.

Many thanks to patches author James Tabor.
I intend to backport into 0.4.13RC as well.
2020-02-23 13:56:05 +01:00
Joachim Henze 99ba7ea95f [FREETYPE] Fix regression fonts in Adobe Photoshop CS2 menu CORE-16694
By Reverting beginnings of raster-fonts-works (*.fnt and *.fon)
Thanks Katayama Hirofumi MZ for helping with this revert.

The regression was introduced by 0.4.13-dev-681-g
ae99df1675

I will also port this revert back into 0.4.13-RC
2020-02-23 12:23:05 +01:00
Hermès Bélusca-Maïto 90d795b0bf
[CONSRV] Keep a count of input events in the console queue + code simplifications.
- Update the documentation of members of CONSOLE_INPUT_BUFFER.
- Simplify ConDrvGetConsoleNumberOfInputEvents().
- Simplify ConDrvFlushConsoleInputBuffer().
- Use also GetConsoleInputBufferMode() more often.
2020-02-22 23:27:42 +01:00
Hermès Bélusca-Maïto 570eba2a52
[KERNEL32][CONSRV] Use more often the internal ConioRectHeight/Width() and ConioIsRectEmpty() macros. 2020-02-22 21:15:58 +01:00
Hermès Bélusca-Maïto 05053b6f18
[CONSRV] ConDrvScrollConsoleScreenBuffer() fixes. (#2278)
- Reimplement ConDrvScrollConsoleScreenBuffer() with separate copy and
  fill helper functions and calculate rectangles in such a way as to
  never use X-Y coordinates pointing outside of the screen buffer.

- Add X-Y coordinates assertions in ConioCoordToPointer().
2020-02-22 19:50:18 +01:00
Hermès Bélusca-Maïto d46e054368
[CONSRV] Miscellaneous console fixes for CJK support and screenbuffer iteration. (#2278)
+ popup.c!DrawBox(): Factor out setting the attribute value.
2020-02-22 19:50:17 +01:00
Joachim Henze feb7df42b4 [WIN32SS] Fix a typo in dbg print 2020-02-22 19:40:52 +01:00
Katayama Hirofumi MZ f3b1185cdc
[LOCALSPL] Don't hardcode C:\ReactOS (#2343)
Use static top-level variables wszLocalSplFile and wszPrintUiFile instead of static hardcoded literal strings.
CORE-14747
2020-02-14 22:53:38 +09:00
jimtabor c89e111c6a [GDI32] Use Gdi Flush for SetViewportOrgEx.
Fixes offset in combo texts and menu highlights. See CORE-16644 & CORE-16656.
2020-02-13 17:05:38 -06:00
Colin Finck 8da7fbc704
Fix build 2020-02-12 19:59:23 +01:00
Doug Lyons d90beaeed2
[WINSPOOL] Implement GetPrinterDriverA and a helper function UnicodeToAnsiInPlace (#2317) 2020-02-12 19:52:34 +01:00
Katayama Hirofumi MZ 9199c90328
[WIN32SS][NTUSER] Fix ScrollWindowEx SW_SCROLLCHILDREN (#2327)
Based on the patch of I_Kill_Bugs of JIRA user. CORE-16687, CORE-12114
2020-02-11 20:59:14 +09:00
jimtabor 2903022199 [NtGDI] Use Vis Region for New Clip Region
Interesting results while using VBOX-GA.
Rolling back to Vis, wine throwback. See CORE-16680.
2020-02-09 11:28:19 -06:00
Hermès Bélusca-Maïto 53061a4b69
[CONSRV] Additions for the GUI frontend.
- Fix the text-copy code to handle fullwidth characters.
- Move the caret painting code to its own function.
2020-02-09 00:39:16 +01:00
Hermès Bélusca-Maïto 0d500b642b
[CONSRV] Simplify parts of code in the line-input module. 2020-02-09 00:38:32 +01:00
Hermès Bélusca-Maïto fe3d655bc0
[CONSRV] Disable the old code for scrolling via keyboard shortcuts as it is buggy. To be fixed later... 2020-02-09 00:38:31 +01:00
Hermès Bélusca-Maïto 421150d5c3
[CONSRV] Minor code cleanup. 2020-02-09 00:37:44 +01:00
Hermès Bélusca-Maïto d9cbe7dc64
[CONSRV] Fix the definitions of the Console[Input|Output]UnicodeToAnsiChar() and Console[Input|Output]AnsiToUnicodeChar() macros. 2020-02-09 00:37:44 +01:00
Hermès Bélusca-Maïto 07f8b9fe09
[CONSRV] Rephrase/complete some comments. 2020-02-09 00:37:43 +01:00
Aaron Dewes e5813c4644
Update german translation (#2291)
* Update German translations

* Update translation again

* More translations

* Some fixes in the german translation

* Some more fixes

* Little translation tweak

* Updates to 2nd review

* Little update

* Add back keyboard accel for IDS_OPENFILELOCATION.

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2020-02-08 12:55:53 +01:00
Hermès Bélusca-Maïto b97977db9c
[USER32] Update the translations of IDS_ASK_TERMINATE. 2020-02-07 19:07:22 +01:00
Assis Duarte 567b2d79fc
[USER32] Update Brazilian-Portuguese translation (#2283) 2020-02-07 18:59:32 +01:00
Serge Gautherie 06f8f80181
[WINSPOOL] printers.c: Demote 3 ERR() to TRACE(), Fix 1 copypasta (#2311) 2020-02-06 19:10:21 +01:00
Doug Lyons ecde376825
[WINSPOOL] Implement GetPrinterA based on GetPrinterW (#2308) 2020-02-06 19:02:46 +01:00
James Tabor adffa8ea75 [Printing] Part of GDI Support
Fix ups and added support to prevent GDI from crashing. These functions
will be required for GDI.

Part 1 of print support.
2020-01-31 17:38:47 -06:00
Colin Finck 45f39ffc25
[FORMATTING] Fix indentation of winspool/printers.c
No code changes
2020-01-31 18:47:53 +01:00
Doug Lyons e8b177825b
[WINSPOOL] Add Implementation of EnumPrintersA (#2273) 2020-01-31 18:42:55 +01:00
Mark Jansen bbc97e964f
[WIN32SS] Demote a trace message 2020-01-29 22:58:43 +01:00
Doug Lyons acec69a1d7 [PRINTING] Improve Stubs for GetPrinterA and GetPrinterDeviceA (#2274) 2020-01-26 16:21:39 +01:00
Mark Jansen 53c9a6deaa
[WIN32K] Don't trust the BITMAPINFOHEADER size
This is not entirely correct yet, but less wrong than before
CORE-16621
2020-01-26 13:08:53 +01:00
Hervé Poussineau 99f979d6e9 [WIN32SS] Replace inline by FORCEINLINE, as in other files of the module 2020-01-22 20:57:42 +01:00
James Tabor 4927905eeb [NtGdi] Fix clip region merging.
Use a new region while merging from the original. See CORE-16626.
2020-01-20 12:49:11 -06:00
Katayama Hirofumi MZ 8dc90a4c7e [WIN32SS][USERSRV] Add CSR API_NUMBER comments 2020-01-20 08:06:40 +09:00
Stanislav Motylkov afdb42023c [FREELDR][XBOXVMP] Check only low 28 bits for framebuffer address (#2249)
Fixes framebuffer detection on real hardware Xbox.
2020-01-14 20:20:22 +01:00
Katayama Hirofumi MZ b41299470b
[WIN32SS][WINSRV] Fullwidth character handling Part 2 (#2240)
Follow-up of #2231. Also fix FillConsoleOutputAttribute, WriteConsoleOutputCharacterW and WriteConsoleOutputAttribute functions.
CORE-12451
2020-01-12 22:04:57 +09:00
Katayama Hirofumi MZ fa42794a3a
[WIN32SS][WINSRV] Fullwidth character handling for Asian console (#2231)
Far-East Asian language (Chinese, Japanese and Korean; CJK) needs special handling in console.
Especially a fullwidth character (mk_wcwidth_cjk(ch) == 2) needs a double width space. A fullwidth character on the console window is treated as a pair of a leading byte and a trailing byte (COMMON_LVB_LEADING_BYTE and COMMON_LVB_TRAILING_BYTE). CORE-12451
2020-01-07 15:26:58 +09:00
Thomas Faber 5b83d86af5
[WIN32K:NTGDI] Add missing probe to NtGdiGetPath. 2020-01-03 11:21:24 +01:00
Thomas Faber f0d2bd3852
[WIN32K:NTGDI] Avoid breakpoints in syscalls. 2020-01-03 11:21:21 +01:00
Katayama Hirofumi MZ f84963b0d5
[WIN32SS][WINSRV] Add CSR API_NUMBER info comments (#2192)
Add comments to improve human-readability and referencing of CSR API. CORE-12451
2019-12-31 09:21:42 +09:00
Thomas Faber ef103d7d69
[WIN32K:NTUSER] Avoid user memory access outside of SEH in NtUserEnumDisplaySettings. 2019-12-29 20:08:51 +01:00
Thomas Faber 3d81dc48a7
[WIN32K:NTUSER] Correctly capture UNICODE_STRING in NtUserEnumDisplaySettings. 2019-12-29 20:08:44 +01:00
Thomas Faber be92be2e37
[WIN32K:NTUSER] Add missing probe in NtUserGetClassName. 2019-12-29 20:08:30 +01:00
Hermès Bélusca-Maïto a8e7defb01
[WIN32SS:USER] Some minimal work and fixes concerning message queues timeouts.
CORE-15147

- Rename CLIENTTHREADINFO::tickLastMsgChecked into timeLastRead as
  documented in https://reactos.org/wiki/Techwiki:Win32k/CLIENTTHREADINFO .
  This is the last time the message queue was read.

- This is the structure member one must compare against the current tick
  count timestamp in order to heuristically determine whether a message
  queue thread is hung!! Fix MsqIsHung() in accordance, add extra debug
  logging in order to help us determining which of our code present
  regular GUI hangs, and add as well an extra "TimeOut" parameter so as
  not to hardcode a fixed value within that function but instead
  allowing its caller to specify possible different values.

- THREADINFO::timeLast is on the contrary the last message time stamp,
  and will definitively differ from CLIENTTHREADINFO::timeLastRead .
  It should only be used for information purposes!

- Accordingly, in NtUserGetThreadState()::THREADSTATE_UPTIMELASTREAD
  and in InitThreadCallback(), only (re-)initialize the timeLastRead
  member of the CLIENTTHREADINFO structure of the THREADINFO of interest.

- In co_IntPeekMessage(), update more often the timeLastRead timestamp
  whenever the current message queue has been read (but NOT timeLast!!
  That one will be updated ONLY WHEN a message is found!).

- In co_IntSendMessageTimeoutSingle() first check whether the window to
  which we send the message is being destroyed, before checking for
  queue hangs etc. Collapse the logic checks for queue hang and increase
  the hang timeout check to 4 times MSQ_HUNG (== 4 * 5 seconds) and
  display a debug trace.
2019-12-29 16:14:15 +01:00
Thomas Faber 975e117780
[WIN32K:NTUSER] Add missing parameter probe in NtUserGetClassInfo. 2019-12-29 15:22:03 +01:00
Katayama Hirofumi MZ 22f883278b
[NTUSER] Fix caret display mistake (#2180)
Take care of caret visibility. co_IntSetCaretPos function wrongly drawn the caret upon invisible caret. @Doug-Lyons did test this patch. CORE-15661
2019-12-26 19:08:01 +09:00
Katayama Hirofumi MZ dfa3065e19
[CONSRV] Preparation for Asian console support (#2171)
Make preparation for console support of Chinese, Japanese and Korean (CJK) codepages. CORE-12451
- Add consrv/frontends/wcwidth.c.
- Add GuiPaintTextModeBufferCJK function.
2019-12-25 23:35:01 +09:00
Katayama Hirofumi MZ fb7ac93dd1
[WIN32SS][NTGDI][FREETYPE] Add ASSERT(pOS2); to FillTM (#2170)
I had used a static analyzer cppcheck to improve the code. This analyzer suggested NULL check for this code.
2019-12-25 18:27:44 +09:00
Katayama Hirofumi MZ 9ce12f0b4c
[BOOTDATA][NTUSER] Fix some system parameters (#2162)
CORE-16547
- Add IconTitleWrap registry value.
- Modify gspv.dwMenuShowDelay initial value.
- Initialize gspv.bFastTaskSwitch as TRUE.
2019-12-25 18:12:43 +09:00
Hermès Bélusca-Maïto 0fe71544d2
[VIDEOPRT] Complete dispatch IOCTL with IO_VIDEO_INCREMENT priority boost. 2019-12-24 18:34:19 +01:00
Hermès Bélusca-Maïto 18a51dc7f5
[VIDEOPRT][WIN32K] Use a Windows-compatible way of communicating the 'BaseVideo' state from VIDEOPRT to WIN32K.
This is done by creating the volatile key
\Registry\Machine\System\CurrentControlSet\Control\GraphicsDrivers\BaseVideo .

Also cache during first initialization of VIDEOPRT the state of the boot
options BASEVIDEO and NOVESA, so that they can be readily retrieved later
(for example, in VideoPortIsNoVesa()).
2019-12-24 13:51:20 +01:00
Katayama Hirofumi MZ dae1f8d716 [WIN32SS][FREETYPE][NTGDI] Clarify calculation precedence for '&' and '?' 2019-12-24 13:48:33 +09:00
Amine Khaldi e32507b525 [LOCALUI] Sync with Wine Staging 4.18. CORE-16441 2019-12-23 00:57:33 +01:00
Katayama Hirofumi MZ eba2d5d30a
[BOOTDATA][NTUSER] Fix GetSystemMetrics values (#2137)
Fix user32!GetSystemMetrics values. CORE-16547
SM_MENUDROPALIGNMENT and SM_CXSMSIZE
2019-12-21 22:38:49 +09:00
Katayama Hirofumi MZ 2af9e7dfac
[USER32] Add ICO_ExtractIconExW RetPtr NULL check (#2149)
CORE-16557
2019-12-16 20:37:23 +09:00
Hermès Bélusca-Maïto bfd8a84865
[BLUE] Improve initialization and interfacing with INBV.
CORE-15901

This fixes display reset transition when an external module acquired
INBV ownership and then released it, similarly to what was done in
commit 0ad65796 for VIDEOPRT.

For this a backup screenbuffer is used to store the contents of the
screen just before an INBV screen acquire transition, and these contents
are restored when it is detected that INBV ownership has been released.
Also, the active text font associated with the active console code-page
is restored, as well as the cursor state and shape.

In addition, any user of BLUE.SYS is now required to explicitly issue
a new IOCTL_CONSOLE_RESET_SCREEN to either enable or disable the screen.
This allows avoiding nasty unwanted screen mode switches when a handle
to the \Device\BlueScreen device is opened but no screen mode switch was
actually wanted - This "fixes" this annoyance on ReactOS and Windows,
when these are running witha VGA-compatible video driver and one wants
to look at properties of the \Device\BlueScreen device using
Sysinternals' WinObj.

Following this, we don't need to check anymore for explicit INBV
ownership by issuing calls to InbvCheckDisplayOwnership(), but instead
we check whether the screen has beeen manually enabled using the
aforementioned IOCTL. This partly supersedes commit 8b553a4b, and allows
fixing the second bug, namely that if we start ReactOS without the
/NOGUIBOOT option (and thus, INBV is active during boot), USETUP would
not show up anything because BLUE.SYS wouldn't display anything on screen.
See CORE-15901.

[USETUP][CONSRV] Call IOCTL_CONSOLE_RESET_SCREEN to tell BlueScreen device to enable the screen.
2019-12-15 03:37:52 +01:00
Doug Lyons c917c442ad [CONSRV] Fix for console windows shrinking on Minimize and Restore (#2014)
CORE-14200
2019-12-14 16:51:49 +01:00
Serge Gautherie cfdd483c0e [VGA_NEW] Fix 2 'MAX_USHORT' typos in commented code (#2145) 2019-12-10 13:17:17 +01:00
Katayama Hirofumi MZ 2d4d3f5fce
[COMCTL32][USER32] Fix radio button regression (#2146)
PR #2135 (e329e83) caused radiobutton regression. This PR will fix it.
- Clear DT_BOTTOM | DT_VCENTER flags upon calculating the button text height.
CORE-16552
2019-12-10 11:07:56 +09:00
jimtabor d447b41198 Merge branch 'master' of https://github.com/reactos/reactos 2019-12-09 11:19:18 -06:00
jimtabor 5214a38fd0 [Win32SS] Fix Opaque Text Fade while in Desktop Startup
See CORE-16498.
2019-12-09 11:18:32 -06:00
Katayama Hirofumi MZ e329e83857
[WIN32SS][COMCTL32] Improve button text position (#2135)
Improve DrawText function especially DT_CALCRECT and DT_VCENTER. CORE-15478
2019-12-09 21:16:28 +09:00
Katayama Hirofumi MZ 1793dcc864
[NTUSER] Improve loading settings (SystemParamtersInfo) (#2139)
Fix SPI_GETSCREENSAVETIMEOUT, SPI_GETKEYBOARDSPEED and SPI_GETKEYBOARDDELAY values. CORE-16547
2019-12-09 10:50:04 +09:00
Joachim Henze bd149e8a11 [CONSRV] Speed up console txt output CORE-16187
By demoting good-path DPRINT1 to DPRINT.
HBelusca agreed.

The more important commit to solve CORE-16187 has
been done beforehand in 0.4.14-dev-553-g
1dcdb4c2d0
2019-12-07 18:35:06 +01:00
Katayama Hirofumi MZ 007f32a223
[WIN32SS][WINSRV] Do CJK font choose workaround (#2134)
Don't choose Asian charset font if there is no preferred font for CJK. CORE-12451
2019-12-06 22:18:51 +09:00
Katayama Hirofumi MZ 1dcdb4c2d0
[WIN32SS][WINSRV] Optimize console background drawing (#2132)
Console needs speed. This PR will optimize drawing of console.
- Set NULL to the background brush.
- Skip WM_ERASEBKGND.
2019-12-05 20:19:00 +09:00
Hermès Bélusca-Maïto 4431418999
[VIDEOPRT] Protect access to HwResetAdaptersList with spinlock. 2019-12-03 02:46:38 +01:00
Hermès Bélusca-Maïto 0ad65796bb
[WIN32K][VIDEOPRT] Improve initialization and interfacing with INBV.
CORE-12149

VIDEOPRT:
=========

Improve interfacing with INBV, so as to detect when an external module
acquired INBV display ownership, and whether ownership is being released
later on. (This does NOT rely on hooking!)

For this purpose we improve the IntVideoPortResetDisplayParameters(Ex)
callback that gets registered with an InbvNotifyDisplayOwnershipLost()
call during initialization, and we add a monitoring thread.

The callback is called whenever an external module calls
InbvAcquireDisplayOwnership(), for example the bugcheck code or the KDBG
debugger in SCREEN mode. When this happens, a flag that tells the
monitoring thread to start monitoring INBV is set (ReactOS-specific),
and the display adapters get reset with HwResetHw() (as done on Windows).

Due to the fact that this INBV callback can be called at *ANY* IRQL, we
cannot use dispatcher synchronization mechanisms such as events to tell
the INBV monitoring thread to start its operations, so we need to rely
instead on a flag to be set. And, since INBV doesn't provide with any
proper callback/notification system either, we need to actively monitor
its state by pooling. To reduce the load on the system the monitoring
thread performs 1-second waits between each check for the flag set by
the INBV callback, and during checking the INBV ownership status.

When the INBV ownership is detected to be released by an external module,
the INBV callback is re-registered (this is *MANDATORY* since the
external module has called InbvNotifyDisplayOwnershipLost() with a
different callback parameter!), and then we callout to Win32k for
re-enabling the display.

This has the virtue of correctly resetting the display once the KDBG
debugger in SCREEN mode is being exited, and fixes CORE-12149 .

The following additional fixes were needed:

VIDEOPRT & WIN32K:
==================

Remove the registration with INBV that was previously done in a ReactOS-
specific hacked IRP_MJ_WRITE call; it is now done correctly during the
video device opening done by EngpRegisterGraphicsDevice() in the VIDEOPRT's
IRP_MJ_CREATE handler, as done on Windows.

WIN32K:
=======

- Stub the VideoPortCallout() support, for VIDEOPRT -> WIN32 callbacks.
  This function gets registered with VIDEOPRT through an
  IOCTL_VIDEO_INIT_WIN32K_CALLBACKS call in EngpRegisterGraphicsDevice().

- Only partially implement the 'VideoFindAdapterCallout' case, that just
  re-enables the primary display by refreshing it (using the new function
  UserRefreshDisplay()).

VIDEOPRT:
=========

- PVIDEO_WIN32K_CALLOUT is an NTAPI (stdcall) callback.

- In the IntVideoPortResetDisplayParameters(Ex) callback, reset all the
  "resettable" adapters registered in the HwResetAdaptersList list.
  We thus get rid of the global ResetDisplayParametersDeviceExtension.

- Make the IntVideoPortResetDisplayParameters(Ex) callback slightly more
  robust (using SEH) against potential HwResetListEntry list corruption
  or invalid DriverExtension->InitializationData.HwResetHw() that would
  otherwise trigger a BSOD, and this would be disastrous since that
  callback is precisely called when INBV is acquired, typically when the
  BSOD code initializes the display for displaying its information...

Extras:
- Validate the IrpStack->MajorFunction in IntVideoPortDispatchDeviceControl()
  and implement IRP_MJ_SHUTDOWN handling. Stub out the other IOCTLs that
  are handled by VIDEOPRT only (and not by the miniports).

- VIDEOPRT doesn't require IRP_MJ_INTERNAL_DEVICE_CONTROL (unused).

- Implement IOCTL_VIDEO_PREPARE_FOR_EARECOVERY that just resets the
  display to standard VGA 80x25 text mode.
2019-12-02 02:33:20 +01:00
Hermès Bélusca-Maïto 66909fa9d5
[VIDEOPRT] Implement VideoPortReadStateEvent(). 2019-11-25 00:41:53 +01:00
Hermès Bélusca-Maïto bf74f101c2
[VIDEOPRT] Use ExFreePoolWithTag() + Add some ASSERTs. 2019-11-25 00:41:53 +01:00
Hermès Bélusca-Maïto e930b868a0
[VIDEOPRT] Code formatting only. 2019-11-25 00:41:52 +01:00
Hermès Bélusca-Maïto 148e137b42
[WIN32K] Add some validity checks in PDEVOBJ_vReference() and use it instead of explicitly manipulating ppdev->cPdevRefs. 2019-11-25 00:41:51 +01:00
Hermès Bélusca-Maïto acf689a973
[WIN32K] Use RtlString* routines. 2019-11-25 00:41:49 +01:00
Hermès Bélusca-Maïto 0ad90f83d3
[WIN32K] Code formatting. 2019-11-25 00:41:49 +01:00
Katayama Hirofumi MZ ebfb62b420 [NTGDI][FONT] Delete FillTMEx function and simplify codes 2019-11-21 17:01:25 +09:00
Katayama Hirofumi MZ f8821421a4
[NTGDI][FONT] Don't rely FT_FaceRec.style_name (#2064)
- Delete ItalicFromStyle and WeightFromStyle functions.
- Don't use FT_FaceRec.style_name for font style but pOS2->fsSelection, pOS2->usWeightClass, WinFNT.italic and WinFNT.weight.
- Don't use the bitmap glyph as possible if the glyph will be oblique'd.
- Tahoma Italic is working!
CORE-9614
2019-11-20 22:49:51 +09:00
Katayama Hirofumi MZ 141cf04239
[NTUSER] Fix condition of HSHELL_WINDOWCREATED (#2046)
CORE-15655
If the owner window doesn't exist or is invisible or has WS_EX_TOOLWINDOW style, HSHELL_WINDOWCREATED regards the window a non-owned window. You can watch the shell hook information by using CORE-15655 ShellHookChecker.zip.
2019-11-19 17:54:23 +09:00
Katayama Hirofumi MZ fa264251a7 [USER32] Check whether the window is minimized upon SM_REPOSITION CORE-16490 2019-11-19 10:32:06 +09:00
Katayma Hirofumi MZ f981a68ee0 [USER32] Improve DM_REPOSITION CORE-16490 2019-11-16 12:52:40 +09:00
Katayma Hirofumi MZ 657887adf4 [USER32] Fix DM_REPOSITION (rc.bottom minus 4) 2019-11-16 11:21:16 +09:00
Katayama Hirofumi MZ 8249d2a3fa
[USER32] Implement DM_REPOSITION message (#2020)
DM_REPOSITION is dialog message that can reposition the dialog to the workarea when the dialog is partially/entirely in outside of the workarea. CORE-16490
2019-11-16 09:51:16 +09:00
Katayama Hirofumi MZ 462b1b7444
[NTUSER] Support MK_SHIFT/MK_CONTROL of mouse messages (#2038)
Upon mouse message generation, The states of Shift key and/or Ctrl key must be used. If Shift key is pressed, it enables MK_SHIFT flag of the mouse message. If Ctrl key is pressed, it enables MK_CONTROL flag of the mouse message. CORE-16279
2019-11-16 09:49:49 +09:00
Joachim Henze 19fbdda95c [WIN32SS] Prevent disabled scrollbars being clickable CORE-15557
Thanks to JIRA user 'I_Kill_Bugs.

VBox: https://reactos.org/testman/compare.php?ids=69671,69747
KVM: https://reactos.org/testman/compare.php?ids=69672,69748
2019-11-09 15:50:50 +01:00
James Tabor 34b4b96461 [User32] Properly handle WM_CTLCOLOR* messages.
Patch by Fabian Maurer : Properly handle WM_CTLCOLOR* messages.

See CORE-15560 and
fbec0ba9ee
.

Added support for module versions.
2019-11-06 21:43:00 -06:00
Hermès Bélusca-Maïto 3b2f158593
[NTOS][CLASS2][FFS][WIN32SS] Fix some pool tags so that they correctly appear in pool dump lists.
Reminder: in the code they are defined using reverse byte order
(Windows/ReactOS are little-endian OSes).
2019-11-01 19:12:27 +01:00
Katayama Hirofumi MZ b3033b81a4
[WIN32SS][NTUSER][USER32] Fix menu checkmarks (#2009)
CORE-16470
The checkmarks of menu were black boxes. This PR will fix drawing.
- Don't change background mode.
2019-11-01 09:52:18 +09:00
Joachim Henze 9e14a762d5 [WIN32SS] Fix last user visible parts of regression CORE-10855
When Themesvc was disabled, some Window titlebar
frames were drawn too thin until the window
was actively resized in y by the user.

That and similar symptoms started to show up after SVN r68904 ==
6dfa71c487

Many thanks to patches author Doug Lyons.

We leave the ticket unresolved still due to explicit request of
James Tabor, who wants to continue working in that context.

I will merge that back into 0.4.13RCs as well.
2019-10-25 00:42:01 +02:00
Katayama Hirofumi MZ 6fc6e3c398 [WIN32SS][NTGDI] Unite duplicate of condition 'UsesSource' 2019-10-22 09:33:32 +09:00
Katayama Hirofumi MZ 1bf982ff88 [WIN32SS][NTGDI] 'otm' is always non-NULL in epilogue 2019-10-22 09:29:15 +09:00
jimtabor 333b8f19a4 [GDI32] Update Gdi Driver Header.
Patch by : Akihiro Sagawa : Implement GetCharWidthInfo().

1128587fd2
2019-10-18 23:49:13 -05:00
Mark Jansen e1984d03b4
[WIN32K:menu] Use signed types for negative values...
CORE-16306
2019-10-12 16:19:58 +02:00
Joachim Henze 96ef605f4b [WIN32SS] Fix regression CORE-16393
Symptom "cmd did not hide the taskbar anymore when switching to fullscreen"

It regressed by SVN r75407 == git
09ab5ea7ed

VBox LGTM https://reactos.org/testman/compare.php?ids=69295,69297
 KVM LGTM https://reactos.org/testman/compare.php?ids=69296,69298

Many thanks to the patches author James Tabor.
2019-10-11 23:21:39 +02:00
Stanislav Motylkov 297abde716 [FREELDR][XBOXVMP] Retrieve screen resolution directly from NV2A GPU (#1962)
CORE-16216
2019-10-09 23:27:22 +02:00
Stanislav Motylkov b3301df570 [XBOXVMP] Fix broken pixels and general refactoring (#1896)
- Remove old hacky code based on MmHighestPhysicalPage.
- Split I2C SMBus code into a separate source file.

CORE-16216 CORE-16357
2019-10-08 17:08:44 +02:00
James Tabor 1f78e8ec47 [Win32SS] Support Module Versioning.
Set the appropriate flags supporting versions of software modules.
Fix arguments for getting desktop DC.
2019-09-24 17:40:18 -05:00
James Tabor c57d4d7b9e [User32|Tests] Sync Port Wine Combo Controls.
Need to cross check these changes with WINE ComCtl32 before you PANIC
HACK!!!!

Not in order:
Piotr Caban : Remove unneeded RECT parameter from CBPaintText helper.
              Don't invalidate ComboBox on CB_SETCURSEL message.
Don't invalidate ComboBox on LBN_SELCHANGE and
LBN_SELCANCEL.
              Add more CB_SETCURSEL tests on ComboBox.
              Redraw combo text field even if it's empty.
Let ComboBox edit control handle the redraw even if
CBF_NOREDRAW is set.
Don't do the painting if combobox is not visible in
CBPaintText.

Dmitry Timoshkov : Don't force a combobox repaint on WM_SIZE.

This breaks z-order based painting and causes side effects
for
applications that during the WM_PAINT processing reference
internal
             data associated with a not fully initialized window.
Ref :
2d9e3236ea

Fabian Maurer : Set listbox popup height correctly and add tests.

                Properly set dropdown height.

             Now that user32 and comctl32 combo are separated,
             this won't lead to a regression anymore
             Ref :
3d0be0bad8
             Info by Sebastian Lackner Ref:
f0fc034997

Nikolay Sivov : Remove some misleading TODOs and confusing comments.
2019-09-21 08:47:56 -05:00
Katayama Hirofumi MZ 81e27f0be7
[WIN32SS][NTUSER] Fix hit test position of popup menu
The submenu of desktop popup menu was erroneously shown at first right click.
- Fix the hit test position that was modified by window style change.
CORE-16382
2019-09-21 18:21:17 +09:00
Stanislav Motylkov b16ca9cd65 [WIN32SS][NTUSER] Fix debug print in winpos.c (#1893) 2019-09-12 15:53:29 +02:00
Katayama Hirofumi MZ b81f9b0842
[WIN32SS][FONT] Fix registry-based management (#1879)
CORE-16269
- Fix and improve registry-based font entry management.
- Append style name to registry value name.
- Make some DPRINT DPRINT1 (noisy).
2019-09-10 20:39:52 +09:00
jimtabor 6f353f7747 [Win32SS|Eng] Update stubs.
These functions are no longer support for UMPD.
2019-09-04 13:09:34 -05:00
jimtabor 3ca67d97e2 [Win32SS] Fix safe pointer and define type. 2019-09-03 15:02:46 -05:00
jimtabor c698eff041 [Win32SS] Implement EngCreate/DeletePalette.
Safe to be called from user side without UMPD support.
2019-09-03 14:36:20 -05:00
Stanislav Motylkov b54a38b8c0 [XBOXVMP] Improve debugging prints 2019-09-01 23:01:57 +02:00
Stanislav Motylkov 816149e0c3 [XBOXVMP] Code formatting only 2019-09-01 23:01:57 +02:00
Stanislav Motylkov 32fb2e7b5f [VIDEOPRT] Fix uninitialized Reserved bit field in PciSlotNumber
CORE-16317
2019-08-31 00:19:03 +02:00
Stanislav Motylkov 8c36145087 [XBOXVMP] Add Xbox video miniport driver
Also make XboxVmp driver compatible with Video Port driver, specify
vendor id and device id explicitly in VideoPortGetAccessRanges() call

CORE-16317
2019-08-31 00:19:03 +02:00
Jose Carlos Jesus d5dca45e51 [WIN32SS][USER][EXPLORER] Add/Update portuguese translation (#1882) 2019-08-26 21:01:41 +02:00
Victor Perevertkin 09abc443b1 [VIDEOPRT] Fix RtlCopyMemory sizeof usage
Spotted by GCC8
2019-08-20 15:05:47 +02:00
Joachim Henze 4193b8d8ac [WIN32SS] WindowSnap must not affect the taskbar
This fixes regression CORE-16289 where we could not longer
move the taskbar at a different than default location,
as WindowSnap would interfere.

Many Thanks to the patches author Doug Lyons.

Eventually the heuristic that we use here to identify the
taskbar via used window-styles could be improved later.
Theoretically possible that it bails out on some other windows.

The regression was introduced by 0.4.12-dev-373-g
7e396787ed
2019-08-20 12:07:56 +02:00
James Tabor d48345a0ee Update Headers for Printing and Other
Add missing flags and function types. Fix typos.
2019-08-15 21:39:26 -05:00
Timo Kreuzer 93028748c9 [VIDEOPRT] Fix order of some exports 2019-08-15 18:04:57 +02:00
Timo Kreuzer 21c9f2a488 [WIN32K] InitVideo() should return NTSTATUS, so return STATUS_SUCCESS instead of 1 2019-08-15 18:04:57 +02:00
Timo Kreuzer 7611cc2b12 [REACTOS] Fix SIZE_T related warnings 2019-08-15 14:20:00 +02:00
Timo Kreuzer 826704ba6b [VIDEOPRT] Implement support for INT10 on x64 using the newly implemented HAL functions. 2019-08-15 14:13:54 +02:00
Timo Kreuzer eba27d5856 [VIDEOPRT] Fixes for x64 2019-08-15 14:13:54 +02:00
Timo Kreuzer 832f8863be [VIDEOPRT] Call IntInt10CallBios from VideoPortInt10, instead of code duplication 2019-08-15 14:13:54 +02:00
Timo Kreuzer e7b3c66a42 [VIDEOPRT] [FORMATTING] No code change 2019-08-15 14:13:54 +02:00
Katayama Hirofumi MZ b863ecc33f
[WIN32SS][NTUSER] Fix menu drawing after style change (#1821)
There were menu drawing regression after 03adec8141.
This PR will fix it. CORE-16244

- We don't have to draw the frame manually because of WS_EX_DLGMODALFRAME extended style.
- We don't need the margins (MENU_TOP_MARGIN and MENU_BOTTOM_MARGIN) in the client area any more because the client area doesn't contain the frame width.
- Use GetSystemMetrics(SM_CXDLGFRAME) and GetSystemMetrics(SM_CYDLGFRAME) for frame width.
2019-08-11 07:46:14 +09:00
Katayama Hirofumi MZ 03adec8141 [WIN32SS][NTUSER] Fix popup menu freezing 2019-08-10 15:40:32 +09:00
Katayama Hirofumi MZ 2b526bceac
[WIN32SS][NTGDI] Registry-based font management (#1816)
CORE-16269
- Add IntGdiAddFontResourceEx function that is extended from IntGdiAddFontResource, in order to add dwFlags parameter.
- Add IntLoadFontsInRegistry function that will load the fonts from registry info.
- If loading from registry failed, IntLoadSystemFonts will be called.
- Use IntLoadFontsInRegistry rather than IntLoadSystemFonts in the OS startup.
- Add NameFromCharSet function.
- Append " (CharSetName)" to registry value name if not TrueType.
2019-08-10 14:52:09 +09:00
Katayama Hirofumi MZ 0749a868fc
[WIN32SS][NTUSER] Fix popup menu window styles (#1814)
Fix the class style, the window style and the extended style of the popup menu window. CORE-16244
2019-08-10 08:33:25 +09:00
Mark Jansen 6948764b21
[WIN32SS] Ensure the last menu item is not accidentally selected when a system menu is off-screen
CORE-16297
2019-08-08 19:51:28 +02:00
Mark Jansen 84e263ceb2
[WIN32SS] Do not propagate TPM_VERTICAL to sub-menus
With this change we can remove the workaround from the off-screen
menus dropping below their parent.
Many thanks to Joachim for his help debugging / testing this.

CORE-16297
2019-08-08 19:51:28 +02:00
Mark Jansen 1c8cdaa470
[WIN32SS] Fix tray popup menus stuck to the bottom of the screen
Dedicated to Joachim
CORE-16297
2019-08-08 19:51:28 +02:00
Mark Jansen 33f77af348
[WIN32SS] Fix off-screen menu's dropping below their parent 2019-08-08 19:51:28 +02:00
Mark Jansen 3cbdcc6363
[WIN32SS] For application menu's, only exclude the menu item,
not the entire window.
Because the application menu is part of the application window,
this would lead to bad results.
2019-08-08 19:51:15 +02:00
Katayama Hirofumi MZ 65e4efd475
[WIN32SS][NTUSER] Fix MENU_DrawScrollArrows (#1753)
Fix drawing the menu scrolling arrows. CORE-13211
2019-08-08 13:56:23 +09:00
Doug Lyons c1ec0d92e2
[WIN32K:NTGDI] Fix ASSERTS in REGION_bXformRgn. CORE-15992 2019-08-07 07:47:47 +02:00
Mark Jansen b5c6af459c
[WIN32SS] Exclude the entire menu from overlapping, not just the menu item
CORE-15863
2019-08-06 21:17:47 +02:00
Mark Jansen 7c45a646e9
[WIN32SS] Iteratively mutate menu flags until we find a 'best fit'
CORE-15863
2019-08-06 21:17:47 +02:00
Mark Jansen a59df3858c
[WIN32SS] Rewrite MENU_ShowPopup to take the exclude rectangle into account
CORE-15863
2019-08-06 21:17:35 +02:00
Katayama Hirofumi MZ 4414f45cc0
[WIN32SS][NTUSER] Fix default menu item font weight (#1804)
CORE-16294
We had added "Arial Black" font, so a request for heavy weight font will be realized as it is. This PR will fix font weight (FW_*) calculation of default menu items.
2019-08-05 23:16:01 +09:00
Katayama Hirofumi MZ 9cd11eb103
[WIN32SS][NTGDI] Fix condition of bold emulation (#1787)
- Define EMUBOLD_NEEDED macro to determine the condition of bold emuration necessity.
- Use this macro.
- Loose the condition.
2019-08-04 15:15:52 +09:00
Mark Jansen c057a07d79
[WIN32SS] Improve font loading failure logging 2019-08-04 01:55:18 +02:00
Mark Jansen 35dc022e14
[WIN32SS] Only access a font face if it was actually loaded 2019-08-04 00:41:12 +02:00
Katayama Hirofumi MZ 7547757892
[WIN32SS][NTGDI] Improve IntGetOutlineTextMetrics (#1760)
Improve size checking of IntGetOutlineTextMetrics function.
2019-08-02 20:28:30 +09:00
Katayama Hirofumi MZ 6642dbc470
[WIN32SS][NTGDI][NTUSER] Make gusLanguageID USHORT (#1776)
Every language ID is an unsigned integer.

- Make gusLanguageID unsigned.
- Make the return value type of UserGetLanguageID unsigned.
2019-07-31 22:24:01 +09:00
Katayama Hirofumi MZ 7c9755b47d
[WIN32SS][NTGDI] Fix and improve font dumping (#1768)
Fix and improve font dumping. CORE-16245
- FontGDI->FontObj is not a pointer.
- "%s" does null check, so we remove redundant null checks.
- Add FaceName and StyleName dumping.
2019-07-30 18:15:56 +09:00
jimtabor 02db01f3a6 [NtGDI] Fix one size region test.
See CORE-16246, the clip region may be the same size but more complex
than the callers simple region.
2019-07-29 13:02:07 -05:00
Hermès Bélusca-Maïto 8831328081 [USER32] Fix build after 51d031cc ; addendum to f21871fb (r69249) and cf98f01e (r72650). CORE-10194 2019-07-29 01:38:43 +02:00
Hermès Bélusca-Maïto 51d031cc5d
[USER32] Use the correct __REACTOS__ define. 2019-07-29 00:33:20 +02:00
jimtabor 665871527b [GDI32] Allow functions to access printing support.
Reapplying lost committed code.
2019-07-27 14:15:42 -05:00
jimtabor 4563ca28d3 [GDI32] Add more to Local DC structure.
Make the two structures identical. These are used for printing and
enhanced metafile support.
2019-07-27 14:13:14 -05:00
Timo Kreuzer 08c6d21e1f [REACTOS] Fix warning C4146: unary minus operator applied to unsigned type, result still unsigned 2019-07-27 11:21:28 +02:00
Joachim Henze 64e182e429 [WIN32SS] Addendum to font alignment CORE-16133
addendum to 0.4.13-dev-707-g
0e4db883e5

Jim Tabor intended to structurally use flTextAlign over
lTextAlign internally within IntExtTextOutW().
He initially committed these changes in 0.4.12-dev-805-g
3377fe184e

But we unintentionally lost these changes via 0.4.13-dev-370-g
8f482af0a8

Many thanks to Doug Lyons who helped a lot with fixing CORE-16133.
2019-07-27 10:00:42 +02:00
Katayama Hirofumi MZ 0e4db883e5 [WIN32SS][NTGDI] text/font vertical alignment patch CORE-16133
Based on Doug Lyons' patch. It partially fix CORE-16246 and CORE-16133.
Selection area is not fixed yet.
2019-07-26 19:13:00 +09:00
Katayama Hirofumi MZ 1e91a1690d
[USER32][NTUSER] Fix menu arrow drawing (of DrawFrameControl) (#1752)
CORE-13211
user32!DrawFrameControl drawed invalid menu arrow when the width is shorter than the height.

- Use the squared rectangle.
- Draw it in the transparent background mode.
- Save the old background mode of HDC.

This PR will fix UltraISO's bug.
2019-07-25 01:40:33 +09:00
Katayama Hirofumi MZ 31d616ff73
[WIN32SS][GDI] Assume pso->sizlBitmap.cy positiveness (#1743)
We assume pso->sizlBitmap.cy is positive. CORE-15995

Because pso->sizlBitmap.cy is certificated as a positive value after initialization in SURFACE_AllocSurface, so we can safely omit abs and labs (absolute) function calls for it.
2019-07-21 21:39:05 +09:00
Katayama Hirofumi MZ 023794c7c1 [FONTS][NTGDI] Change Marlett.ttf charset and delete charset hacks 2019-07-21 12:59:06 +09:00
Hermès Bélusca-Maïto 3de67cec24
[WIN32K:NTGDI] Improve allocated resources cleanup in failure paths of IntGdiLoadFontsFromMemory().
- Use an auxiliary list where we add the new enumerated faces, for easy
  roll-back in case a failure happens during font loading. Only at the
  very end when font loading has been successfully done, the auxiliary
  list is appended to the corresponding global or per-proceess font list.

- Perform actual cleanup in case of failures.

- Introduce CleanupFontEntryEx() helper to simplify cleanup in
  IntGdiLoadFontsFromMemory() in failure paths; implement
  CleanupFontEntry() around it.

Additions:

- Perform string buffer NULL check in IntGdiAddFontResource().
- Reorder memory unmapping and section object dereferencing in
  IntGdiAddFontResource().
- Move DuplicateUnicodeString() upwards.
- Mark explicitly the Marlett font handling hacks.
2019-07-21 01:01:41 +02:00
Katayama Hirofumi MZ ae99df1675 [WIN32SS][NTGDI] Support raster fonts (*.fnt and *.fon) (#1739)
Add raster font (*.fnt and *.fon files) support. CORE-16165

- Add IntGetCharSet() function to get the charset by index and/or the number of charsets.
- Make IntGdiLoadFontsFromMemory() a non-recursive function.
- IntGetOutlineTextMetrics() accepts raster fonts.
- Improve CharMap handling (especially TT_PLATFORM_APPLE_UNICODE).
- Write the raster font file info to the registry.
- Don't request font size for raster fonts in IntRequestFontSize() function.
2019-07-20 16:47:29 +02:00
Joachim Henze b5478a7873 [WIN32SS][FREETYPE] Fix performance regression FreeBASIC console output CORE-16177
By restoring historic state of GreExtTextOutW() / IntExtTextOutW()

This reverts guilty rev 0.4.12-dev-190-g
d6cfeaef51
as well as some follow ups that dealt with new errors popping up afterwards.
The revert got ack of Katayama Hirofumi MZ.

Test VBox on master: https://reactos.org/testman/compare.php?ids=68471,68475
Test KVM on master: https://reactos.org/testman/compare.php?ids=68472,68476

Analog revert was applied before to 0.4.12-RC-42-g
021f498cb2
2019-07-07 20:50:30 +02:00
Katayama Hirofumi MZ c17a8770a3
[USER32] Switch to only one window (Alt+Tab) (#1718)
Fix app switcher (Alt+Tab)'s behavior when there is only one app window. CORE-16176
2019-07-07 09:05:10 +09:00
Bernhard Feichtinger 774246e95c [WIN32SS][GDI] Improve stub for EngQueryDeviceAttribute 2019-06-30 23:50:20 +02:00
jimtabor a8d6e12bc1 [User32] Sync Port Wine.
Patch :
Nikolay Sivov : Use correct brush color for centered image background.
Nikolay Sivov : Remove confusing comments.
2019-06-28 22:22:49 -05:00
jimtabor 65a814203f [User32] Sync Port Wine.
Patch :
Vijay Kiran Kamuju : Add DlgDirList wildcard checks.
Nikolay Sivov : Fix setting negative dialog item ids.
Alistair Leslie-Hughes : Don't reset focus if current dialog is a child.
Dmitry Timoshkov : If there is no dialog controls to set focus to then
set focus to dialog itself.
Zhiyi Zhang : Send notification for the focused button in
IsDialogMessage().
Huw Davies : Avoid using the comma operator in a while condition.

Patch skipped : a525631920d74e9d797f38305b89e63aed1c5c41 : Scale dialog
base units based on DPI awareness.
2019-06-28 21:52:04 -05:00
Katayama Hirofumi MZ bf06c94e15
[WIN32SS][NTGDI] Strictly check in XFORMOBJ_iSetXform (#1676)
Check if the determinant of the given transformation matrix is non-zero. If zero, the function returns DDI_ERROR without change. CORE-15554
2019-06-24 21:32:40 +09:00
Hermès Bélusca-Maïto 0f3f8b2a35
[VGA_NEW] Fix confusion between CRTC Controller and Graphics Controller registers. 2019-06-23 02:12:24 +02:00
Hermès Bélusca-Maïto 78d20a9b3a
[WIN32K] Fix spelling typo. 2019-06-23 02:12:23 +02:00
Joachim Henze 1158c24194 [WIN32SS] Fix multiple scrollbar redraw issues
This fixes:
- CORE-15911 "Scrollbars do not dissapear when Maximizing and not needed"
- CORE-10617 "ListView corrupt scrollbar upon resizing the column-header"

and will appease regression:
- CORE-15429 "Uninitialized scrollbars in 'My Computer'"

By applying clientFix.patch from CORE-15911 contributed by JIRA-user 'I_Kill_Bugs'.

https://reactos.org/testman/compare.php?ids=66723,66729

Earlier I already committed this fix into 0.4.12-RC-9-g
5ac548544f
2019-06-22 22:27:23 +02:00
jimtabor 8c7705eb5d [Win32SS] Complete Print Driver Callbacks
This callback works. Haven't commit the rest yet. Still thinking about
the data packets types and shapes. Using wordpad to test this. It works,
loads and unloads due to incomplete driver support and no PDEV. It
crashes in ComCtl32 while loading a text file. When this gets committed
without a solution, the code will be commented out.
2019-06-22 12:02:51 -05:00
James Tabor 40c42305c3 [Win32SS] Add Driver Callback
Add user driver callback to be used later on.
2019-06-21 13:10:03 -05:00
Katayama Hirofumi MZ 641a0ea99b
[WIN32SS][NTGDI] usWinAscent and usWinDescent must be treated as signed (#1670)
TT_OS2.usWinAscent and TT_OS2.usWinDescent must be treated as FT_Short. These values affect font metrics. This PR will fix CORE-14994.
2019-06-20 18:58:45 +09:00
Thomas Faber 00e882c2b1
[WIN32K:ENG] In PDEVOBJ_vRefreshModeList, find a proper match for the current display mode instead of assuming a constant index. CORE-15325 2019-06-16 12:45:58 +02:00
Mark Jansen 04712d418c
[WIN32K] Use KeStackAttachProcess 2019-06-15 21:26:41 +02:00
Mark Jansen 97d1590914
[WIN32K] Attach to the target process before unhooking
CORE-16083
2019-06-15 21:26:41 +02:00
Mark Jansen 7a3937ddaf
[WIN32K] Fix indenting in IntRemoveHook 2019-06-15 21:26:35 +02:00
Joachim Henze 3cc50cedaf [WIN32SS][NTUSER] Addendum to 0.4.12-dev-956-g0197c4f CORE-15893
Aims PixelPerfection for a regression that was introduced by
0.4.12-dev-954-g
1f619b2781

and then improved already by
0.4.12-dev-956-g
0197c4f875

The tweaking got ack of Jim Tabor. Test results:
https://reactos.org/testman/compare.php?ids=68026,68029
2019-06-10 15:33:31 +02:00
Joachim Henze 8f482af0a8 [WIN32SS][FREETYPE] Avoid performance regression CORE-16020
by reverting essential parts of "Font rotation at arbitrary angles"
which was once committed in several steps:

Initial commit (PR#1207)
0.4.12-dev-243-g
f757a13519
broke font rendering for GTK apps CORE-15623

Second commit (PR#1238)
0.4.12-dev-558-g
64987cf273
restored font rendering in GTK apps but introduced slowdown CORE-16020

Katayama agreed to the temporal revert and will try to come up later
with a performance optimized version.
We revert in 0.4.12-RC and 0.4.13-dev.

The revert will cause failure-increases in gdi32:TextTransform
https://reactos.org/testman/compare.php?ids=67898,67901
2019-06-06 02:24:20 +02:00
Serge Gautherie 7804cf035a [USER32] RegisterClipboardFormatA(): Enable a SetLastError() (#1612) 2019-06-05 18:15:02 +02:00
Serge Gautherie b84b755e2b [LOCALSPL] Check DBG with #if, not #ifdef
Addendum to r74433.
2019-06-05 03:32:52 +03:00
Serge Gautherie 38db074491 Misc addendum to CORE-14271 (#1529)
* [ADVAPI32] Simplify RtlCreateUnicodeStringFromAsciiz() return value check

RtlCreateUnicodeStringFromAsciiz() returns a BOOLEAN, not a BOOL.

No functional change.

Addendum to
CORE-14271

* [USER32] Simplify RtlCreateUnicodeStringFromAsciiz() return value check

RtlCreateUnicodeStringFromAsciiz() returns a BOOLEAN, not a UINT.

Also, add a FIXME.

No functional change.

Addendum to
CORE-14271

* [USER32] Simplify RegisterClipboardFormatA/W() a bit

No functional change.

* [UDFS] Simplify SeSinglePrivilegeCheck() return value check

No functional change.

Addendum to
CORE-14271
2019-06-04 16:56:33 +02:00
James Tabor 9f57320175 [GDI32] Meta File Fix Ups
Remove pointer hack. Safer since using wines Enhanced Meta headers with
unknown wine magic information.
2019-06-03 15:49:14 -05:00
Katayama Hirofumi MZ a73c17fcd9
Revert "[USER32] Make App Switcher use the owner window's icon (#1299)" (#1605)
This reverts commit 484943d04f.
2019-06-03 08:47:43 +09:00
Katayama Hirofumi MZ f7fc10c17c
[WIN32SS][USER32] Fix Task Switcher more (#1602)
This PR will fix task switcher (Alt+Tab) as Win2k3. It became more reliable. CORE-15653
c.f. Raymond Chen's article: http://blogs.msdn.com/b/oldnewthing/archive/2007/10/08/5351207.aspx
2019-06-02 19:17:50 +09:00
James Tabor 931c72fde5 [NtUser] Fix Clipboard Synthesized Returns
Add supported for Meta file synthesized renderings.
See CORE-12143.
2019-06-01 07:23:58 -05:00
jimtabor 73558e94df [User32] Fix Clipboard Meta Test Results
Fix meta data handle returns.
2019-05-31 22:59:29 -05:00
jimtabor da264743e1 [Win32SS] Support Clipboard Metafile
Major fix ups and plugging in missing code changes. Handle code is from
another project currently being developed for ReactOS.
See CORE-12143
2019-05-31 21:44:17 -05:00
Katayama Hirofumi MZ 1010f3796e
[USER32] Fix behavior of Task Switcher (Alt+Tab) (#1591)
Task Switcher didn't correctly behave on the windows with WS_EX_APPWINDOW extended style. CORE-15653
2019-05-31 17:02:47 +09:00
jimtabor 268b21c2f9 [NtGDI] Support Clipboard Metafile
Fuctions that help transfer meta file data from one process to the next.
See CORE-12143.
2019-05-30 16:36:33 -05:00
jimtabor e229b3eea7 [GDI32] Support Clipboard Metafile
Metafile patch from Katayama Hirofumi MZ. See CORE-12143.
2019-05-30 16:33:23 -05:00
Katayama Hirofumi MZ 86046a9bf4
[WIN32SS][NTGDI] Don't use FLOAT in ftGdiGetGlyphOutline (#1576)
Don't use FLOAT variable in ftGdiGetGlyphOutline function. CORE-15838
2019-05-27 18:35:43 +09:00
Katayama Hirofumi MZ c52b8288d1
[WIN32SS][NTGDI] Avoid allocation of zero size in NtGdiGetGlyphIndicesW (#1577)
In NtGdiGetGlyphIndicesW function, allocation of zero size had caused fatal failures.
Avoid allocation of zero size in ExAllocatePoolWithTag calls. Optimize for cwc == 0. CORE-12825
2019-05-27 16:52:45 +09:00
Katayama Hirofumi MZ a0be8d2c2d
[WIN32SS][NTGDI] Improve Text Transformation (#1573)
Reduce gdi32_apitest!TextTransform failures. Optimize for speed. Add Width and Escapement parameters to FONT_CACHE_ENTRY structure.
CORE-15554
2019-05-26 16:12:35 +09:00
Hermès Bélusca-Maïto 5ca9c9c138
[CONSRV] Minor code cleanup. 2019-05-26 00:00:39 +02:00
Katayama Hirofumi MZ fabbd7c1c1
[WIN32SS][NTGDI] Don't use FLOAT for orientation (#1574)
Addendum to 0137096. Use 16.16 fixed-point values instead of FLOAT. CORE-15838
2019-05-24 08:24:21 +09:00
Katayama Hirofumi MZ 0137096449
[WIN32SS][NTGDI] Don't use FLOAT in IntEscapeMatrix (#1572)
Appendum to 1a40284. Use a 16.16 fixed point value instead of FLOAT. CORE-15838
2019-05-23 19:40:54 +09:00
Katayama Hirofumi MZ cba1a2f742 [WIN32SS][NTUSER] Fix msvc-x64 build 2019-05-23 08:32:41 +09:00
Joachim Henze 1a402847ed [FREETYPE] Fix regression CORE-16041 Font/Text Rotation Angles Too Small
Thanks to the patches author Doug Lyons
and the reviewers hbelusca and Katayama Hirofumi MZ.

The regression was introduced by
0.4.13-dev-24-g
61475b9fed
2019-05-22 23:15:09 +02:00
jimtabor 0f29b3faa7 [NtUser] Fix setting screen size.
Back set change size to the server information metrics.

Fixes CORE-15477. Still more work is required.

Patch based on reactosfanboy original patch.
2019-05-21 16:24:52 -05:00
Hermès Bélusca-Maïto c4e2826c73
[CONSOLE][CONCFG][CONSRV] Provide support for specified additional TrueType fonts + bugfixes.
CORE-12451 CORE-13182 CORE-13196

- CONSOLE: Initialize the additional TrueType fonts cache.
  * Fix the font preview when a TrueType font has been selected.
  * Refresh the available fonts and the font preview when the selected
    code page is changed (Work In Progress), or when the OS pool of
    font resources has changed (WM_FONTCHANGE message).

- CONCFG: Implement support for the additional TrueType fonts cache:
  the contents of the cache is enumerated under the registry key
    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont

  * Add helper functions and macros.
  * In CreateConsoleFontEx(), set the mandatory font pitch&family flags
    and remove those that we do not support.
  * In IsValidConsoleFont2(), update the validity checks and the
    documentation links.

- CONSRV: Load/refresh the additional TrueType fonts cache when needed.
2019-05-19 23:10:41 +02:00
jimtabor 2161dd85dc [NtUser] Fix Paint Messages
This is a HACK for forcing painting of non client areas. Paint code
seems very restricted.

See CORE-7166 & CORE-15934.
2019-05-13 11:31:58 -05:00
jimtabor 5418f394ab [Gdi32] Batch Type Select Mode for Testing
Do not allow setting hdc if no batch type is found.
See CORE-15988.
2019-05-11 11:22:06 -05:00
jimtabor dc7f4f682f [Win32SS] Plug in Last Batch
Plugging in last batch after 12 years.
2019-05-09 12:35:21 -05:00
jimtabor 94b4b5c127 [NtGDI] Fix ExtSelectClipRgn Tests
Fix results from tests, add (last one) gdi batch support for
ExtSelectClipRgn. Left commented out test code in tree this time.
Pass Katayama Hirofumi MZ SelectClipRgn tests. After commit will plug in
the last batch. After 12 years.

See CORE-13817 and CORE-15906.
2019-05-09 12:33:21 -05:00
Hermès Bélusca-Maïto 2ebda0e3d0
[CONSOLE.CPL] Fix the console screen preview when selecting TrueType fonts.
CORE-13182 CORE-13196

- Use the correct character height & width.
- Additions: use StringCch*() when initializing the dialog title.

[CONSRV:CONCFG] Minor fixes.

- When retrieving font characteristics in ConCfgReadUserSettings(),
  check for NULL/zero values that indicate that we should use default
  ones instead.
- Rename 'dwNumSubKeys' into 'dwNumValues'.
2019-05-05 01:20:19 +02:00
Katayama Hirofumi MZ 262f712810 [WIN32SS][NTGDI] Correctly get/update ptlCurrent about TA_UPDATECP 2019-05-04 10:07:24 +09:00
Katayama Hirofumi MZ cb9a9fa984 [WIN32SS][NTGDI] Wrap IntLPtoDP and IntDPtoLP macros by do { .... } while (0) 2019-05-04 09:56:09 +09:00
jimtabor 2cc766b0c6 [NtGDI] Set Xform flags if a changed
Missed more flags changes.
2019-05-02 11:56:55 -05:00
jimtabor b2ce1ae206 [NtGDI] Set Xform flags if a changed
Missed flags changes.
2019-05-02 10:16:50 -05:00
jimtabor 04a04659da [NtGDI] Adding Support for Viewport TextOut
Add Viewport changes to Text Out Batch.
2019-05-02 10:11:11 -05:00
James Tabor 9d00413754 [GDI32] Add batch flag for Text Out
Set batch flag for Text Out with font and attributes change sets.
2019-05-01 23:24:53 -05:00
James Tabor 44b11ad6a9 [GDI32] Fix MS build
Fix old uncovered code.
2019-05-01 20:53:06 -05:00
James Tabor b751c31c74 [GDI32] Update signal flags for batch.
Add removed flags for batch signaling. This will allow syncing of
changed Xfroms after batched drawing. Disable calls to kernel mode since
the code is closely identical. Kernel calls are for init time when
PDCATTR is normally zero. ReactOS seems to work better keeping this from
NULL.
While making code changes add Xform state flags from:
https://www.reactos.org/archives/public/ros-diffs/2019-May/070693.html

Test BOT results:
https://reactos.org/testman/compare.php?ids=67251,67254
https://reactos.org/testman/compare.php?ids=67253,67255
2019-05-01 20:33:09 -05:00
Katayama Hirofumi MZ f7bc0543cb
[WIN32SS][NTGDI] Fix ExtTextOut about TA_UPDATECP (#1546)
Add WORLD_XFORM_CHANGED flag to some positioning functions.
Fix IntExtTextOutW function for TA_UPDATECP alignment, so that it can correctly update the current position. CORE-14994
2019-05-01 16:51:00 +09:00
Katayama Hirofumi MZ 8bdfdd5c17
[WIN32SS][NTGDI][GDI32] Fix DPtoLP and NtGdiTransformPoints etc. (#1540)
Fix NtGdiTransformPoints, gdi32!DPtoLP, gdi32!LPtoDP and gdi32!SetMapMode functions. Fix CORE-15983. CORE-15983
2019-04-29 14:45:44 +09:00
Hermès Bélusca-Maïto 0aed8b09a4
[CONSRV] Cache the console window system menu handle; simplify its initialization code. 2019-04-28 21:47:55 +02:00
Serge Gautherie cf48f8bf8a [REACTOS] Replace remnant legacy SPIF_SENDWININICHANGE by SPIF_SENDCHANGE (#1526)
No functional change otherwise.
2019-04-28 21:19:42 +02:00
Andrew Boyarshin 458a26ab76
[WIN32SS:NTUSER] Use the 2nd parameter of NtUserGetThreadDesktop() as fallback. (#1065)
- The 2nd parameter is already passed in user-mode by GetThreadDesktop().
  It is then used by NtUserGetThreadDesktop() as a fallback for console
  threads.

- Lookup and validate the thread by using the IntTID2PTI() helper.
- Don't reference the desktop with too many access rights.
- Get rid of the old-school DECLARE_RETURN() & co. macros.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2019-04-28 19:27:45 +02:00
Katayama Hirofumi MZ 23ad2173f2 [WIN32SS][NTGDI] Fix wrong IN/OUT (#1539) 2019-04-28 17:24:57 +02:00
Hermès Bélusca-Maïto d70848b8b7
[WINSRV] Implement SrvGetThreadConsoleDesktop(). CORE-13470
It retrieves the handle to the desktop assigned to the specified
thread belonging to a console application, which is going to be
where the input thread of this console is.
2019-04-28 02:50:38 +02:00
Katayama Hirofumi MZ 39312ba688 [WIN32SS][NTGDI] Use UNICODE_NULL for consistency 2019-04-27 16:17:37 +09:00
Katayama Hirofumi MZ 19fc9415bf
[WIN32SS][NTGDI] FireFox checkmark fix CORE-15303 (#1535)
The font size was a bit larger than expected. FireFox will show checkmarks correctly in View menu. CORE-15303
2019-04-27 09:38:01 +09:00
Katayama Hirofumi MZ ae8417fd90
[WIN32SS][NTGDI] Keep FontSubstitutes enumeration CORE-15785 (#1532)
Fix CORE-15785. When LOGFONT.lfFaceName[0] == 0, then enumeration of font substitutes had failed. CORE-15785
2019-04-26 21:56:36 +09:00
Bernhard Feichtinger f5471b7b4b
[NTOS][USERSRV] Silence noisy debug output. 2019-04-22 17:41:17 +02:00
Pierre Schweitzer 610cc5a6b6
[GDI32] Reduce verbosity on debug builds 2019-04-20 11:24:54 +02:00
jimtabor feb9c045cf [NtGDI] Update Region code
Wine Sync/Port and update for Regions. See CORE-15906.
2019-04-17 14:43:24 -05:00
jimtabor 7fabc51d73 [GDI] Fixup attribute support for Regions
Start to fix CORE-13817 when GDI batch is turn on for SelectClipRgn.
2019-04-17 14:09:58 -05:00
Hermès Bélusca-Maïto 61475b9fed
[WIN32SS:NTGDI] IntEscapeMatrix(): Use FreeType trigonometric functions instead of CRT ones. 2019-04-14 01:19:03 +02:00
Hermès Bélusca-Maïto 7334567211
[GDI32] Do not 'hard-assert' during the font-unit-test. 2019-04-14 01:17:15 +02:00
Katayama Hirofumi MZ 94a42d43b5
[WIN32SS][NTUSER] Fix message time (#1259)
Fix CORE-15565 and make #1245 GetMessageTime testcase successful. CORE-15565
- Erase MsqCalculateMessageTime function.
- Use (DWORD)EngGetTickCount() instead.
- Ghosting is temporarily disabled.
2019-04-12 07:56:04 +09:00
Katayama Hirofumi MZ 983cd57c1e [WIN32SS][NTGDI] Delete unnecessary (ULONG) cast CORE-15755 2019-04-11 18:23:32 +09:00
Katayama Hirofumi MZ bc9f3ed887
[GDI32][NTGDI] Avoid integer overflow (follow-up of #1492) (#1495)
Follow up of #1492. CORE-15755
- Use RtlULongMult function to check integer overflows.
2019-04-11 17:57:57 +09:00
Katayama Hirofumi MZ 811faed421
[GDI32][NTGDI][SETUP] Fix font enumeration part 2 (#1492)
Eliminate some bugs about font enumeration. CORE-15755

- Add "Microsoft Sans Serif" font substitution.
- Fix and improve the treatment of the nominal font names.
- Split IntGetFontFamilyInfo function from NtGdiGetFontFamilyInfo.
- Add DoFontSystemUnittest function for font system unittest to GDI32.
- Call DoFontSystemUnittest function at CreateFontIndirectW first call.
2019-04-11 11:46:52 +09:00