vcl/unx/gtk3/gtk3gtkframe.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit 98edfb02b2a755d9758bfac2374c0bc8dcebc504 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Jan 19 12:18:11 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Jan 19 15:24:27 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/+/109630 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index fdbe68cbc8a7..bbbdf736fe92 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -2010,10 +2010,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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits