Score:0

Missing first character when mouse-selecting text

ma flag

I'm using a pretty standard Ubuntu 18.04 setup, with Gnome Desktop, and I'm having difficulties to reliably select text with the mouse (sic).

I move the mouse cursor above the first character to be selected, press left button, drag the mouse until the end of the text, and release (like everyone else I guess). I expect the first character under the mouse cursor (where I start selection) to be part of the selected text. But that's not what happens: it is only selected if I've carefully placed my cursor on its left half. One pixel to far on its right half (although still on the character), and it won't be selected.

I'm pretty sure I was not getting the same behavior on my older laptop (Gnome on Ubuntu 14.04), I was never missing a character when copy/pasting text this way, whereas it is now bugging me several times a day. There is an obvious workaround which is to be careful with my mouse cursor placement (or to use more keyboard and less mouse where possible), but still, it's annoying.

Any idea what implements/controls this behavior (GTK? X11?), and if it can be tuned somehow?

FedKad avatar
cn flag
Is this application dependent? Does it happen also in LibreOffice for example?
ma flag
@FedonKadifeli: So far I've not found applications where it would not happen. I've tested: Firefox, Thunderbird, Libreoffice, Gnome Terminal, GEdit, Visual Studio Code, Eclipse.
FedKad avatar
cn flag
I would boot with live iso 18.04 first and check whether the problem is also present on a "clean" system. If "yes", then I would boot with live iso 20.04 to check there. And if still the problem persists, I would think about a hardware or user(!) related problem... (I usually do not start selecting from the middle of the left character!) Do you have the same problem with the touchpad also?
ma flag
Thanks @FedonKadifeli. Couldn't boot a live ISO (that's a locked down corporate laptop), but you gave me the idea to compare my setup with a vanilla Ubuntu VM, and there I've found what was "wrong".
Score:0
ma flag

I've tried a 18.04 VM, and things were much better, it felt easy for me to select text in Gnome Terminal without thinking.

The difference turned out to be the mouse cursor theme (can be changed in gnome-tweaks):

  • DMZ-White (from light-themes) on the VM
  • Adwaita on the laptop (the only one which was pre-installed there)

With DMZ-White, if I roughly aim in the middle of the first character to select (what I intuitively do apparently), even if it's a few pixels on the right side, it always gets selected. Sure, a bit further more on the right side and it won't, but it's okay, my eye/hand always get it right without thinking.

Whereas with Adwaita, if I do the same, I will often miss my target.

I imagine that a cursor defines what are the precise pointer coordinates, relative to its icon, and that DMZ-White puts it a few pixels more on the left side than Adwaita does. Something I was apparently very used to, without knowing.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.