Commit graph

17 commits

Author SHA1 Message Date
Thamatip Chitpong 90ed686209
[NTUSER] Use UserHMGetHandle macro (#6244)
Use UserHMGetHandle macro everywhere instead of obj->head.h for consistency.
2024-01-05 07:16:44 +07:00
Thamatip Chitpong 533d877aaf
[NTUSER] Remove RETURN() macro (#6194)
Remove macro definition and the remaining uses.
RETURN() macro is just a wrapper for goto, most of the time it makes the code more complicated than using goto directly.
2023-12-21 11:10:46 +07:00
Joachim Henze 2aea4ab945 [NTUSER] Scrollbar.c pure whitespace fixes
The scrollbar code is now finally in a good shape.
Therefore I will port the current state back today,
and for that I want to have the formatting in good shape.

No functional changes!
2023-03-12 10:34:50 +01:00
Joachim Henze 5ad5737370
[NTUSER] Delete temporary workarounds in co_IntSetScrollInfo() (#4985)
fixes JIRA issue: CORE-18050

improves the code by removing ancient hacks (the static variables)

reduces testbot failures
VBox: https://reactos.org/testman/compare.php?ids=85831,85832 LGTM (-2 failures in user32:scroll for both bots)
KVM: https://reactos.org/testman/compare.php?ids=85829,85833 LGTM (-2 failures in user32:scroll for both bots)

co-authored by Doug-Lyons
2023-02-12 00:35:27 +01:00
Katayama Hirofumi MZ 0484beb04b
[NTUSER] Don't redraw scrollbar if it is hidden (#4849)
Fix redrawing bug on Command Prompt. CORE-18593
2022-11-10 13:12:20 +09:00
Serge Gautherie 03422451b3 [REACTOS] Add '\n' to debug logs
on TRACE, WARN, FIXME and ERR calls.

Plus a few nit picks.
2022-05-04 03:28:38 +03:00
Mark Jansen fd28a69de6
[WIN32SS] Store the scrollbar theming enabled flag in the scrollbar
This ensure we do not rely on usermode for always passing this flag in,
which is a ReactOS specific flag.
Thanks to Doug Lyons for finding the source of the problem.
CORE-17780
2022-02-16 18:43:32 +01:00
Joachim Henze 222acf5a3e [NTUSER] Scrollbar.c, Avoid potential out-of-bounds-accesses in co_IntSetScrollInfo() CORE-17777
This is an addendum to
0.4.15-dev-3174-g dda9c3979e CORE-17769 and
0.4.15-dev-3147-g 3bf7e3ac13 CORE-17754 CORE-17755

We have not seen this happening in real-life yet, but some code-fragments within co_IntSetScrollInfo()
e.g. line 628 if (nBar == SB_CTL) do clearly indicate that nBar can be 2 (SB_CTL).
Some lines below we definitely must not access those 4 static arrays out of bounds then via nBar as access index!

Ftr with a bit of grepping I also found some calls like NtUserSetScrollInfo(Wnd, SB_CTL, &Info, FALSE);
e.g: in win32ss/user/user32/controls/scrollbar.c so I am pretty sure nBar == 2 can happen in practice within co_IntSetScrollInfo().

I question whether any of those reads/writes to those static arrays (or the comparisons) would make any sense on index 2,
so we should aim to eliminate them altogether in the future.
2021-09-20 03:05:05 +02:00
Joachim Henze dda9c3979e [NTUSER] Scrollbar.c, improve co_IntSetScrollInfo() CORE-17769
Fixes CORE-17769 'Rapps Listview manual resize may erroneously not draw the triangles sometimes'
This could happen for both: themed and unthemed.

CORE-17769 was a regression introduced by 0.4.14-dev-1134-g 00adb1a3f9

We don't really like the added state in form of the static variables,
but the patch works good from a pure testing-perspective.

Many Thanks to the patches author: Doug Lyons
2021-09-19 22:35:37 +02:00
Doug Lyons 3bf7e3ac13
[NTUSER] Improve Themed Scrollbars by Minimizing Updates (#3953)
This fixes regressions CORE-17754 and CORE-17755 which regressed by
0.4.15-dev-3086-g 236649c626
2021-09-12 22:54:46 +02:00
Doug Lyons 236649c626
[UXTHEME][NTUSER] Fix flashing of scrollbar when scrolling (#3868)
Based on a patch by I_Kill_Bugs.
2021-09-03 22:34:26 +03:00
George Bișoc ffea5152e6
[WIN32SS][NTUSER] Fix an integer underflow within scrollbar info setting
Thanks goes to I_Kill_Bugs for the patch (and partly to Kyle Katarn for the PR) and Hermes for tweaking the patch code. Had to make a commit myself as the PR author's account is deleted.

Signed-off by: I_Kill_Bugs (original patch author)
Signed-off by: Kyle Katarn <contact@kcsoftwares.com>
Signed-off by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2021-04-25 15:56:39 +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
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
Mark Jansen e022d8d7cb
[WIN32SS] Require at least the amount of extra memory, not the exact amount
This fixes Civ II trying to create scrollbars based on 'native' scrollbars.
2019-01-21 22:25:29 +01:00
Mark Jansen 929a2c6637
[WIN32SS] Disable scrollbars when SIF_DISABLENOSCROLL is used
CORE-13918
2018-10-28 13:02:27 +01:00
Colin Finck c2c66aff7d Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
Renamed from reactos/win32ss/user/ntuser/scrollbar.c (Browse further)