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

Disable right-click menu on main window #12066

Merged
merged 1 commit into from Aug 13, 2023

Conversation

Pokechu22
Copy link
Contributor

Before, right-clicking on the toolbar would allow toggling all dock widgets, including the debugger ones even when they are disabled. (See https://doc.qt.io/qt-5/qmainwindow.html#createPopupMenu for this behavior, and https://bugs.dolphin-emu.org/issues/13306 for an example of where it caused issues.)

@Dentomologist
Copy link
Contributor

Do we want to disable the menu instead of having it update its contents when the debug UI is toggled?

@Pokechu22
Copy link
Contributor Author

Theoretically we could do that, but I feel like it would be a bit difficult - it'd require reimplementing Qt's logic for creating the menu at least (or hardcoding a list of relevant menu items, which seems like a bad idea)

Copy link
Contributor

@Dentomologist Dentomologist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's more annoying to deal with than I was expecting.

Since users can do the same customization with the View menu I agree it wouldn't be worth the effort to fix the context menu.

@JosJuice
Copy link
Member

Could you put a comment in the code about the reason why we're doing this? LGTM other than that.

Before, right-clicking on the toolbar would allow toggling all dock widgets, including the debugger ones even when they are disabled. (See https://doc.qt.io/qt-5/qmainwindow.html#createPopupMenu for this behavior, and https://bugs.dolphin-emu.org/issues/13306 for an example of where it caused issues.)
@JMC47
Copy link
Contributor

JMC47 commented Aug 13, 2023

Comment appears to be in the code, and the code looks more or less fine.

@JMC47 JMC47 merged commit 0495a6a into dolphin-emu:master Aug 13, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants