mirror of
https://codeberg.org/dwl/dwl.git
synced 2024-12-27 03:36:31 +00:00
use the new wlroots function to get a toplevel from a wlr_surface
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4419
This commit is contained in:
parent
caac2d664d
commit
dd25cdb56e
1 changed files with 3 additions and 4 deletions
7
client.h
7
client.h
|
@ -92,7 +92,7 @@ end:
|
||||||
static inline void
|
static inline void
|
||||||
client_activate_surface(struct wlr_surface *s, int activated)
|
client_activate_surface(struct wlr_surface *s, int activated)
|
||||||
{
|
{
|
||||||
struct wlr_xdg_surface *surface;
|
struct wlr_xdg_toplevel *toplevel;
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
struct wlr_xwayland_surface *xsurface;
|
struct wlr_xwayland_surface *xsurface;
|
||||||
if ((xsurface = wlr_xwayland_surface_try_from_wlr_surface(s))) {
|
if ((xsurface = wlr_xwayland_surface_try_from_wlr_surface(s))) {
|
||||||
|
@ -100,9 +100,8 @@ client_activate_surface(struct wlr_surface *s, int activated)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if ((surface = wlr_xdg_surface_try_from_wlr_surface(s))
|
if ((toplevel = wlr_xdg_toplevel_try_from_wlr_surface(s)))
|
||||||
&& surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL)
|
wlr_xdg_toplevel_set_activated(toplevel, activated);
|
||||||
wlr_xdg_toplevel_set_activated(surface->toplevel, activated);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32_t
|
static inline uint32_t
|
||||||
|
|
Loading…
Reference in a new issue