From 5bdca303b18ba15391f11a955a2007cd79ab5159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20Marczykowska-G=C3=B3recka?= Date: Thu, 12 Jul 2018 21:47:01 +0200 Subject: [PATCH] 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 4.0 and including changes to context menu from pull request#100. fixes QubesOS/qubes-issues#1911 --- qubesmanager/qube_manager.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index 76ab0e7..1956644 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -1254,9 +1254,11 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow): self.logs_menu.setEnabled(not menu_empty) if vm.qid == 0: - self.dom0_context_menu.exec_(self.table.mapToGlobal(point)) + self.dom0_context_menu.exec_(self.table.mapToGlobal( + point + QtCore.QPoint(10, 0))) else: - self.context_menu.exec_(self.table.mapToGlobal(point)) + self.context_menu.exec_(self.table.mapToGlobal( + point + QtCore.QPoint(10, 0))) except exc.QubesPropertyAccessError: pass