[Wayland-bugs] [Bug 766284] [Wayland] gtk_window_present() not working
gtk+ (GNOME Bugzilla)
bugzilla at gnome.org
Fri Mar 23 23:50:19 UTC 2018
https://bugzilla.gnome.org/show_bug.cgi?id=766284
Bastien Nocera <bugzilla at hadess.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugzilla at hadess.net
--- Comment #47 from Bastien Nocera <bugzilla at hadess.net> ---
(In reply to Matthias Clasen from comment #14)
> But look at this code in gtk_window_present_with_time:
>
> /* Translate a timestamp of GDK_CURRENT_TIME appropriately */
> if (timestamp == GDK_CURRENT_TIME)
> {
> #ifdef GDK_WINDOWING_X11
> if (GDK_IS_X11_WINDOW(gdk_window))
> {
> GdkDisplay *display;
>
> display = gtk_widget_get_display (widget);
> timestamp = gdk_x11_display_get_user_time (display);
> }
> else
> #endif
> timestamp = gtk_get_current_event_time ();
> }
>
> gdk_window_focus (gdk_window, timestamp);
>
>
> I don't think GDK_CURRENT_TIME should reach gdk
I think that, under Wayland, we should be using the current time from the
system if gtk_get_current_event_time() returns 0. Either in
gdk_wayland_window_focus() (probably a bit late), or
gtk_window_present_with_time() (better, IMO).
I don't remember whether GTK+ Wayland expects monotonic time, and in which
unit, but the output of g_get_monotonic_time() should be what you're looking to
fallback to. Anyone to cook up a patch?
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20180323/a1d2136d/attachment.html>
More information about the wayland-bugs
mailing list