summaryrefslogtreecommitdiff
path: root/client.h
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@proton.me>2023-11-16 21:47:29 -0600
committerLeonardo Hernández Hernández <leohdz172@proton.me>2023-11-17 11:03:32 -0600
commitdd25cdb56e00586281b6d8e79f3af91db2f747ee (patch)
treee2b98ad570dc6a00b1d66ddd81c8b3120916db78 /client.h
parentcaac2d664db998beddeeececd7253a11a665c162 (diff)
use the new wlroots function to get a toplevel from a wlr_surface
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4419
Diffstat (limited to 'client.h')
-rw-r--r--client.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/client.h b/client.h
index 9a9f0e0..7a77df0 100644
--- a/client.h
+++ b/client.h
@@ -92,7 +92,7 @@ end:
static inline void
client_activate_surface(struct wlr_surface *s, int activated)
{
- struct wlr_xdg_surface *surface;
+ struct wlr_xdg_toplevel *toplevel;
#ifdef XWAYLAND
struct wlr_xwayland_surface *xsurface;
if ((xsurface = wlr_xwayland_surface_try_from_wlr_surface(s))) {
@@ -100,9 +100,8 @@ client_activate_surface(struct wlr_surface *s, int activated)
return;
}
#endif
- if ((surface = wlr_xdg_surface_try_from_wlr_surface(s))
- && surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL)
- wlr_xdg_toplevel_set_activated(surface->toplevel, activated);
+ if ((toplevel = wlr_xdg_toplevel_try_from_wlr_surface(s)))
+ wlr_xdg_toplevel_set_activated(toplevel, activated);
}
static inline uint32_t