[writing a compositor] Compositor freezes when popup menu clicked
adlo
adloconwy at gmail.com
Tue Jul 17 08:21:58 UTC 2018
I am writing a compositor using libweston. I am attempting to implement raising windows on click. It mostly works, but it has introduced a regression where the compositor freezes when I click on a popup menu, such as those in gedit.
Here is my code:
static void click_to_activate_binding (struct weston_pointer *pointer,
const struct timespec *time,
uint32_t button,
void *data)
{
struct TestServer *server = data;
struct TestServerSurface *shsurf;
struct weston_seat *s;
struct weston_surface *main_surface;
main_surface = weston_surface_get_main_surface (pointer->focus->surface);
shsurf = weston_desktop_surface_get_user_data (weston_surface_get_desktop_surface
(main_surface));
struct weston_surface *surface = weston_desktop_surface_get_surface (shsurf->desktop_surface);
wl_list_for_each (s, &server->compositor->seat_list, link)
{
weston_view_activate (pointer->focus, s,
WESTON_ACTIVATE_FLAG_CLICKED |
WESTON_ACTIVATE_FLAG_CONFIGURE);
weston_seat_set_keyboard_focus (s, pointer->focus->surface);
weston_view_geometry_dirty (shsurf->view);
weston_layer_entry_remove (&pointer->focus->layer_link);
weston_layer_entry_insert (&server->surfaces_layer.view_list, &pointer->focus->layer_link);
weston_view_geometry_dirty (shsurf->view);
weston_surface_damage (main_surface);
weston_desktop_surface_propagate_layer (shsurf->desktop_surface);
}
}
How can I resolve this?
Regards
adlo
More information about the wayland-devel
mailing list