mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
view: Move xdg_surface + xwayland_surface to derived structs
Add xdg_surface_from_view() + xwayland_surface_from_view() accessors that assert() the view is of the expected type before returning. Fix a real bug in xdg.c parent_of() that dereferenced `view->xdg_surface->toplevel` without first checking `view->type`. The goal of the new accessors is to catch similar bugs in future.
This commit is contained in:
parent
df7276345f
commit
4da37c6532
7 changed files with 147 additions and 106 deletions
|
|
@ -35,7 +35,7 @@ is_title_different(struct view *view)
|
|||
#if HAVE_XWAYLAND
|
||||
case LAB_XWAYLAND_VIEW:
|
||||
return g_strcmp0(view_get_string_prop(view, "title"),
|
||||
view->xwayland_surface->class);
|
||||
view_get_string_prop(view, "class"));
|
||||
#endif
|
||||
}
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue