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
Šī revīzija ir iekļauta:
Marta Marczykowska-Górecka 2018-07-12 21:47:01 +02:00
vecāks 2f2217060e
revīzija 5bdca303b1
Šim parakstam datu bāzē netika atrasta zināma atslēga
GPG atslēgas ID: 9A752C30B26FD04B

Parādīt failu

@ -1254,9 +1254,11 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow):
self.logs_menu.setEnabled(not menu_empty) self.logs_menu.setEnabled(not menu_empty)
if vm.qid == 0: 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: else:
self.context_menu.exec_(self.table.mapToGlobal(point)) self.context_menu.exec_(self.table.mapToGlobal(
point + QtCore.QPoint(10, 0)))
except exc.QubesPropertyAccessError: except exc.QubesPropertyAccessError:
pass pass