check toplevel resources

it's just a aesthetic change
This commit is contained in:
Leonardo Hernández Hernández 2023-12-12 22:17:57 -06:00
parent 9a84789ff1
commit fa660fb61e
No known key found for this signature in database
GPG Key ID: E538897EE11B9624
2 changed files with 2 additions and 2 deletions

View File

@ -352,7 +352,7 @@ client_set_tiled(Client *c, uint32_t edges)
if (client_is_x11(c)) if (client_is_x11(c))
return; return;
#endif #endif
if (wl_resource_get_version(c->surface.xdg->resource) if (wl_resource_get_version(c->surface.xdg->toplevel->resource)
>= XDG_TOPLEVEL_STATE_TILED_RIGHT_SINCE_VERSION) { >= XDG_TOPLEVEL_STATE_TILED_RIGHT_SINCE_VERSION) {
wlr_xdg_toplevel_set_tiled(c->surface.xdg->toplevel, edges); wlr_xdg_toplevel_set_tiled(c->surface.xdg->toplevel, edges);
} else { } else {

2
dwl.c
View File

@ -1577,7 +1577,7 @@ maximizenotify(struct wl_listener *listener, void *data)
* protocol version * protocol version
* wlr_xdg_surface_schedule_configure() is used to send an empty reply. */ * wlr_xdg_surface_schedule_configure() is used to send an empty reply. */
Client *c = wl_container_of(listener, c, maximize); Client *c = wl_container_of(listener, c, maximize);
if (wl_resource_get_version(c->surface.xdg->resource) if (wl_resource_get_version(c->surface.xdg->toplevel->resource)
< XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION) < XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION)
wlr_xdg_surface_schedule_configure(c->surface.xdg); wlr_xdg_surface_schedule_configure(c->surface.xdg);
} }