Bug 444801

Summary: vmmouse: wrong click behavior (System Activity monitor columns cannot be sorted)
Product: [openSUSE] openSUSE 11.1 Reporter: Robin Knapp <robin.knapp>
Component: KDE4 WorkspaceAssignee: E-mail List <kde-maintainers>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P4 - Low CC: eich, forgotten_kHYb7eJGnH, jeffery, mike, sndirsch, wstephenson
Version: Beta 5   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Robin Knapp 2008-11-13 20:26:11 UTC
I'm running the beta5 kde4 live cd.

In the System Activity Monitor (ctrl-esc or krunner) the columns cannot be sorted by clicking on the header.
Comment 1 Stephan Binner 2008-11-15 16:48:01 UTC
Cannot reproduce.
Comment 2 Robin Knapp 2008-11-19 21:41:45 UTC
i'll test again with next release...

fwiw, columns can be rearranged by dragging them, but the list itself cannot be sorted at all (by clicking on the header of the column).
Maybe you got that wrong.
Comment 3 Michal Kubeček 2008-12-13 22:59:38 UTC
I can reproduce this bug in RC1. Probably the same issue as Bug #443029. The problem seems to appear in any Qt4 application but only in virtual machines (VMware, KVM), not on a physical machine.
Comment 4 Robin Knapp 2008-12-15 09:44:47 UTC
This only happens when using the "vmmouse" driver.
This driver produces wrong click events:

----
MotionNotify event, serial 34, synthetic NO, window 0x3200001,
    root 0x5d, subw 0x0, time 827296, (86,46), root:(678,71),
    state 0x0, is_hint 0, same_screen YES

ButtonPress event, serial 34, synthetic NO, window 0x3200001,
    root 0x5d, subw 0x0, time 827297, (86,46), root:(678,71),
    state 0x0, button 1, same_screen YES

MotionNotify event, serial 34, synthetic NO, window 0x3200001,
    root 0x5d, subw 0x0, time 827381, (86,46), root:(678,71),
    state 0x100, is_hint 0, same_screen YES

ButtonRelease event, serial 34, synthetic NO, window 0x3200001,
    root 0x5d, subw 0x0, time 827381, (86,46), root:(678,71),
    state 0x100, button 1, same_screen YES
----

The MotionNotify seems to cause the problem with qt4. With the "mouse" driver I only get the Button events and sorting the columns works fine.

I also find that occasionally in konquerer text is marked when clicking somewhere on the page.
I assume that the vmmouse driver creates a move event from the last click position to the new click position. Maybe a feature and sometimes needed in vmware?

-> reopening

@KDE team, if you think qt4 is behaving well and the vmmouse is buggy, please assign to the xorg team; I'm not sure where exactly the problem is and if the vmmouse behaviour should not be harmful.
Comment 5 Stefan Hundhammer 2008-12-16 10:50:48 UTC
*** Bug 443029 has been marked as a duplicate of this bug. ***
Comment 6 Lubos Lunak 2009-01-16 14:41:37 UTC
Xlib documentation, 10.5.2. Keyboard and Pointer Events:
The X server reports MotionNotify events to clients wanting information about when the pointer
logically moves. The X server generates this event whenever the pointer is moved and the pointer
motion begins and ends in the window. The granularity of MotionNotify events is not guaran-
teed, but a client that selects this event type is guaranteed to receive at least one event when the
pointer moves and then rests.

I don't think the pointer "logically moves" in this case, so this should be a problem in the driver.
Comment 7 Matthias Hopf 2009-02-12 15:59:52 UTC
Given that a mouse in most cases moves a bit when you press a button because of the sensitivity of today's optical sensors, a toolkit should accept small movements during clicks anyway.

The Xlib documentation Lubos cited states that on moves MotionNotify is generated, but NOT that it is not generated if there is no move. A toolkit has to behave gracefully here.

Adding Egbert for validation, reassigning to kde.
Comment 8 Will Stephenson 2009-12-02 17:19:27 UTC
Egbert, do you agree with Matthias here?  If so I'll upstream to Qt's bugtracker.  I guess Qt could discard any MotionNotifys at the same coordinates as the ButtonPress.

(WIP - analysis for Qt:
Summary: Some X11 mouse drivers generate MotionNotify events between ButtonPress and ButtonRelease with the same coordinates.

Our X developers say this is within Xlib specification.    

Because of how QHeaderView handles mouse move events, it is impossible to click QHeaderView given these 'stationary' move events:

If QHeaderView receives mouseMoveEvent while in state QHeaderViewPrivate::MoveSection even if the move is less than startDragDistance,  it shows the section indicator.  If this is visible at the mouseReleaseEvent, the event is treated as the end of a drag, instead of a click.  I suggest not showing the section indicator until a move event that is not at firstPos.

)
Comment 9 Forgotten User kHYb7eJGnH 2010-08-13 10:15:52 UTC
bump
Comment 10 Stefan Dirsch 2010-09-13 19:15:41 UTC
Egbert? ping!
Comment 11 Robin Knapp 2010-09-14 07:30:12 UTC
FWIW, the issue seems to be fixed in recent releases.
At least in my openSUSE 11.3 VM I do not have any problems anymore with vmmouse.
Comment 12 Stefan Dirsch 2010-09-14 07:49:42 UTC
Thanks. So let's finally close the issue as fixed. :-)