diff options
author | Adel Gadllah <adel.gadllah@gmail.com> | 2015-08-09 12:54:00 +0200 |
---|---|---|
committer | Adel Gadllah <adel.gadllah@gmail.com> | 2015-08-09 19:25:46 +0200 |
commit | 4dc5882777ed1f6c2957d3860a6f5f23cb48e136 (patch) | |
tree | 09b8165470290fcc37bdcea042f3ef01e15c6613 /src | |
parent | b0b08d5010d3a47ae636310dbdecd175ffb54dc2 (diff) | |
download | mutter-4dc5882777ed1f6c2957d3860a6f5f23cb48e136.tar.gz |
wayland: Add frame callbacks to the actor based on the role
Checking for the presense of the actor is wrong because we always
create one.
https://bugzilla.gnome.org/show_bug.cgi?id=739163
Diffstat (limited to 'src')
-rw-r--r-- | src/wayland/meta-wayland-surface.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index 7481d87e8..863a3baef 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -541,11 +541,21 @@ apply_pending_state (MetaWaylandSurface *surface, } /* wl_surface.frame */ - if (surface->surface_actor) - meta_surface_actor_wayland_add_frame_callbacks (META_SURFACE_ACTOR_WAYLAND (surface->surface_actor), - &pending->frame_callback_list); - else - wl_list_insert_list (&compositor->frame_callbacks, &pending->frame_callback_list); + switch (surface->role) + { + case META_WAYLAND_SURFACE_ROLE_NONE: + case META_WAYLAND_SURFACE_ROLE_CURSOR: + case META_WAYLAND_SURFACE_ROLE_DND: + wl_list_insert_list (&compositor->frame_callbacks, &pending->frame_callback_list); + break; + case META_WAYLAND_SURFACE_ROLE_XDG_SURFACE: + case META_WAYLAND_SURFACE_ROLE_XDG_POPUP: + case META_WAYLAND_SURFACE_ROLE_WL_SHELL_SURFACE: + case META_WAYLAND_SURFACE_ROLE_SUBSURFACE: + meta_surface_actor_wayland_add_frame_callbacks (META_SURFACE_ACTOR_WAYLAND (surface->surface_actor), + &pending->frame_callback_list); + break; + } wl_list_init (&pending->frame_callback_list); switch (surface->role) |