Mouse stuck in 'dragging' mode
I have a new XPS 13 9670 with Ubuntu 18.04.
A bunch of applications often (but not always) think I'm dragging. For example, when using GNote and my house hovers over my list of notes, it will attempt to drag it.
I have this with a number of applications. The Telegram desktop application too, but oddly enough not every application. Could this be a hardware problem, or is it something I can fix in software?
I had the same issue in multiple applications including Okular, Eagle etc. I accidentally discovered that it might be related to the touchscreen. While in the 'dragging mode' in Okular, I could get out by simply tapping on the touchscreen once. I then experimented by explicitly touching the screen (and not taking my finger off) and immediately, the pointer started dragging. I suspect one possible cause for the behavior is spurious touch detects without the corresponding release being detected.
I had the same issue on an inspiron 2-in-1: after using my pen, it kept dragging on click until rebooting. I'd also been looking at other desktop environments/window managers and switching to Awesome WM solved the problem. So for me it seems to be something specific to Gnome.
Edit: Actually, it recurred again. However, restarting the device did work. So now I have in my bashrc an alias like this:
alias penfix="xinput disable 'pointer:ELAN2097:00 04F3:274E' && xinput enable 'pointer:ELAN2097:00 04F3:274E'"
Of course, if you want to do this, replace the name with whatever your device is called. Then I just run penfix when it gets messed up and it fixes it.