mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-11-06 13:29:51 -05:00
implement foreign-toplevel-management
This commit is contained in:
parent
577d8da6d1
commit
09d42d9834
5 changed files with 468 additions and 6 deletions
16
client.h
16
client.h
|
|
@ -96,6 +96,9 @@ client_activate_surface(struct wlr_surface *s, int activated)
|
|||
#ifdef XWAYLAND
|
||||
struct wlr_xwayland_surface *xsurface;
|
||||
if ((xsurface = wlr_xwayland_surface_try_from_wlr_surface(s))) {
|
||||
if (activated && xsurface->minimized) {
|
||||
wlr_xwayland_surface_set_minimized(xsurface, false);
|
||||
}
|
||||
wlr_xwayland_surface_activate(xsurface, activated);
|
||||
return;
|
||||
}
|
||||
|
|
@ -344,6 +347,19 @@ client_set_fullscreen(Client *c, int fullscreen)
|
|||
wlr_xdg_toplevel_set_fullscreen(c->surface.xdg->toplevel, fullscreen);
|
||||
}
|
||||
|
||||
static inline void
|
||||
client_set_minimized(struct wlr_surface *s, int minimized)
|
||||
{
|
||||
#ifdef XWAYLAND
|
||||
struct wlr_xwayland_surface *xsurface;
|
||||
if ((xsurface = wlr_xwayland_surface_try_from_wlr_surface(s))) {
|
||||
int focused = seat->keyboard_state.focused_surface == xsurface->surface;
|
||||
wlr_xwayland_surface_set_minimized(xsurface, !focused && minimized);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
client_set_size(Client *c, uint32_t width, uint32_t height)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue