commit d5a96997942a4d2040db848be6b22eae78675057
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Mon Jul 3 16:28:38 2023 +0200

    Fix inset context menu offset with keyboard (#12811)
---
 src/frontends/qt/GuiWorkArea.cpp |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/frontends/qt/GuiWorkArea.cpp b/src/frontends/qt/GuiWorkArea.cpp
index 87181f9..7433c28 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());
        }
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to