Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-12

trunk OSX Lion 10.7.2 Scrolling Problem

8 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Helmut Hartl

On OSX lion 10.7.2 in lazarus trunk, the svn revision 33972 breaks the mouse wheel scrolling in the ide editor
(at least for a magic mouse) -> The view stutters, does not scroll, or scrolls only some lines and stops.
The version before worked fine.

In synedit.pp the following hack brings back normal scrolling behaviour: Tested on svn 34518.

procedure TCustomSynEdit.WMMouseWheel(var Message: TLMMouseEvent); begin Message.Result:=0; end; -- Helmut

Reply by email

Martin
to Helmut Hartl

Seems that Mac sends a delta of 40 per click, win and linux do 120

you can change this in synedit until fixed

procedure TCustomSynEdit.WMMouseWheel(var Message: TLMMouseEvent);
var
   lState: TShiftState;
const
   WHEEL_DELTA = 120;
begin

Note you may have similar issues in other windows (e.g. disassembler)

Helmut Hartl wrote 22 lines
On OSX lion 10.7.2 in lazarus trunk, the svn revision 33972 breaks the mouse wheel scrolling in the ide editor (at least for a magic mouse) -> The view stutters, does not scroll, or scrolls only some lines and stops. The version before worked fine. In synedit.pp the following hack brings back normal scrolling behaviour: Tested on svn 34518. -- procedure TCustomSynEdit.WMMouseWheel(var Message: TLMMouseEvent); begin Message.Result:=0; end; -- Helmut -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

zeljko
to Martin
Martin wrote
Seems that Mac sends a delta of 40 per click, win and linux do 120

Not only Mac (carbon & cocoa) ,but qt under mac too.

zeljko

Show quoted text 33 lines
you can change this in synedit until fixed procedure TCustomSynEdit.WMMouseWheel(var Message: TLMMouseEvent); var lState: TShiftState; const WHEEL_DELTA = 120; begin Note you may have similar issues in other windows (e.g. disassembler) On 30/12/2011 16:51, Helmut Hartl wrote: > On OSX lion 10.7.2 in lazarus trunk, the svn revision 33972 breaks the > mouse wheel scrolling in the ide editor > (at least for a magic mouse) -> The view stutters, does not scroll, or > scrolls only some lines and stops. > The version before worked fine. > > In synedit.pp the following hack brings back normal scrolling behaviour: > Tested on svn 34518. > > Helmut -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20111230/fe7452cb/attachment.html>

Reply by email

Helmut Hartl
to Martin: Seems that Mac sends a delta of 40 per click, win and linux do 120 you can change this…
Martin wrote 13 lines
Seems that Mac sends a delta of 40 per click, win and linux do 120 you can change this in synedit until fixed procedure TCustomSynEdit.WMMouseWheel(var Message: TLMMouseEvent); var lState: TShiftState; const WHEEL_DELTA = 120; begin

I guessed and changed it to 40: (because the above code is the same as in svn)

---
procedure TCustomSynEdit.WMMouseWheel(var Message: TLMMouseEvent);
var
   lState: TShiftState;
const
   WHEEL_DELTA = 40;
begin
---

but that does not help for me (it stutters and jumps just a bit more/different nervous)

Maybe something elso gone wrong with the refactoring in rev.33972.

The working hack (scrolling works with the hack)

procedure TCustomSynEdit.WMMouseWheel(var Message: TLMMouseEvent); begin Message.Result:=0; end; -- gives the impression that the events are handled elsewhere ? helmut

Reply by email

Martin
to Helmut Hartl
Helmut Hartl wrote 14 lines
I guessed and changed it to 40: (because the above code is the same as in svn) --- procedure TCustomSynEdit.WMMouseWheel(var Message: TLMMouseEvent); var lState: TShiftState; const WHEEL_DELTA = 40; begin --- but that does not help for me (it stutters and jumps just a bit more/different nervous)

Interesting. I tested but on a very old Mac...
With 40 it does not stutter, but it does scroll 3 lines per wheel move.

Part of the issue is that
Mouse.WheelScrollLines
returns "3" lines to be scrolled per "wheel click"

I have no idea where on a mac that can be configured, or how else this value come to be...

As far al I can see, a mac always scrolls one line for a single "wheel click", but depending on the systems wheel speed setting, it increases this, if several consecutive clicks are received.

Anyway, I have to wait until someone who knows the LCL carbon code, confirms what should be expected, and how this should be compatible with other widgetsets. (I've send the question out already... / off this list)

---------
you can go to the "mouse" settings in the lazarus general options, and force one line per click

Show quoted text 11 lines
Maybe something elso gone wrong with the refactoring in rev.33972. The working hack (scrolling works with the hack) -- procedure TCustomSynEdit.WMMouseWheel(var Message: TLMMouseEvent); begin Message.Result:=0; end; -- gives the impression that the events are handled elsewhere ?

somewhere in the LCL...

But that is no solution, as the above kills the new settings in lazarus for the mouse wheel (editor zoom / scroll pages ...)

Reply by email

Hans-Peter Diettrich
to Martin
Part of the issue is that Mouse.WheelScrollLines returns "3" lines to be scrolled per "wheel click"

AFAIR the 3 is hardcoded somewhere...

I have no idea where on a mac that can be configured, or how else this value come to be...

If not already present, the TMouse class (widgetset equivalent) should offer such configuration, for platforms with no corresponding system-wide settings. See:

--------- you can go to the "mouse" settings in the lazarus general options, and force one line per click

DoDi

Reply by email

Martin
to Hans-Peter Diettrich
Hans-Peter Diettrich wrote 13 lines
Martin schrieb: > I have no idea where on a mac that can be configured, or how else > this value come to be... If not already present, the TMouse class (widgetset equivalent) should offer such configuration, for platforms with no corresponding system-wide settings. See: > --------- > you can go to the "mouse" settings in the lazarus general options, > and force one line per click

that setting is synedit only

Reply by email

Martin
to Helmut Hartl: On OSX lion 10.7.2 in lazarus trunk, the svn revision 33972 breaks the mouse wheel…
Helmut Hartl wrote 5 lines
On OSX lion 10.7.2 in lazarus trunk, the svn revision 33972 breaks the mouse wheel scrolling in the ide editor (at least for a magic mouse) -> The view stutters, does not scroll, or scrolls only some lines and stops. The version before worked fine.

Please try with rev 34570

"Normal" scrolling should work.

However any other function that yau may assign to the wheel (or shift/alt + wheel) will only react to every third wheel turn. This is due to the lcl carbon code

Reply by email