diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-11-07 13:26:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-11-07 21:12:24 +0100 |
commit | 0ca771891bd889f55fef04aca12581b6bf917aa4 (patch) | |
tree | d251c6f33bc0cc13df37c7de16ebb0a2269bea6b /vcl | |
parent | 1ad3f06427fc6c9da106666768fdf5b16a7bfc6b (diff) |
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/44402
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkframe.cxx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 0659d0740533..d0a42ef9fe5c 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -2605,12 +2605,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()) |