Page 1 of 1

Mouse Scroll Bug

Posted: Sun Nov 24, 2019 7:32 pm
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

Re: Mouse Scroll Bug

Posted: Mon Nov 25, 2019 7:39 pm
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

Re: Mouse Scroll Bug

Posted: Mon Nov 25, 2019 8:42 pm
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

Re: Mouse Scroll Bug

Posted: Tue Nov 26, 2019 6:53 am
by Zinn
Note: Setting lines equal one, doesn't solve the problem. Slow scroll works but sometimes fast scroll produce the same error.

Re: Mouse Scroll Bug

Posted: Thu Nov 28, 2019 5:22 pm
by Josef Templ
I have no idea what may cause such a behavior.

- Josef

Re: Mouse Scroll Bug

Posted: Fri Nov 29, 2019 4:38 pm
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

Re: Mouse Scroll Bug

Posted: Sun Dec 01, 2019 2:41 pm
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

Re: Mouse Scroll Bug

Posted: Sun Dec 01, 2019 6:10 pm
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

Re: Mouse Scroll Bug

Posted: Sun Dec 01, 2019 7:20 pm
by Ivan Denisov
There is the bug item in tracker for this
https://redmine.blackboxframework.org/issues/130

Re: Mouse Scroll Bug

Posted: Mon Dec 02, 2019 6:49 pm
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