<html>
    <head>
      <base href="https://bugzilla.gnome.org/" />
    </head>
    <body><span class="vcard"><a href="page.cgi?id=describeuser.html&login=bugzilla%40hadess.net" title="Bastien Nocera <bugzilla@hadess.net>"> <span class="fn">Bastien Nocera</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Wayland] gtk_window_present() not working"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=766284">bug 766284</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>bugzilla@hadess.net
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Wayland] gtk_window_present() not working"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=766284#c47">Comment # 47</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [Wayland] gtk_window_present() not working"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=766284">bug 766284</a>
              from <span class="vcard"><a href="page.cgi?id=describeuser.html&login=bugzilla%40hadess.net" title="Bastien Nocera <bugzilla@hadess.net>"> <span class="fn">Bastien Nocera</span></a>
</span></b>
        <pre>(In reply to Matthias Clasen from <a href="show_bug.cgi?id=766284#c14">comment #14</a>)
<span class="quote">> 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</span >

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?</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>