Mouse Scroll Bug

Usage of the framework, compiler and tools
Post Reply
Zinn
Posts: 123
Joined: Mon Nov 24, 2014 10:47 am
Location: Frankfurt am Main
Contact:

Mouse Scroll Bug

Post by Zinn »

The PROCEDURE WheelScroll in MODULE HostWindows doesn't work in Linux under Wine.

How to produce the error?
1. Open a document e.g. Host/Mod/Windows.odc
2. Move the whole window down until the bottom line is outside the display area.
3. Move the mouse inside this window and turn the scroll bar.
4. Lines are insert at the bottom are unreadable.

When I change the

lines := 3;
res := WinApi.SystemParametersInfoW(104 (*SPI_GETWHEELSCROLLLINES*), 0, SYSTEM.ADR(lines), 0);

against

lines := 1;
(*
res := WinApi.SystemParametersInfoW(104 (*SPI_GETWHEELSCROLLLINES*), 0, SYSTEM.ADR(lines), 0);
*)

than slow scrolling works in Wine too.

- Helmut
Josef Templ
Posts: 262
Joined: Tue Sep 17, 2013 6:50 am

Re: Mouse Scroll Bug

Post by Josef Templ »

Does it mean that WinApi.SystemParametersInfoW is not supprted under wine?

What is the value in "lines" after calling it?
It should be 3 (the Windows default) or may be some user configured value.

What if you set lines := 3; under wine without calling WinApi.SystemParametersInfoW?

- Josef
Zinn
Posts: 123
Joined: Mon Nov 24, 2014 10:47 am
Location: Frankfurt am Main
Contact:

Re: Mouse Scroll Bug

Post by Zinn »

> What is the value in "lines" after calling it?
It's value is always 3.

> What if you set lines := 3; under wine without calling WinApi.SystemParametersInfoW?
I have the same problem.

- Helmut
Zinn
Posts: 123
Joined: Mon Nov 24, 2014 10:47 am
Location: Frankfurt am Main
Contact:

Re: Mouse Scroll Bug

Post by Zinn »

Note: Setting lines equal one, doesn't solve the problem. Slow scroll works but sometimes fast scroll produce the same error.
Josef Templ
Posts: 262
Joined: Tue Sep 17, 2013 6:50 am

Re: Mouse Scroll Bug

Post by Josef Templ »

I have no idea what may cause such a behavior.

- Josef
Zinn
Posts: 123
Joined: Mon Nov 24, 2014 10:47 am
Location: Frankfurt am Main
Contact:

Re: Mouse Scroll Bug

Post by Zinn »

So I am too.
I propose to change in HostWindows the number of lines to one for wine and left it unchanged for Windows
IF Dialog.IsWine() THEN
lines := 1;
ELSE
lines := 3;
res := WinApi.SystemParametersInfoW(104 (*SPI_GETWHEELSCROLLLINES*), 0, SYSTEM.ADR(lines), 0);
END;
That help me very much and solves 90% of my problem.
- Helmut
Josef Templ
Posts: 262
Joined: Tue Sep 17, 2013 6:50 am

Re: Mouse Scroll Bug

Post by Josef Templ »

It seems to be a clipping/updating problem under wine.

You can also produce pixel garbage if lines := 1.
It looks like the problem occurs when the screen update is not yet finished when the next scroll event arrives,
or something like that.
Try scrolling multiple lines with a single mouse wheel turn.

- Josef
Zinn
Posts: 123
Joined: Mon Nov 24, 2014 10:47 am
Location: Frankfurt am Main
Contact:

Re: Mouse Scroll Bug

Post by Zinn »

Josef Templ wrote: Try scrolling multiple lines with a single mouse wheel turn.
- Josef
Most the time I read the next line 3 times (the second and third line overwritten with the first line). Seldom all 3 lines are unreadable.
Bildschirmfoto vom 2019-12-01 19-19-29.png
User avatar
Ivan Denisov
Posts: 362
Joined: Tue Sep 17, 2013 12:21 am
Location: Krasnoyarsk, Russia

Re: Mouse Scroll Bug

Post by Ivan Denisov »

There is the bug item in tracker for this
https://redmine.blackboxframework.org/issues/130
Josef Templ
Posts: 262
Joined: Tue Sep 17, 2013 6:50 am

Re: Mouse Scroll Bug

Post by Josef Templ »

Did someone from oberoncore ever look at this bug?
Is it true that it is only related to wine? So far, I was not ale to
produce it under Windows.

- Josef
Post Reply