Skip to content
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

feat: Super + Shift + Right Click or Super + Middle Click to open window context menu #1118

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Koranir
Copy link
Contributor

@Koranir Koranir commented Jan 8, 2025

This PR fixes #909

Using either

  • Super + Shift + Right Click or
  • Super + Middle Click

opens the window context menu at the cursors location.

I avoided the Super + Right Click tap as it conflicted with window resizing, and it can be hard to keep the cursor still while clicking.

Something I'm not too sure about:

  • The grab unset at the former src/input/mod.rs:789: it doesn't seem to do anything that the ResizeGrab and MoveGrab weren't doing themselves, and kept deleting the MenuGrab - am I missing something?

@Koranir
Copy link
Contributor Author

Koranir commented Jan 8, 2025

I was missing something

@Koranir Koranir marked this pull request as draft January 8, 2025 07:41
@Koranir Koranir marked this pull request as ready for review January 8, 2025 08:03
@Drakulix
Copy link
Member

I avoided the Super + Right Click tap as it conflicted with window resizing, and it can be hard to keep the cursor still while clicking.

This could be solved by adding a little bit of tolerance before considering a move significant enough to trigger the resize behaviour. E.g. something like "more then 10 display units in any axis".

Which would still be the preferred solution to this problem.

@Koranir
Copy link
Contributor Author

Koranir commented Jan 14, 2025

This could be solved by adding a little bit of tolerance before considering a move significant enough to trigger the resize behaviour. E.g. something like "more then 10 display units in any axis".

Is there a general setting/recommended value for tolerance or is it just ad-hoc? It's a fine line to tread in my experience for these arbitrary values.

I'm fine with changing the behaviour to something that could debatably be more intuitive, but I'd prefer to stay on the side of unambiguity.

@Drakulix
Copy link
Member

Is there a general setting/recommended value for tolerance or is it just ad-hoc? It's a fine line to tread in my experience for these arbitrary values.

I don't think we have this problem in another part of cosmic-comp yet, so no. The exact value here would need to be "felt out". Just add a constant with an arbitrary value you feel that work well and we will tweak it from there.

I'm fine with changing the behaviour to something that could debatably be more intuitive, but I'd prefer to stay on the side of unambiguity.

I personally have nothing against providing an unambiguous trigger additionally, but any changes to the agreed upon solution in #909 would need to go through @pop-os/ux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature request] Super+Right Click tap to open cosmic-comp context menu
2 participants