Skip to content

Commit

Permalink
use the new wlroots function to get a toplevel from a wlr_surface
Browse files Browse the repository at this point in the history
  • Loading branch information
sevz17 committed Nov 17, 2023
1 parent caac2d6 commit dd25cdb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions client.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,16 @@ toplevel_from_wlr_surface(struct wlr_surface *s, Client **pc, LayerSurface **pl)
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))) {
wlr_xwayland_surface_activate(xsurface, 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
Expand Down

0 comments on commit dd25cdb

Please sign in to comment.