[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Jan 19 18:53:20 UTC 2021
vcl/unx/gtk3/gtk3gtkframe.cxx | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
New commits:
commit 06035cdc0e43ca53601a6f66c10b95ce4b4b26a8
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jan 19 12:18:11 2021 +0000
Commit: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Tue Jan 19 19:52:41 2021 +0100
tdf#139368 new database dialog doesn't have focus on start-center launch
the original issue all the way back of
commit 82abd23f3ee1900b7579e5a0afa23581d5836f01
tdf#93317 Modified Document Dialog misses focus on Gtk3
eventuallly solved with
commit 1092cc0c75f6d2ab649dd31b1db9f0a9f0944355
Related: tdf#100337 revert x-crossplatform ToTop...
is possibly all redundant in the contemporary situation. Try using
gdk_x11_display_get_user_time for X where the problem arises and
leave things along in the apparently working wayland case
Change-Id: Ia31b88e2760574e1d580d4bff509b06c07e5f0f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109585
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 4680acf77a67..9129204880b7 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -2011,10 +2011,16 @@ void GtkSalFrame::ToTop( SalFrameToTop nFlags )
GrabFocus();
else if( gtk_widget_get_mapped( m_pWindow ) )
{
+ auto nTimestamp = GetLastInputEventTime();
+#ifdef GDK_WINDOWING_X11
+ GdkDisplay *pDisplay = GtkSalFrame::getGdkDisplay();
+ if (DLSYM_GDK_IS_X11_DISPLAY(pDisplay))
+ nTimestamp = gdk_x11_display_get_user_time(pDisplay);
+#endif
if (!(nFlags & SalFrameToTop::GrabFocusOnly))
- gtk_window_present_with_time(GTK_WINDOW(m_pWindow), GetLastInputEventTime());
+ gtk_window_present_with_time(GTK_WINDOW(m_pWindow), nTimestamp);
else
- gdk_window_focus(gtk_widget_get_window(m_pWindow), GetLastInputEventTime());
+ gdk_window_focus(gtk_widget_get_window(m_pWindow), nTimestamp);
GrabFocus();
}
else
More information about the Libreoffice-commits
mailing list