diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-12-08 16:33:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-12-09 09:32:27 +0100 |
commit | 27487243c3ee31927e17a0859614ffa0df7881d7 (patch) | |
tree | 3a2e86d76556e76887e5f7419c3baeac507e58a7 /vcl/unx/gtk3 | |
parent | 85bc09d05f4824929d5b1381343c3ca75e7f6006 (diff) |
Related: tdf#145786 cooperate between our own grabs
Change-Id: I97a1868c3f086b7f414d18d0fb4daa1c6d09846f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126558
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx/gtk3')
-rw-r--r-- | vcl/unx/gtk3/gtkinst.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 6f4c47815744..1e227e87e1b5 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -9933,7 +9933,13 @@ void MoveWindowContentsToPopover(GtkWindow* pMenuHack, GtkWidget* pPopover, GtkW pFrame->UnblockTooltip(); if (bHadFocus) + { + GdkSurface* pParentSurface = pParent ? widget_get_surface(pParent) : nullptr; + void* pParentIsPopover = pParentSurface ? g_object_get_data(G_OBJECT(pParentSurface), "g-lo-InstancePopup") : nullptr; + if (pParentIsPopover) + do_grab(pAnchor); gtk_widget_grab_focus(pAnchor); + } } #endif |