mirror of
https://codeberg.org/dwl/dwl.git
synced 2024-12-27 03:36:31 +00:00
merge X11Managed and X11Unmanaged into X11
now that client_is_unmanaged() checks the wlr struct we don't need to keep track of it ourselves
This commit is contained in:
parent
c88960751d
commit
49bfe92703
2 changed files with 5 additions and 5 deletions
2
client.h
2
client.h
|
@ -10,7 +10,7 @@ static inline int
|
||||||
client_is_x11(Client *c)
|
client_is_x11(Client *c)
|
||||||
{
|
{
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
return c->type == X11Managed || c->type == X11Unmanaged;
|
return c->type == X11;
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
8
dwl.c
8
dwl.c
|
@ -74,7 +74,7 @@
|
||||||
|
|
||||||
/* enums */
|
/* enums */
|
||||||
enum { CurNormal, CurPressed, CurMove, CurResize }; /* cursor */
|
enum { CurNormal, CurPressed, CurMove, CurResize }; /* cursor */
|
||||||
enum { XDGShell, LayerShell, X11Managed, X11Unmanaged }; /* client types */
|
enum { XDGShell, LayerShell, X11 }; /* client types */
|
||||||
enum { LyrBg, LyrBottom, LyrTile, LyrFloat, LyrFS, LyrTop, LyrOverlay, LyrBlock, NUM_LAYERS }; /* scene layers */
|
enum { LyrBg, LyrBottom, LyrTile, LyrFloat, LyrFS, LyrTop, LyrOverlay, LyrBlock, NUM_LAYERS }; /* scene layers */
|
||||||
#ifdef XWAYLAND
|
#ifdef XWAYLAND
|
||||||
enum { NetWMWindowTypeDialog, NetWMWindowTypeSplash, NetWMWindowTypeToolbar,
|
enum { NetWMWindowTypeDialog, NetWMWindowTypeSplash, NetWMWindowTypeToolbar,
|
||||||
|
@ -2746,7 +2746,7 @@ activatex11(struct wl_listener *listener, void *data)
|
||||||
Client *c = wl_container_of(listener, c, activate);
|
Client *c = wl_container_of(listener, c, activate);
|
||||||
|
|
||||||
/* Only "managed" windows can be activated */
|
/* Only "managed" windows can be activated */
|
||||||
if (c->type == X11Managed)
|
if (!client_is_unmanaged(c))
|
||||||
wlr_xwayland_surface_activate(c->surface.xwayland, 1);
|
wlr_xwayland_surface_activate(c->surface.xwayland, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2766,7 +2766,7 @@ configurex11(struct wl_listener *listener, void *data)
|
||||||
struct wlr_xwayland_surface_configure_event *event = data;
|
struct wlr_xwayland_surface_configure_event *event = data;
|
||||||
if (!c->mon)
|
if (!c->mon)
|
||||||
return;
|
return;
|
||||||
if (c->isfloating || c->type == X11Unmanaged)
|
if (c->isfloating || client_is_unmanaged(c))
|
||||||
resize(c, (struct wlr_box){.x = event->x, .y = event->y,
|
resize(c, (struct wlr_box){.x = event->x, .y = event->y,
|
||||||
.width = event->width, .height = event->height}, 0);
|
.width = event->width, .height = event->height}, 0);
|
||||||
else
|
else
|
||||||
|
@ -2782,7 +2782,7 @@ createnotifyx11(struct wl_listener *listener, void *data)
|
||||||
/* Allocate a Client for this surface */
|
/* Allocate a Client for this surface */
|
||||||
c = xsurface->data = ecalloc(1, sizeof(*c));
|
c = xsurface->data = ecalloc(1, sizeof(*c));
|
||||||
c->surface.xwayland = xsurface;
|
c->surface.xwayland = xsurface;
|
||||||
c->type = xsurface->override_redirect ? X11Unmanaged : X11Managed;
|
c->type = X11;
|
||||||
c->bw = borderpx;
|
c->bw = borderpx;
|
||||||
|
|
||||||
/* Listen to the various events it can emit */
|
/* Listen to the various events it can emit */
|
||||||
|
|
Loading…
Reference in a new issue