[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - vcl/inc vcl/unx
Caolán McNamara
caolanm at redhat.com
Mon Jul 11 19:12:58 UTC 2016
vcl/inc/unx/gtk/gtkframe.hxx | 2 ++
vcl/unx/gtk/gtksalmenu.cxx | 2 +-
vcl/unx/gtk3/gtk3gtkframe.cxx | 9 +++++++--
3 files changed, 10 insertions(+), 3 deletions(-)
New commits:
commit 264a254efd60e147c4e6580f950307478f9a593f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 27 11:12:20 2016 +0100
Resolves: rhbz#1342823 toolbar menus popdown immediately
Change-Id: I9cecf50fb85d84e108ccc23d22bf97d2ac510a9b
(cherry picked from commit f7c888994db744396c69aa1be720c2089ada5798)
Reviewed-on: https://gerrit.libreoffice.org/26698
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 4677923..2b5dc55 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -538,6 +538,8 @@ public:
static void KeyCodeToGdkKey(const vcl::KeyCode& rKeyCode,
guint* pGdkKeyCode, GdkModifierType *pGdkModifiers);
+
+ static guint32 GetLastInputEventTime();
};
#define OOO_TYPE_FIXED ooo_fixed_get_type()
diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx
index 2e44f76..873ce39 100644
--- a/vcl/unx/gtk/gtksalmenu.cxx
+++ b/vcl/unx/gtk/gtksalmenu.cxx
@@ -360,7 +360,7 @@ bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const Rectangle& rRec
else
{
nButton = 0;
- nTime = gtk_get_current_event_time();
+ nTime = GtkSalFrame::GetLastInputEventTime();
}
VclPtr<vcl::Window> xParent = pWin->ImplGetWindowImpl()->mpRealParent;
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 2320356..e8d12e3 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -2018,6 +2018,11 @@ void GtkSalFrame::SetAlwaysOnTop( bool bOnTop )
static guint32 nLastUserInputTime = GDK_CURRENT_TIME;
+guint32 GtkSalFrame::GetLastInputEventTime()
+{
+ return nLastUserInputTime;
+}
+
static void UpdateLastInputEventTime(guint32 nUserInputTime)
{
nLastUserInputTime = nUserInputTime;
@@ -2032,9 +2037,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
{
More information about the Libreoffice-commits
mailing list