Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #12066 from Pokechu22/main-window-right-click-menu
Disable right-click menu on main window
  • Loading branch information
JMC47 committed Aug 13, 2023
2 parents 14a6076 + 1f8f384 commit 0495a6a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Source/Core/DolphinQt/MainWindow.cpp
Expand Up @@ -1657,6 +1657,13 @@ bool MainWindow::eventFilter(QObject* object, QEvent* event)
return false;
}

QMenu* MainWindow::createPopupMenu()
{
// Disable the default popup menu as it exposes the debugger UI even when the debugger UI is
// disabled, which can lead to user confusion (see e.g. https://bugs.dolphin-emu.org/issues/13306)
return nullptr;
}

void MainWindow::dragEnterEvent(QDragEnterEvent* event)
{
if (event->mimeData()->hasUrls() && event->mimeData()->urls().size() == 1)
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/DolphinQt/MainWindow.h
Expand Up @@ -13,6 +13,7 @@

#include "Core/Boot/Boot.h"

class QMenu;
class QStackedWidget;
class QString;

Expand Down Expand Up @@ -80,6 +81,7 @@ class MainWindow final : public QMainWindow
WindowSystemInfo GetWindowSystemInfo() const;

bool eventFilter(QObject* object, QEvent* event) override;
QMenu* createPopupMenu() override;

signals:
void ReadOnlyModeChanged(bool read_only);
Expand Down

0 comments on commit 0495a6a

Please sign in to comment.