Bug 304799

Summary: kwindecoration kcm is broken when using a touchpad
Product: [Plasma] kwin Reporter: Nikita Skovoroda <chalkerx>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Severity: normal CC: lamarque
Priority: NOR Flags: thomas.luebking: ReviewRequest+
Version: 4.9.0   
Target Milestone: 4.9.1   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 4.9.1
Sentry Crash Report:
Attachments: The video recorded on a 4.9 RC

Description Nikita Skovoroda 2012-08-08 14:52:47 UTC
The source of the problem is horizontal scroll.

Reproducible: Always

Steps to Reproduce:
1. Get on a notebook with touchpad and kde 4.9. Enable two-finger vertical and horizontal scroll in the touchpad settings.
2. Install a bunch of kwin themes, more than default four ones. kdeartwork-styles will do.
3. Open kwindecoration kcm. Try to scroll it up and down.
Actual Results:  
When you accidently scroll a little bit it horizontal direction, everything dissappears.
It's not easy to get things back working without reopening the kcm again (the behaviour can be a bit different depending on the layout: the window size, the number of themes, etc).

Expected Results:  
Everything should be working and fully functional, nothing should suddenly dissapear.

This could be also triggered using a mouse with horizontal scroll, but it's hard to do that accidently.
You should click horizontal scroll right-left while scrolling down, for example, to trigger the bug.
Comment 1 Nikita Skovoroda 2012-08-08 14:54:04 UTC
Created attachment 73050 [details]
The video recorded on a 4.9 RC
Comment 2 Lamarque V. Souza 2012-08-08 15:06:05 UTC
Well, it only happens here if I enable both horizontal and vertical two-finger scrolling, if I enable only one of them the problem does not happen. The question is: is it wise to enable both at the same time? I do not think touchpads are capable of correctlly distinguishing vertical and horizontal moviments with two-fingers moving on its surface.
Comment 3 Nikita Skovoroda 2012-08-08 15:17:02 UTC
1) It works well (as expected) in other apps. Generally, scroll doesn't need to be very precize when viewing something, and two-finger any-direction scroll is very convenient on large views. And there are many cases when only one of the scrollbars (vertical or horizontal) is present, and two-finger any-direction scroll is handy there, too.

2) Anyway, there is no horizontal scroll visible on that view, so pressing horizontal scroll buttons should not do anything, and this is an application bug.
Comment 4 Nikita Skovoroda 2012-08-08 15:18:53 UTC
3) You can reproduce that with a regular mouse, too.
Comment 5 Nikita Skovoroda 2012-08-08 15:20:07 UTC
> I do not think touchpads are capable of correctlly distinguishing vertical and horizontal moviments with two-fingers moving on its surface.

It works good enough everywhere i tried.
Comment 6 Thomas Lübking 2012-08-08 15:22:06 UTC
It doesn't happen here at all because i don't use no nasty touchpad :-P

That doesn't change the fact that the flickable should not react on horizontal scroll events - luckily we filter events to turn it more into a regular list anyway, so eating horizontal wheelevents is likely sufficient.

I now got to figure whether i can map my scrollwheel into a horizontal one or someone else will have to test the fix - for i don't posses as stupid touchpad.
(Did i mention i hate these things?)

Can we now please lower noise on this bug which is likely fixed by a one liner?

@Nikita, the list is in fact a QML Flickable element - expect more weird behavior, feel free to report annoyances, don't expect everything to be solvable that easily.
Comment 7 Nikita Skovoroda 2012-08-08 15:29:10 UTC
Ok, sorry for the noise.

Up/down are mousebuttons 4/5, left/right are mousebuttons 6/7.
As i already said, this is also reproducable using a mouse with a horizontal scroll (like logitech with pushing the wheel left-right).

I'll try to reproduce that using a keyboard and xbindkeys, wait a moment.
Comment 8 Thomas Lübking 2012-08-08 15:30:43 UTC
I already successfully modmapped the pointer, test patch this evening and create RR afterwards (i'm pretty sure the oneliner will do)
Comment 9 Thomas Lübking 2012-08-08 17:58:00 UTC
It also depends on the vertical offset of the list (in case anyone wants to reproduce it) and can be easily reproduced by simple Button 6/7 events.

Comment 10 Thomas Lübking 2012-08-11 20:34:35 UTC
Git commit 2f738a211feebc6af9f50f41f7fd8af2a568f196 by Thomas Lübking.
Committed on 08/08/2012 at 19:52.
Pushed by luebking into branch 'KDE/4.9'.

hide horizontal wheel events from the deco list
FIXED-IN: 4.9.1
REVIEW: 105934

M  +5    -0    kwin/kcmkwin/kwindecoration/kwindecoration.cpp