aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-07-15 00:48:28 -0500
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-07-15 00:48:28 -0500
commite98719f5523597d02e82632a4af2676a1299497e (patch)
tree4d9487701d806ac59601efc0132563b7dab726f3
parentaf12e777f2eaf3237e4e95945646ef676d466e6e (diff)
remove a useless check
if `s->role_data == NULL`, wlr_*_surface_from_wlr_surface() will return NULL and we are checking it
-rw-r--r--client.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/client.h b/client.h
index 7301d25..681f842 100644
--- a/client.h
+++ b/client.h
@@ -242,11 +242,11 @@ client_from_wlr_surface(struct wlr_surface *s)
#ifdef XWAYLAND
struct wlr_xwayland_surface *xsurface;
- if (s->role_data && wlr_surface_is_xwayland_surface(s)
+ if (wlr_surface_is_xwayland_surface(s)
&& (xsurface = wlr_xwayland_surface_from_wlr_surface(s)))
return xsurface->data;
#endif
- if (s->role_data && wlr_surface_is_xdg_surface(s)
+ if (wlr_surface_is_xdg_surface(s)
&& (surface = wlr_xdg_surface_from_wlr_surface(s))
&& surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL)
return surface->data;