From d5a96997942a4d2040db848be6b22eae78675057 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Mon, 3 Jul 2023 16:28:38 +0200 Subject: [PATCH] Fix inset context menu offset with keyboard (#12811) --- src/frontends/qt/GuiWorkArea.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/frontends/qt/GuiWorkArea.cpp b/src/frontends/qt/GuiWorkArea.cpp index 87181f95e9..7433c28485 100644 --- a/src/frontends/qt/GuiWorkArea.cpp +++ b/src/frontends/qt/GuiWorkArea.cpp @@ -652,6 +652,10 @@ void GuiWorkArea::contextMenuEvent(QContextMenuEvent * e) ++pos.rx(); } } + if (e->reason() == QContextMenuEvent::Keyboard) + // Subtract the top margin + pos.setY(pos.y() - d->buffer_view_->topMargin()); + name = d->buffer_view_->contextMenu(pos.x(), pos.y()); } -- 2.39.5