summaryrefslogtreecommitdiffstats
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-07 13:26:27 +0000
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-11-09 15:54:10 +0100
commit00bb70abc909163d9288add063cd68be084d1b25 (patch)
tree0d0fda83a28ce20f8b5e89257b317f3b1c8a88fd /vcl
parentsw: ODF import: prevent shapes from inheriting paragraph default margins (diff)
downloadcore-00bb70abc909163d9288add063cd68be084d1b25.tar.gz
core-00bb70abc909163d9288add063cd68be084d1b25.zip
Resolves: rhbz#1505379 gtk3+X: open comboboxes block session
if there's none of our windows under the mouse when clicked then close the popup window. There's similar code for gtk2, but using deprecated apis, do this again but with the recommended apis Change-Id: I9d844d098d09d0109dcbbc06390562e83edda397 Reviewed-on: https://gerrit.libreoffice.org/44403 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 9ac51974ea88..cff6e2d0b577 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -2633,12 +2633,18 @@ gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer
vcl::DeletionListener aDel( pThis );
- if (pThis->isFloatGrabWindow() && pEvent->window != widget_get_window(pThis->getMouseEventWidget()))
+ if (pThis->isFloatGrabWindow())
{
- if (pEvent->type == GDK_BUTTON_PRESS)
- pThis->closePopup();
- else if (pEvent->type == GDK_BUTTON_RELEASE)
- return true;
+ //rhbz#1505379 if the window that got the event isn't our one, or there's none
+ //of our windows under the mouse then close this popup window
+ if (pEvent->window != widget_get_window(pThis->getMouseEventWidget()) ||
+ gdk_device_get_window_at_position(pEvent->device, nullptr, nullptr) == nullptr)
+ {
+ if (pEvent->type == GDK_BUTTON_PRESS)
+ pThis->closePopup();
+ else if (pEvent->type == GDK_BUTTON_RELEASE)
+ return true;
+ }
}
if (!aDel.isDeleted())