mirror of
https://codeberg.org/FabricSoul/dwl.git
synced 2025-08-03 20:10:23 -04:00
Merge remote-tracking branch 'djpohly/main' into wlroots-next
chase wlroots X11 hints update
This commit is contained in:
commit
88a8b784d0
4 changed files with 36 additions and 12 deletions
24
client.h
24
client.h
|
@ -30,16 +30,19 @@ client_surface(Client *c)
|
|||
static inline void
|
||||
client_activate_surface(struct wlr_surface *s, int activated)
|
||||
{
|
||||
struct wlr_xdg_surface *surface;
|
||||
#ifdef XWAYLAND
|
||||
if (wlr_surface_is_xwayland_surface(s)) {
|
||||
wlr_xwayland_surface_activate(
|
||||
wlr_xwayland_surface_from_wlr_surface(s), activated);
|
||||
struct wlr_xwayland_surface *xsurface;
|
||||
if (wlr_surface_is_xwayland_surface(s)
|
||||
&& (xsurface = wlr_xwayland_surface_from_wlr_surface(s))) {
|
||||
wlr_xwayland_surface_activate(xsurface, activated);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if (wlr_surface_is_xdg_surface(s))
|
||||
wlr_xdg_toplevel_set_activated(
|
||||
wlr_xdg_surface_from_wlr_surface(s)->toplevel, activated);
|
||||
if (wlr_surface_is_xdg_surface(s)
|
||||
&& (surface = wlr_xdg_surface_from_wlr_surface(s))
|
||||
&& surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL)
|
||||
wlr_xdg_toplevel_set_activated(surface->toplevel, activated);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
@ -211,8 +214,13 @@ client_min_size(Client *c, int *width, int *height)
|
|||
#ifdef XWAYLAND
|
||||
if (client_is_x11(c)) {
|
||||
xcb_size_hints_t *size_hints = c->surface.xwayland->size_hints;
|
||||
*width = size_hints->min_width;
|
||||
*height = size_hints->min_height;
|
||||
if (size_hints) {
|
||||
*width = size_hints->min_width;
|
||||
*height = size_hints->min_height;
|
||||
} else {
|
||||
*width = 0;
|
||||
*height = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue