Commit 28c4972c authored by Erwan Tulou's avatar Erwan Tulou

skins2(Linux): fix scrolling twice faster than expected

On Linux, two scrolling events were generated for each wheel step
(one on ButtonPress, one on ButtonRelease). This led to scrolling being
twice faster on Linux than it is on Windows.

This patch ensures that only one scroll event is issued for one step at the
mouse wheel.
parent 5d2dcf67
......@@ -300,19 +300,25 @@ void X11Loop::handleX11Event()
case 4:
{
// Scroll up
EvtScroll evt( getIntf(), event.xbutton.x,
event.xbutton.y, EvtScroll::kUp,
mod );
pWin->processEvent( evt );
if( event.type == ButtonPress )
{
EvtScroll evt( getIntf(), event.xbutton.x,
event.xbutton.y, EvtScroll::kUp,
mod );
pWin->processEvent( evt );
}
break;
}
case 5:
{
// Scroll down
EvtScroll evt( getIntf(), event.xbutton.x,
event.xbutton.y, EvtScroll::kDown,
mod );
pWin->processEvent( evt );
if( event.type == ButtonPress )
{
EvtScroll evt( getIntf(), event.xbutton.x,
event.xbutton.y, EvtScroll::kDown,
mod );
pWin->processEvent( evt );
}
break;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment