New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One click should not be able to trigger two GUI items in VM Manager #1911

Closed
gutsle opened this Issue Apr 15, 2016 · 16 comments

Comments

@gutsle

gutsle commented Apr 15, 2016

Qubes OS version (e.g., R3.1):

Qubes release 3.1 (R3.1)

Affected TemplateVMs (e.g., fedora-23, if applicable):

VM Manager

Expected behavior:

Right-clicking on a VM and then releasing should only open the context menu.

Actual behavior:

The context menu opens on mouse-down and mouse-up activates menu items in case any are under the mouse.

Steps to reproduce the behavior:

see above

General notes:

I understand that sometimes activation on mouse-up and sometimes on mouse-down is common. The mixture seems weird however.
Since right-click + short hold seems to trigger an menu-close on mouse-up this looks like an artifact of trying to serve mixed use cases.

I think the intended behavior might have been:

  1. user clicks and holds -> he can trigger menu items by mouse-up on them or just close the menu by mouse-up outside of it
  2. user clicks and releases immediately -> menu stays open allows left clicking on menu items to trigger them

The way it stands I can click and release immediately and if I do this while moving the mouse slightly to the right I will end up with the VM settings open instead of the menu.

I am using xfce. Maybe this is only an xfce problem.

Related issues:

Relevant labels:

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Apr 27, 2016

Member

I am using xfce. Maybe this is only an xfce problem.

I can reproduce this in KDE.

Member

andrewdavidwong commented Apr 27, 2016

I am using xfce. Maybe this is only an xfce problem.

I can reproduce this in KDE.

@andrewdavidwong andrewdavidwong added this to the Release 3.1 milestone Apr 27, 2016

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong May 2, 2016

Member

Actually, I've noticed that this behavior is not specific to Qubes Manager. In KDE, for example, try right clicking on the title bar of any window, then hovering your cursor through the menu options to move that window to a different virtual desktop, then release the the right mouse button. The window will move to the other virtual desktop, even though you've only clicked (and held) once.

Member

andrewdavidwong commented May 2, 2016

Actually, I've noticed that this behavior is not specific to Qubes Manager. In KDE, for example, try right clicking on the title bar of any window, then hovering your cursor through the menu options to move that window to a different virtual desktop, then release the the right mouse button. The window will move to the other virtual desktop, even though you've only clicked (and held) once.

@gutsle

This comment has been minimized.

Show comment
Hide comment
@gutsle

gutsle May 3, 2016

Just to clarify, there are timings involved. Doing this in general might make sense it only becomes a problem if a normal click (clicking and releasing immediately without holding) is interpreted as click-hold-release and causes two clicks.

gutsle commented May 3, 2016

Just to clarify, there are timings involved. Doing this in general might make sense it only becomes a problem if a normal click (clicking and releasing immediately without holding) is interpreted as click-hold-release and causes two clicks.

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong May 4, 2016

Member

Can you confirm that the double-right-click timing is faster in Qubes Manager than elsewhere in dom0? If it's the same speed everywhere, then perhaps adjusting your system-wide double-click-timing setting is the solution here?

Member

andrewdavidwong commented May 4, 2016

Can you confirm that the double-right-click timing is faster in Qubes Manager than elsewhere in dom0? If it's the same speed everywhere, then perhaps adjusting your system-wide double-click-timing setting is the solution here?

@unman

This comment has been minimized.

Show comment
Hide comment
@unman

unman Jan 12, 2017

Member

@andrewdavidwong
Will you close this? I see no advantage in keeping it open, since (as you pointed out) the behaviour is not Qubes specific, and can be ameliorated by changing the mouse timing settings.
What would another resolution look like?

Member

unman commented Jan 12, 2017

@andrewdavidwong
Will you close this? I see no advantage in keeping it open, since (as you pointed out) the behaviour is not Qubes specific, and can be ameliorated by changing the mouse timing settings.
What would another resolution look like?

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Jan 12, 2017

Member

@unman: I think that either this issue or a related one should remain open on UX grounds. I've actually been thinking about this issue a lot lately because I've noticed that things frequently happen in Qubes Manager (and only in Qubes Manager) that I do not intend as a result of this issue (or perhaps related ones). For example, I very often find myself opening the Firewall settings tab of a VM when I intended only to open the right-click context menu for that VM. Sometimes, I even find that a VM is set to be autostarted, for example, when I never consciously enabled that setting, probably as the result of a stray click when trying to do something else. I do not experience such a high mousing/click error rate with other GUI programs I frequently use (file managers, web browsers, etc.). In general, this makes Qubes Manager feel particularly fragile and error-prone.

A few thoughts:

  • I don't think changing mouse timing settings is the answer. Accidentally opening the Firewall settings tab, for example, occurs with only a single right-click if there's even the slightest mouse movement to the right while right-clicking. (Besides, I've become accustomed to this approximate double-click speed after decades of use across OSes, and I'd be unwilling to change it in order to accommodate the quirkiness of a single program. I suspect the same holds for most users.)

  • It could be that there's something unorthodox with the way Qubes Manager is designed. (Maybe the context menu doesn't have enough pixel padding and opens up too close to the cursor, for example.)

  • These issues might be (partially) resolved with the decomposition of Qubes Manager in 4.0 (#2132), so if you think the UX suggestions should go on that issue, that's fine with me.

Member

andrewdavidwong commented Jan 12, 2017

@unman: I think that either this issue or a related one should remain open on UX grounds. I've actually been thinking about this issue a lot lately because I've noticed that things frequently happen in Qubes Manager (and only in Qubes Manager) that I do not intend as a result of this issue (or perhaps related ones). For example, I very often find myself opening the Firewall settings tab of a VM when I intended only to open the right-click context menu for that VM. Sometimes, I even find that a VM is set to be autostarted, for example, when I never consciously enabled that setting, probably as the result of a stray click when trying to do something else. I do not experience such a high mousing/click error rate with other GUI programs I frequently use (file managers, web browsers, etc.). In general, this makes Qubes Manager feel particularly fragile and error-prone.

A few thoughts:

  • I don't think changing mouse timing settings is the answer. Accidentally opening the Firewall settings tab, for example, occurs with only a single right-click if there's even the slightest mouse movement to the right while right-clicking. (Besides, I've become accustomed to this approximate double-click speed after decades of use across OSes, and I'd be unwilling to change it in order to accommodate the quirkiness of a single program. I suspect the same holds for most users.)

  • It could be that there's something unorthodox with the way Qubes Manager is designed. (Maybe the context menu doesn't have enough pixel padding and opens up too close to the cursor, for example.)

  • These issues might be (partially) resolved with the decomposition of Qubes Manager in 4.0 (#2132), so if you think the UX suggestions should go on that issue, that's fine with me.

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Jan 12, 2017

Member

I don't think changing mouse timing settings is the answer. Accidentally opening the Firewall settings tab, for example, occurs with only a single right-click if there's even the slightest mouse movement to the right while right-clicking.

On second thought, maybe this could be the answer. If "single right-click while ever-so-slightly moving the mouse" is being interpreted as "two right-clicks" (maybe this is what @gutsle meant above), then this could be (at least part of) the problem.

However, a cursory examination (no pun intended) of Xfce's "Mouse and Touchpad" settings panel doesn't immediately reveal any way to control this particular timing.

Member

andrewdavidwong commented Jan 12, 2017

I don't think changing mouse timing settings is the answer. Accidentally opening the Firewall settings tab, for example, occurs with only a single right-click if there's even the slightest mouse movement to the right while right-clicking.

On second thought, maybe this could be the answer. If "single right-click while ever-so-slightly moving the mouse" is being interpreted as "two right-clicks" (maybe this is what @gutsle meant above), then this could be (at least part of) the problem.

However, a cursory examination (no pun intended) of Xfce's "Mouse and Touchpad" settings panel doesn't immediately reveal any way to control this particular timing.

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Jan 12, 2017

Member
Member

adrelanos commented Jan 12, 2017

@unman

This comment has been minimized.

Show comment
Hide comment
@unman

unman Jan 13, 2017

Member

I 'm not aware that this has ever happened to me, although I don't use the manager all that much.
Perhaps I have superior mousing skills? ;-)

I'm looking at the code now - is it an issue that could be fixed by offsetting the menu somewhat to make it less likely that folk will hit this?
It seems to me that the crucial part from the original report is this:

I can click and release immediately and if I do this while moving the mouse slightly to the right

Member

unman commented Jan 13, 2017

I 'm not aware that this has ever happened to me, although I don't use the manager all that much.
Perhaps I have superior mousing skills? ;-)

I'm looking at the code now - is it an issue that could be fixed by offsetting the menu somewhat to make it less likely that folk will hit this?
It seems to me that the crucial part from the original report is this:

I can click and release immediately and if I do this while moving the mouse slightly to the right

@unman

This comment has been minimized.

Show comment
Hide comment
@unman

unman Jan 13, 2017

Member

@andrewdavidwong @adrelanos
Can you try this?

Copy /usr/lib64/python2.7/site-packages/qubesmanager to a safe place.
cd /usr/lib64/python2.7/site-packages/qubesmanager
rm main.pyc
rm main.pyo
Edit main:py - find the line that says: self.context_menu.exec_(self.table.mapToGlobal(point))
(line 1723 in my copy)
and change point to point+QPoint(10,0)
So the final line is self.context_menu.exec_(self.table.mapToGlobal(point+QPoint(10,0)))

This will offset the menu 10 pts from the click point, which seems about right to me.
See if that resolves your issue, or try a larger offset

You'll need to kill the existing qubes-manager instance before you see the difference, obviously.

Member

unman commented Jan 13, 2017

@andrewdavidwong @adrelanos
Can you try this?

Copy /usr/lib64/python2.7/site-packages/qubesmanager to a safe place.
cd /usr/lib64/python2.7/site-packages/qubesmanager
rm main.pyc
rm main.pyo
Edit main:py - find the line that says: self.context_menu.exec_(self.table.mapToGlobal(point))
(line 1723 in my copy)
and change point to point+QPoint(10,0)
So the final line is self.context_menu.exec_(self.table.mapToGlobal(point+QPoint(10,0)))

This will offset the menu 10 pts from the click point, which seems about right to me.
See if that resolves your issue, or try a larger offset

You'll need to kill the existing qubes-manager instance before you see the difference, obviously.

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Jan 13, 2017

Member

Perhaps I have superior mousing skills? ;-)

Quite likely. 😄

Can you try this? [...]

Thanks! I'll try this for a while and monitor my error rate.

Member

andrewdavidwong commented Jan 13, 2017

Perhaps I have superior mousing skills? ;-)

Quite likely. 😄

Can you try this? [...]

Thanks! I'll try this for a while and monitor my error rate.

@andrewdavidwong andrewdavidwong added bug and removed enhancement labels Jan 14, 2017

@unman

This comment has been minimized.

Show comment
Hide comment
@unman

unman Apr 3, 2017

Member

@andrewdavidwong Did you try this Andrew? Did you find it resolved the issue?

Member

unman commented Apr 3, 2017

@andrewdavidwong Did you try this Andrew? Did you find it resolved the issue?

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Apr 3, 2017

Member

@unman: Yes, it's been working great! Thanks!

Member

andrewdavidwong commented Apr 3, 2017

@unman: Yes, it's been working great! Thanks!

@unman

This comment has been minimized.

Show comment
Hide comment
@unman

unman Apr 3, 2017

Member

@andrewdavidwong Thanks - I'll put in a PR to incorporate this.

Member

unman commented Apr 3, 2017

@andrewdavidwong Thanks - I'll put in a PR to incorporate this.

@RefinedSoftwareLLC

This comment has been minimized.

Show comment
Hide comment
@RefinedSoftwareLLC

RefinedSoftwareLLC Jun 15, 2018

What I believe to be the best solution to this problem is, when a mouse click opens any menu (right clicking context menu or left clicking alt-space menu), if the mouse is released within so many milliseconds (200ms?) of the menu opening, then the menu should stay displayed (even though no mouse button is being held) without selecting the menu item under the mouse. This may require an upstream change for both xfce & KDE. See #4003 for longer explanation.

RefinedSoftwareLLC commented Jun 15, 2018

What I believe to be the best solution to this problem is, when a mouse click opens any menu (right clicking context menu or left clicking alt-space menu), if the mouse is released within so many milliseconds (200ms?) of the menu opening, then the menu should stay displayed (even though no mouse button is being held) without selecting the menu item under the mouse. This may require an upstream change for both xfce & KDE. See #4003 for longer explanation.

marmarta added a commit to marmarta/qubes-manager that referenced this issue Jul 12, 2018

Offset context menu in Manager to avoid accidental clicks
Small fix to Qubes Manager to open the context menu slightly to the
right of the mouse to avoid accidental clicks. Originally created by
@unman , ported to 3.2 branch.

references QubesOS/qubes-issues#1911
@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Jul 18, 2018

Automated announcement from builder-github

The package qubes-manager-4.0.19-1.fc25 has been pushed to the r4.0 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

Automated announcement from builder-github

The package qubes-manager-4.0.19-1.fc25 has been pushed to the r4.0 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

@qubesos-bot qubesos-bot referenced this issue in QubesOS/updates-status Jul 18, 2018

Open

manager v4.0.19 (r4.0) #600

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment