Commit graph

69 commits

Author SHA1 Message Date
Doug Lyons fb43301bad
Fix Cursor Position in "...file name:" box when opening from Explorer 'Search' toolbar (#6333)
Original patch by @I_Kill_Bugs.
Fix Cursor being in middle of '...file name:' edit box when using 'Search' from the Explorer toolbar.

JIRA issue: CORE-19407
2024-01-17 07:42:18 -08:00
Katayama Hirofumi MZ 90432c1a4c
[COMCTL32][USER32] EDIT & ListView & TreeView: Fix HRGN leaks (#6268)
Based on KRosUser's memleak_comctl32.patch.
JIRA issue: CORE-19405
Fix HRGN handle leaks.
2024-01-04 18:05:39 +09:00
Katayama Hirofumi MZ b59bf8a3f4
[COMCTL32][USER32] ComboBox: Don't close listbox on letter type (#6227)
Based on KRosUser's combo_v3.patch.
JIRA issue: CORE-16376
- Set CBF_NOROLLUP flag on (WM_CHAR or
  WM_IME_CHAR) and CBF_DROPPED state.
2024-01-03 08:45:24 +09:00
Katayama Hirofumi MZ d6c70f0864
[COMCTL32][USER32] RadioButton: Notify BN_CLICKED on WM_SETFOCUS (#6266)
Based on KRosUser's button_fixnotif.patch.
JIRA issue: CORE-6542, CORE-19384
Notify BN_CLICKED to the parent on WM_SETFOCUS message
handling if the button type was either BS_RADIOBUTTON or
BS_AUTORADIOBUTTON, and if the button was unchecked.
2024-01-01 11:01:59 +09:00
Katayama Hirofumi MZ 34068456a5
[COMCTL32][USER32] EDIT control: Check bCaptureState on WM_CHAR (#6206)
Based on KRosUser's edit_v2.patch.
Edit control should stop processing
characters when left mouse button
is down.
If es->bCaptureState is set, then
ignore WM_CHAR message.
CORE-10259
2023-12-21 20:24:44 +09:00
Katayama Hirofumi MZ d55add359c
[COMCTL32][USER32] Button: Fix DLGC_... handling (#6168)
Based on KRosUser's button.patch.
- Fix DLGC_... handling by using & operator
  in BUTTON_CheckAutoRadioButton
  in button.c.
- Fix DLGC_... handling by using & operator
  in IsDialogMessageW in dialog.c.
- BM_CLICK's wParam must be zero.
CORE-17210
2023-12-16 09:29:13 +09:00
Katayama Hirofumi MZ 04b1e8945b
[COMCTL32][USER32] ComboBox: Do default processing on WM_SYSKEYDOWN (#6152)
Based on KRosUser's combo.patch. Enable Alt+F4 on ComboBox.
Do default processing on WM_SYSKEYDOWN if necessary.
CORE-18231
2023-12-11 22:04:18 +09:00
Joachim Henze e13ebd44c6 [USER32] Pure Whitespace sync from comctl32/combo.c, no functional change
This will make future syncs between those files much easier,
and fixes tons of mixed tab-space-indentation.

Please no whitespace nitpicks when reviewing this commit, it is a SYNC!
2023-09-11 17:57:40 +02:00
Joachim Henze d97313181e [USER32] Sync comctl32 combo.c code in context of CORE-17883 2023-09-11 17:57:40 +02:00
Andriy Shevchenko 2ea03b5b22
[REACTOS] Fix typos in comments (#5591)
Fixing typos in code comments enhances code readability and comprehension for developers and collaborators.
2023-08-22 16:20:29 +03:00
Katayama Hirofumi MZ 8f2c2c1def [COMCTL32][USER32] EDIT: Fix caret position for IME
CORE-11700
2023-04-10 08:27:50 +09:00
Katayama Hirofumi MZ 66c8ded454
[COMCTL32][USER32] EDIT: CompForm and CandForm (#5226)
The changes of this PR are on EDIT controls.
- Delete composition_len and composition_start members.
- Add EDIT_ImmSetCompositionWindow helper function.
- At EDIT_SetCaretPos, set the position of the composition window.
- We don't use internal composition string. Rely on the composition window.
- Improve WM_IME_STARTCOMPOSITION, WM_IME_COMPOSITION and WM_IME_ENDCOMPOSITION message handling.
CORE-11700
2023-04-09 15:19:19 +09:00
Katayama Hirofumi MZ 2b356adbc5
[COMCTL32][USER32] EDIT: WM_SETFONT for IME (#5214)
- Call ImmSetCompositionFontW in WM_SETFONT handling of EDIT controls if necessary.
- If the specified font is NULL, then use DEFAULT_GUI_FONT.
CORE-11700
2023-04-04 19:09:21 +09:00
Katayama Hirofumi MZ 6d650bfc8f
[COMCTL32][USER32] WM_IME_CHAR: Rely on DefWindowProc... (#5191)
Use DefWindowProc... for WM_IME_CHAR handling. CORE-15289, CORE-11700
2023-03-27 19:42:47 +09:00
Katayama Hirofumi MZ 8d26b03775
[COMCTL32][USER32] EDIT: Half-implement WM_IME_SETCONTEXT handling (#5182)
Add WM_IME_SETCONTEXT handling to the window procedure of the EDIT control. CORE-11700, CORE-15289
2023-03-23 12:24:40 +09:00
Katayama Hirofumi MZ b25daf4b56
[COMCTL32][USER32] EDIT: Half-implement WM_IME_STARTCOMPOSITION (#5183)
Improve WM_IME_STARTCOMPOSITION handling in the window procedure of the EDIT control. CORE-15289, CORE-11700
2023-03-23 12:24:00 +09:00
Katayama Hirofumi MZ be518f9f5a
[COMCTL32][USER32] EDIT: Default processing on WM_IME_SELECT/WM_IME_CONTROL (#5173)
Do default processing on WM_IME_SELECT and WM_IME_CONTROL messages in EDIT controls. CORE-11700, CORE-15289
2023-03-22 09:09:38 +09:00
Thomas Faber 8e0c920fd2
[WINESYNC] user32/edit: Allow buffer access after EM_GETHANDLE.
wine commit id f62d8dc58fb3fb5f11a8ab55620ab9b2fbdaf967 by Nikolay Sivov <nsivov@codeweavers.com>
2023-03-07 21:48:06 -05:00
Mark Jansen 76753cd342
[USER32] Fix edit UAF by importing wine commit b40ddf42370e8344a862fbbc40384678db3871a9 2023-02-25 23:41:41 +01:00
Jose Carlos Jesus a3eda784a5
[COMCTL32] Don't hardcode dwCaretWidth parameter while calling CreateCaret
Also replace 0 with NULL for the second argument of the function call.

CORE-18151
2022-10-12 22:12:19 +03:00
Jose Carlos Jesus 9789e9c409
[COMCTL32] Read caret width from registry
Add caret width value to EDITSTATE structure.
To keep the same behavior as Windows Server 2003,
we need to update dwCaretWidth when EDIT_WM_SetFocus is called.

CORE-18151
2022-10-12 22:12:19 +03:00
Katayama Hirofumi MZ 826bd41d88
[NTUSER][USER32] Initial support of WS_EX_NOACTIVATE flag (#4731)
WS_EX_NOACTIVATE flag forbids the window to be activated. CORE-18417
2022-10-04 09:40:43 +09:00
Mark Jansen 977c129f33
[USER32] SetScrollPos should not bypass UserApiHook
CORE-18048
2022-02-23 20:32:02 +01:00
Robert Naumann d64ab28b5f
[USER32] Use UINT as parameter for DrawText() (#4357)
Import Wine Commit 0ba1bfb0624d5e95f15499d6cfc9af1910c7c5be by Marcus
Meissner: user32: DrawText gets a 32bit flag, not a 16bit flag.

Fixes CORE-17315 - spottted by I_Kill_Bugs
2022-02-16 00:50:51 +01:00
Katayama Hirofumi MZ fbab1914a6
[USER32] Don't delay-load-link to imm32.dll (#4328)
Reduce binary size.
- Don't directly call the IMM32 functions. Use IMM_FN instead.
- Modify CMakeLists.txt to unlink imm32.dll.
CORE-11700
2022-01-31 09:30:47 +09:00
Katayama Hirofumi MZ 55a1c29341
[NTUSER][USER32] Simplify SwitchToThisWindow (#4153)
CORE-17894
2021-12-13 08:14:33 +09:00
Katayama Hirofumi MZ 8c9b6fdb5c
[USER32] Partially fix freezing of Task Switcher (#4148)
- Use SendMessageTimeout instead of SendMessage.
- Use SwitchToThisWindow instead of BringWindowToTop.
- Use ShowWindowAsync instead of ShowWindow.
- Use SWP_ASYNCWINDOWPOS for SetWindowPos.
CORE-17894
2021-12-10 13:37:43 +09:00
Timo Kreuzer d07203ecb7 [WIN32K][USER32] Change mechanism for storing dialog info pointer
DLGWINDOWEXTRA is 30 (both on win32 and win64). This has storage for the following entries: DWLP_MSGRESULT (0), DWLP_DLGPROC (8), DWLP_USER (16)
We used to store the dialog info pointer using SetWindowLongPtr (DWLP_ROS_DIALOGINFO == DWLP_USER+sizeof(ULONG_PTR) == 24), which was fine on win32, but failed on win64, since there wasn't enough space left (24 + 8 = 32 > 30).
Rewrite the way the DLGINFO pointer is stored, by adding an additional field to the WND structure and set it using NtUserxSetDialogPointer (which is what it is for).
Also fix too small cbWndExtra for the button class.
2021-05-28 08:26:36 +02:00
Jose Carlos Jesus 62e52c7237
[USER32][NTUSER] Fix wrong return from LB_GETLISTBOXINFO (#2168)
And is now consistent with comctl32 and Wine too...
2020-07-04 15:11:10 +02:00
Katayama Hirofumi MZ 413d722628
Revert "Revert "[COMCTL32][USER32] Fix radio button regression (#2146)" (#2753)" (#2758)
This reverts commit 66b0a48a75.
2020-05-09 15:32:15 +09:00
Katayama Hirofumi MZ 66b0a48a75
Revert "[COMCTL32][USER32] Fix radio button regression (#2146)" (#2753)
This reverts commit 2d4d3f5fce.

Reverts #2146. I think #2135 (e329e83) and #2146 (2d4d3f5) are my mistakes.
CORE-16552, CORE-16747
2020-05-09 11:30:11 +09:00
Jose Carlos Jesus ad591d0269 [USER32] Fixed issue with thumb scrolling on IDC_PICKICON_LIST 2020-04-30 18:58:20 +02:00
Jose Carlos Jesus d0a6727637 [USER32] Fixed scrolling by mouse wheel issue 2020-04-30 18:58:20 +02:00
Jose Carlos Jesus a4483d79da [USER32] Fixed scrolling issue in Change Icon dialog. CORE-16163 2020-04-30 18:58:20 +02:00
Serge Gautherie c2dbc18660 [USER32] EDIT_WM_KillFocus(): Restore Wine code, #ifdef'ed out
Use '#ifdef __REACTOS__' for WINESYNC'ed code.

Partially reverts 71ab0b5d4c.
CORE-10266
2020-04-26 17:48:41 +02: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
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
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
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
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
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
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
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
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
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
Stanislav Motylkov 36230bb214 [USER32] Edit: Fix caret and scroll position
Based on patch by JIRA contributor 'I_Kill_Bugs'. CORE-15780
2019-03-24 23:26:20 +01:00
Hermès Bélusca-Maïto 780f2ba215
[USER32][COMCTL32] Move the auto radio button group logic from BM_SETCHECK to WM_LBUTTONUP handler.
CORE-8526

Import Wine commit:
96d0af52eb

"user32: Move the auto radio button group logic from BM_SETCHECK to WM_LBUTTONUP handler.
This patch also changes the logic to get the control style with WM_GETDLGCODE
instead of GetWindowLong to make the message test pass.
"
by Dmitry Timoshkov.
See bug report https://bugs.winehq.org/show_bug.cgi?id=42010

- (ReactOS-only) Fix also the corresponding logic in COMCTL32.
2019-03-24 17:23:24 +01:00