Hi, On 5 December 2016 at 03:36, Dima Ryazanov <d...@gmail.com> wrote: > (This is kind of a workaround, but perhaps the right thing to do anyways.) > > The menu implementation in window.c needs to know the time of the event that > triggered the menu - however, the xdg-shell's show_window_menu API does not > give us that info. There doesn't seem to be an easy way to fake it because > different compositors use different times when sending events: > - compositor-drm uses the monotonic clock > - compositor-x11 uses weston_compositor_get_time > - compositor-wayland uses the event times in got from the parent compositor > - GNOME appears to use the monotonic clock > > Switching weston_compositor_get_time to use the monotonic clock works around > this issue - though things would break in compositor-wayland if its parent > uses something else. > > Signed-off-by: Dima Ryazanov <d...@gmail.com>
I think we may want a check that CLOCK_MONOTONIC actually works (i.e. the first time this function is called, assert that ret == 0). But yes, it's definitely the right thing to do, so with that: Reviewed-by: Daniel Stone <dani...@collabora.com> Cheers, Daniel _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel