mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-05 10:57:55 +02:00
GTK3: Fixed handling of scroll event.
Scrolling was not correctly handled due to error in the logic of handling the scrolling event. This fix is related to #21067.
This commit is contained in:
parent
ad0f0b2083
commit
aabe67dfd9
@ -5104,6 +5104,7 @@ var
|
|||||||
Msg: TLMVScroll;
|
Msg: TLMVScroll;
|
||||||
MaxValue: gdouble;
|
MaxValue: gdouble;
|
||||||
Widget: PGtkWidget;
|
Widget: PGtkWidget;
|
||||||
|
StateFlags: TGtkStateFlags;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
|
||||||
@ -5141,7 +5142,8 @@ begin
|
|||||||
|
|
||||||
if Msg.Scrollcode = SB_THUMBTRACK then
|
if Msg.Scrollcode = SB_THUMBTRACK then
|
||||||
begin
|
begin
|
||||||
if Widget^.get_state_flags = GTK_STATE_FLAG_NORMAL then
|
StateFlags := Widget^.get_state_flags;
|
||||||
|
if not (GTK_STATE_FLAG_ACTIVE in StateFlags) then
|
||||||
begin
|
begin
|
||||||
Msg.ScrollCode := SB_THUMBPOSITION;
|
Msg.ScrollCode := SB_THUMBPOSITION;
|
||||||
DeliverMessage(AData.LCLObject, Msg);
|
DeliverMessage(AData.LCLObject, Msg);
|
||||||
|
Loading…
Reference in New Issue
Block a user