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

Opening app menu via keyboard shortcut opens it under the cursor #9093

Open
andrewdavidwong opened this issue Apr 7, 2024 · 13 comments · May be fixed by QubesOS/qubes-desktop-linux-menu#50
Assignees
Labels
affects-4.2 This issue affects Qubes OS 4.2. C: app menu The primary user-facing GUI application menu in Qubes OS diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. pr submitted A pull request has been submitted for this issue. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. ux User experience

Comments

@andrewdavidwong
Copy link
Member

How to file a helpful issue

Qubes OS release

4.2

Brief summary

Opening app menu via keyboard shortcut opens it under the cursor instead of the normal location.

Steps to reproduce

Assign app menu to a keyboard shortcut. Press that keyboard shortcut.

Expected behavior

App menu opens in same location as if you had clicked the button to open it.

Actual behavior

App menu opens under cursor, e.g., in the middle of the screen, unattached from panel.

@andrewdavidwong andrewdavidwong added T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. C: app menu The primary user-facing GUI application menu in Qubes OS affects-4.2 This issue affects Qubes OS 4.2. labels Apr 7, 2024
@UndeadDevel
Copy link

Related to #9005

@rustybird
Copy link

I thought the current behavior was intentional, isn't it convenient for mouse users?

https://github.com/QubesOS/qubes-desktop-linux-menu/blob/v1.1.5/qubes_menu/qubes-menu.glade#L8

@bi0shacker001
Copy link

I thought the current behavior was intentional, isn't it convenient for mouse users?

https://github.com/QubesOS/qubes-desktop-linux-menu/blob/v1.1.5/qubes_menu/qubes-menu.glade#L8

That behavior is one of the primary reasons I wouldn't run qubes if I were forced into xfce. Even if it's convenient for mouse users, it's a huge PITA for keyboard-shortcut users (pressing enter will select whatever is under the mouse cursor, not the first option, which breaks pseudo-autocomplete, for instance)

@andrewdavidwong andrewdavidwong added the ux User experience label Apr 12, 2024
@alimirjamali
Copy link

The current default position is set to mouse in the Glade file:

https://github.com/QubesOS/qubes-desktop-linux-menu/blob/main/qubes_menu/qubes-menu.glade#L8

A new command line option could be added to set the position (e.g. --position POSITION). Default could be mouse to keep the existing behaviour. User could set the position to top-left, center, ...

@alimirjamali
Copy link

Another approach could be depending on a feature to set the menu position. Just like how app_page feature is currently used to set the default Tab/Page.

Both approaches are easy to implement.

@marmarta Is it OK to add a command line option or feature to allow users to set the Appmenu position? (rather than at mouse position). I can work on it.

@marmarta
Copy link
Member

I think a feature is the best approach - it can be changed while the menu is running, for example.

@andrewdavidwong andrewdavidwong added diagnosed Technical diagnosis has been performed (see issue comments). and removed needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. labels Sep 13, 2024
@alimirjamali
Copy link

Choices of icons and text for Qubes Menu Settings:

menu_position1

menu_position2

alimirjamali added a commit to alimirjamali/qubes-desktop-linux-menu that referenced this issue Sep 13, 2024
@alimirjamali
Copy link

PR Submitted

Review priority: Low

I will work on the relevant unittests if the change is good.

@alimirjamali
Copy link

alimirjamali commented Sep 13, 2024

This needs a final touch. Currently assigning qubes-app-menu to Super/Start key will open the Appmenu. But pressing it again does not hide it (it closes it and reopens it).

p.s.: I believe I have a clear idea on this bug. It happens since program loses focus on 2nd Hotkey press and _focus_out is executed before do_activate. It is necessary to find a workaround

@andrewdavidwong andrewdavidwong added the pr submitted A pull request has been submitted for this issue. label Sep 14, 2024
@andrewdavidwong
Copy link
Member Author

Choices of icons and text for Qubes Menu Settings:

menu_position1

menu_position2

What do "left," "right," and "center" mean? My expectation of "normal" behavior would be for the app menu to be attached to the button on the panel that opens it.

This needs a final touch. Currently assigning qubes-app-menu to Super/Start key will open the Appmenu. But pressing it again does not hide it (it closes it and reopens it).

This sounds familiar, but I can't find an issue for it. I suggest opening a separate issue for it (unless you can find an existing one).

@alimirjamali
Copy link

alimirjamali commented Sep 14, 2024

What do "left," "right," and "center" mean? My expectation of "normal" behavior would be for the app menu to be attached to the button on the panel that opens it.

Top-Left, top-right or top-center of the screen. Or under the current mouse position. Since the menu height is set to (around) screen height, there is no need to set the vertical position. I assume most users will use either left or mouse options.

Attaching the Appmenu to the exact position of the button on the panel is much harder than it sounds. It requires a real Xfce plugin (work in progress for #2136).

This sounds familiar, but I can't find an issue for it. I suggest opening a separate issue for it (unless you can find an existing one).

Yes. Exactly.

@andrewdavidwong
Copy link
Member Author

Top-Left, top-right or top-center of the screen. Or under the current mouse position.

But my panel is on the bottom of my screen, not the top.

Since the menu height is set to (around) screen height, there is no need to set the vertical position.

My menu currently takes up only about half of my screen height.

Attaching the Appmenu to the exact position of the button on the panel is much harder than it sounds. It requires a real Xfce plugin (work in progress for #2136).

Okay, fair enough.

@alimirjamali
Copy link

My menu currently takes up only about half of my screen height.

Oh. I see. Now that I look again at code, the 0.9x resize only downsizes the menu, not expand it.

So the positions could be Top-Left, Top-Right, Bottom-Left, Bottom-right and mouse position. Now that I reconsider it, adding option for centring menu vertically or horizontally is useless. Hope everyone agrees with it.

alimirjamali added a commit to alimirjamali/qubes-desktop-linux-menu that referenced this issue Sep 15, 2024
fixes: QubesOS/qubes-issues#9093

Icons from Eva Icons under MIT license
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.2 This issue affects Qubes OS 4.2. C: app menu The primary user-facing GUI application menu in Qubes OS diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. pr submitted A pull request has been submitted for this issue. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. ux User experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants