<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div>It seems to particularly refer to this part of the code:</div><div><br></div><div><a href="https://github.com/adlocode/test-libweston-desktop/blob/master/shell.c#L179">https://github.com/adlocode/test-libweston-desktop/blob/master/shell.c#L179</a></div><div><br></div><div>If I remove the calls to weston_layer_entry_remove() and/or weston_layer_entry_insert(), the problem disappears. Of course this means windows no longer raise when clicked.</div><div><br></div><div>Are there any possible solutions for this problem?</div><div><br></div><div>Regards</div><div><br></div><div>adlo</div><div><br></div><div><br>On 27 Jul 2018, at 05:44, adlo <<a href="mailto:adloconwy@gmail.com">adloconwy@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><span>Any ideas?</span><br><span></span><br><span>The rest of my code can be found at:</span><br><span><a href="https://github.com/adlocode/test-libweston-desktop">https://github.com/adlocode/test-libweston-desktop</a></span><br><span></span><br><span>Regards</span><br><span></span><br><span>adlo</span><br><span></span><br><span></span><br><span>On Tue, 2018-07-17 at 09:21 +0100, adlo wrote:</span><br><blockquote type="cite"><span>I am writing a compositor using libweston. I am attempting to</span><br></blockquote><blockquote type="cite"><span>implement raising windows on click. It mostly works, but it has</span><br></blockquote><blockquote type="cite"><span>introduced a regression where the compositor freezes when I click on</span><br></blockquote><blockquote type="cite"><span>a popup menu, such as those in gedit.</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Here is my code:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>static void click_to_activate_binding (struct weston_pointer</span><br></blockquote><blockquote type="cite"><span>*pointer,</span><br></blockquote><blockquote type="cite"><span>                                       const struct timespec *time,</span><br></blockquote><blockquote type="cite"><span>                                       uint32_t               button,</span><br></blockquote><blockquote type="cite"><span>                                       void                  *data)</span><br></blockquote><blockquote type="cite"><span>{</span><br></blockquote><blockquote type="cite"><span>  struct TestServer *server = data;</span><br></blockquote><blockquote type="cite"><span>  struct TestServerSurface *shsurf;</span><br></blockquote><blockquote type="cite"><span>  struct weston_seat *s;</span><br></blockquote><blockquote type="cite"><span>  struct weston_surface *main_surface;</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>  main_surface = weston_surface_get_main_surface (pointer->focus-</span><br></blockquote><blockquote type="cite"><blockquote type="cite"><span>surface);</span><br></blockquote></blockquote><blockquote type="cite"><span>  shsurf = weston_desktop_surface_get_user_data</span><br></blockquote><blockquote type="cite"><span>(weston_surface_get_desktop_surface</span><br></blockquote><blockquote type="cite"><span>                                                (main_surface));</span><br></blockquote><blockquote type="cite"><span>  struct weston_surface *surface = weston_desktop_surface_get_surface</span><br></blockquote><blockquote type="cite"><span>(shsurf->desktop_surface);</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>  wl_list_for_each (s, &server->compositor->seat_list, link)</span><br></blockquote><blockquote type="cite"><span>    {</span><br></blockquote><blockquote type="cite"><span>      weston_view_activate (pointer->focus, s,</span><br></blockquote><blockquote type="cite"><span>                            WESTON_ACTIVATE_FLAG_CLICKED |</span><br></blockquote><blockquote type="cite"><span>                            WESTON_ACTIVATE_FLAG_CONFIGURE);</span><br></blockquote><blockquote type="cite"><span>      weston_seat_set_keyboard_focus (s, pointer->focus->surface);</span><br></blockquote><blockquote type="cite"><span>      weston_view_geometry_dirty (shsurf->view);</span><br></blockquote><blockquote type="cite"><span>      weston_layer_entry_remove (&pointer->focus->layer_link);</span><br></blockquote><blockquote type="cite"><span>      weston_layer_entry_insert (&server->surfaces_layer.view_list,</span><br></blockquote><blockquote type="cite"><span>&pointer->focus->layer_link);</span><br></blockquote><blockquote type="cite"><span>      weston_view_geometry_dirty (shsurf->view);</span><br></blockquote><blockquote type="cite"><span>      weston_surface_damage (main_surface);</span><br></blockquote><blockquote type="cite"><span>      weston_desktop_surface_propagate_layer (shsurf-</span><br></blockquote><blockquote type="cite"><blockquote type="cite"><span>desktop_surface);</span><br></blockquote></blockquote><blockquote type="cite"><span>    }</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>}</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>How can I resolve this?</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Regards</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>adlo</span><br></blockquote><span></span><br></div></blockquote></body></html>