summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk3
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-06-27 11:12:20 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-06-27 11:14:34 +0100
commitf7c888994db744396c69aa1be720c2089ada5798 (patch)
tree1bf79f4c603bd37420451cfa64994be8212ca9e9 /vcl/unx/gtk3
parent3dbc0bf907fb2872238746776532f2e2602bfbfd (diff)
Resolves: rhbz#1342823 toolbar menus popdown immediately
Change-Id: I9cecf50fb85d84e108ccc23d22bf97d2ac510a9b
Diffstat (limited to 'vcl/unx/gtk3')
-rw-r--r--vcl/unx/gtk3/gtk3gtkframe.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index c6e1d5fadd37..47e41dc39588 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -2013,6 +2013,11 @@ void GtkSalFrame::SetAlwaysOnTop( bool bOnTop )
static guint32 nLastUserInputTime = GDK_CURRENT_TIME;
+guint32 GtkSalFrame::GetLastInputEventTime()
+{
+ return nLastUserInputTime;
+}
+
static void UpdateLastInputEventTime(guint32 nUserInputTime)
{
nLastUserInputTime = nUserInputTime;
@@ -2027,9 +2032,9 @@ void GtkSalFrame::ToTop( SalFrameToTop nFlags )
else if( IS_WIDGET_MAPPED( m_pWindow ) )
{
if (!(nFlags & SalFrameToTop::GrabFocusOnly))
- gtk_window_present_with_time(GTK_WINDOW(m_pWindow), nLastUserInputTime);
+ gtk_window_present_with_time(GTK_WINDOW(m_pWindow), GetLastInputEventTime());
else
- gdk_window_focus(widget_get_window(m_pWindow), nLastUserInputTime);
+ gdk_window_focus(widget_get_window(m_pWindow), GetLastInputEventTime());
}
else
{