From 4ff8481b83d59cc0c2278c98ed426336248a0532 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 5 Oct 2020 21:32:52 +0530 Subject: [PATCH] Viewer: Fix incorrect positioning of context menu for viewer toolbar. Fixes #1898577 [Right-clicking on toolbar - menu appears in corner of desktop](https://bugs.launchpad.net/calibre/+bug/1898577) --- src/calibre/gui2/viewer/toolbars.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/viewer/toolbars.py b/src/calibre/gui2/viewer/toolbars.py index d82c138e66..806cbb959f 100644 --- a/src/calibre/gui2/viewer/toolbars.py +++ b/src/calibre/gui2/viewer/toolbars.py @@ -120,7 +120,7 @@ class ActionsToolBar(ToolBar): a.triggered.connect(self.customize) a = m.addAction(_('Hide this toolbar')) a.triggered.connect(self.hide_toolbar) - m.exec_(pos) + m.exec_(self.mapToGlobal(pos)) def hide_toolbar(self): self.web_view.trigger_shortcut('toggle_toolbar')