mirror of
https://github.com/brl/mutter.git
synced 2025-07-20 17:01:42 +00:00
wayland/surface: Prepare for decoupled surface & resource lifetimes
Need to deal with surface->resource == NULL and surface->pending_state == NULL in some places. v2: * Avoid expanding conditions to multiple lines. (Georges Basile Stavracas Neto) v3: * Use a single bailout condition in meta_wayland_client_owns_window as well. v4: * Remove spare empty line in meta_wayland_surface_apply_state. (Robert Mader) * Add wl_resource_post_error calls in xdg-shell request handlers. (Robert Mader) * Drop checks in functions which can only be called if there's a valid resource. * Drop more checks which are unnecessary due to leaving the SURFACE_DESTROY signal emission in wl_surface_destructor later. v5: * Move resource = surface->resource assignments to if (!resource) tests. (Jonas Ådahl) v6: * Fix style issue per check-style.py. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1880>
This commit is contained in:

committed by
Michel Dänzer

parent
a99198de83
commit
6379e54847
@ -371,7 +371,7 @@ meta_wayland_text_input_set_focus (MetaWaylandTextInput *text_input,
|
||||
text_input->surface = NULL;
|
||||
}
|
||||
|
||||
if (surface)
|
||||
if (surface && surface->resource)
|
||||
{
|
||||
struct wl_resource *focus_surface_resource;
|
||||
|
||||
|
Reference in New Issue
Block a user