Bug 349179

Summary: Clicking on program in task manager occasionally selects icon
Product: [Plasma] plasmashell Reporter: Greg Lepore <greg>
Component: Task Manager and Icons-Only Task Manager widgetsAssignee: Eike Hein <hein>
Status: RESOLVED UPSTREAM    
Severity: normal CC: josh.slark, kde, nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.3.1   
Target Milestone: 1.0   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Firefox icon stuck to cursor after click
Video of icon stuck to cursor

Description Greg Lepore 2015-06-15 11:51:41 UTC
Every once in a while when I click on a program in the task manager I end up with that program's icon "stuck" to my cursor (see attached image.) The icon's movement is restricted to the task manager area, even when the cursor moves out of that area. Clicking again on the application removes the icon.

It seems a single mouse click is being interpreted as something else, although I haven't been able to reproduce the behavior deliberately. I've tried debugging with xev but I don't know enough about that program to know what I'm doing.

The mouse is a Logitech M-SBF96 and has caused some issues before, but nothing like this. Any ideas to troubleshoot would be appreciated.

Reproducible: Sometimes

Steps to Reproduce:
1. Click on program name in task manager many times
2. Sometimes the icon for that program (with a black background) gets stuck to the cursor
3. Click on program to remove icon from cursor

Actual Results:  
Icon occasionally gets stuck to cursor.

Expected Results:  
Icons should stay put.
Comment 1 Greg Lepore 2015-06-15 11:52:33 UTC
Created attachment 93183 [details]
Firefox icon stuck to cursor after click

Here's a screenshot of the Firefox icon stuck to my cursor, the problem also occurs with KDE apps (i.e. Kate.)
Comment 2 Greg Lepore 2015-06-15 12:07:46 UTC
The problem also occurs on a different mouse (although still a Logitech, the M-UAE96.) Both mice occasionally have a problem with a cursor wiggling back and forth rapidly when at rest. Below is the output from xev when the problem occurs:

Clicking on Firefox program in Task Manager gets icon attached to cursor

EnterNotify event, serial 19, synthetic NO, window 0x2400016,
    root 0x263, subw 0x0, time 93548994, (987,35), root:(987,1066),
    mode NotifyUngrab, detail NotifyAncestor, same_screen YES,
    focus NO, state 272

KeymapNotify event, serial 19, synthetic NO, window 0x0,
    keys:  99  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

PropertyNotify event, serial 19, synthetic NO, window 0x2400016,
    atom 0x159 (_NET_WM_USER_TIME), time 93548994, state PropertyNewValue

FocusIn event, serial 19, synthetic NO, window 0x2400016,
    mode NotifyNormal, detail NotifyPointer

KeymapNotify event, serial 19, synthetic NO, window 0x0,
    keys:  99  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

MotionNotify event, serial 19, synthetic NO, window 0x2400016,
    root 0x263, subw 0x0, time 93549093, (983,31), root:(983,1062),
    state 0x10, is_hint 0, same_screen YES

FocusOut event, serial 19, synthetic NO, window 0x2400016,
    mode NotifyNormal, detail NotifyPointer

MotionNotify event, serial 19, synthetic NO, window 0x2400016,
    root 0x263, subw 0x0, time 93549103, (982,28), root:(982,1059),
    state 0x10, is_hint 0, same_screen YES

MotionNotify event, serial 19, synthetic NO, window 0x2400016,
    root 0x263, subw 0x0, time 93549113, (982,24), root:(982,1055),
    state 0x10, is_hint 0, same_screen YES

MotionNotify event, serial 19, synthetic NO, window 0x2400016,
    root 0x263, subw 0x0, time 93549123, (981,20), root:(981,1051),
    state 0x10, is_hint 0, same_screen YES

MotionNotify event, serial 19, synthetic NO, window 0x2400016,
    root 0x263, subw 0x0, time 93549133, (981,10), root:(981,1041),
    state 0x10, is_hint 0, same_screen YES

LeaveNotify event, serial 19, synthetic NO, window 0x2400016,
    root 0x263, subw 0x0, time 93549129, (981,-2), root:(981,1029),
    mode NotifyNormal, detail NotifyNonlinear, same_screen YES,
    focus NO, state 16

after clicking back on Firefox icon - icon is removed from cursor

EnterNotify event, serial 19, synthetic NO, window 0x2400016,
    root 0x263, subw 0x0, time 93578817, (991,41), root:(991,1072),
    mode NotifyUngrab, detail NotifyAncestor, same_screen YES,
    focus NO, state 272

KeymapNotify event, serial 19, synthetic NO, window 0x0,
    keys:  99  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

PropertyNotify event, serial 19, synthetic NO, window 0x2400016,
    atom 0x159 (_NET_WM_USER_TIME), time 93578818, state PropertyNewValue
Comment 3 Eike Hein 2015-06-15 12:20:31 UTC
I've seen that as well, and it's related to recent code changes.
Comment 4 Greg Lepore 2015-08-27 13:59:26 UTC
Created attachment 94249 [details]
Video of icon stuck to cursor
Comment 5 Greg Lepore 2015-08-27 13:59:35 UTC
Attaching screen recording of problem occurring. When I close the application that has the icon stuck to the cursor, I am unable to move the icon out of the task manager area.
Comment 6 Eike Hein 2015-09-01 11:19:28 UTC
Does this still happen for you with 5.4.0? I rewrote some of the code and haven't seen it since.
Comment 7 Greg Lepore 2015-09-01 11:21:58 UTC
5.4.0 of QT or Plasma? The problem is still happening with Plasma 5.3.2 and QT 5.4.1.

Not sure how to easily get Plasma 5.4 on my system (Kubuntu with backports and CI ppas enabled.)

Thanks for working on this!
Comment 8 Eike Hein 2015-09-01 11:48:43 UTC
Yep, meant Plasma 5.4.0!
Comment 9 Greg Lepore 2015-09-03 16:41:24 UTC
Just upgraded to Kubuntu Wily Beta 1, with plasma 5.4.0 and QT 5.4.2 and the problem appears to be fixed.
Comment 10 David Edmundson 2015-09-03 16:41:50 UTC
Hurray, thanks for reporting back
Comment 11 Greg Lepore 2015-09-03 17:32:32 UTC
Dang it, changing to Reopened since the problem just occurred again.
Comment 12 Joshua 2016-11-25 03:01:34 UTC
I have been having this problem as well on my laptop and desktop, but it is much more prevalent on the laptop when using the trackpad. It seems that clicks are  sometimes indistinguishable from a drag n' drop to create a launcher shortcut. Sometimes this problem manifests as an ignored click, such that I click on a task multiple times before it changes focus. I believe that this happens because it initiates a drag n' drop and immediately cancels it, but the cancellation takes longer than it should, freezing the panel momentarily. 

Since this is a somewhat isolated issue, I think maybe the easiest solution for this is to create a new option in the task manager settings to disable the drag n' drop feature that creates a launcher icon. 

Another possible solution may be to increase the drag start distance, but I'm not convinced yet that this is exactly what is going on.
Comment 13 Nate Graham 2019-11-16 23:32:24 UTC
Is anyone able to reproduce this in Plasma 5.17?
Comment 14 Greg Lepore 2019-11-18 12:20:05 UTC
Original submitter here - the problem is still occuring in 5.17. It's not just related to the icons in the task manager, it also occurs on buttons on webpages, I end up with a url attached to the cursor. It's a very random and rare issue, perhaps once per day or every couple of days with continued computer use.
Comment 15 Nate Graham 2019-11-18 14:56:48 UTC
(In reply to Greg Lepore from comment #14)
> Original submitter here - the problem is still occuring in 5.17. It's not
> just related to the icons in the task manager, it also occurs on buttons on
> webpages, I end up with a url attached to the cursor. It's a very random and
> rare issue, perhaps once per day or every couple of days with continued
> computer use.
Sounds like it's more related to your input drivers than Plasma if it happens with other things too. I would recommend reporting it upstream to the Libinput project: https://gitlab.freedesktop.org/libinput/libinput/issues