add client.type field
Current options are XDGShell, X11Managed, and X11Unmanaged.
This commit is contained in:
parent
39f3b87f3a
commit
e5e170e420
6
dwl.c
6
dwl.c
@ -49,6 +49,7 @@
|
|||||||
enum { CurNormal, CurMove, CurResize }; /* cursor */
|
enum { CurNormal, CurMove, CurResize }; /* cursor */
|
||||||
enum { NetWMWindowTypeDialog, NetWMWindowTypeSplash, NetWMWindowTypeToolbar,
|
enum { NetWMWindowTypeDialog, NetWMWindowTypeSplash, NetWMWindowTypeToolbar,
|
||||||
NetWMWindowTypeUtility, NetLast }; /* EWMH atoms */
|
NetWMWindowTypeUtility, NetLast }; /* EWMH atoms */
|
||||||
|
enum { XDGShell = 0, X11Managed, X11Unmanaged }; /* client types */
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
int i;
|
int i;
|
||||||
@ -78,8 +79,9 @@ typedef struct {
|
|||||||
struct wl_listener unmap;
|
struct wl_listener unmap;
|
||||||
struct wl_listener destroy;
|
struct wl_listener destroy;
|
||||||
struct wlr_box geom; /* layout-relative, includes border */
|
struct wlr_box geom; /* layout-relative, includes border */
|
||||||
int isx11;
|
|
||||||
Monitor *mon;
|
Monitor *mon;
|
||||||
|
unsigned int type;
|
||||||
|
int isx11;
|
||||||
int bw;
|
int bw;
|
||||||
unsigned int tags;
|
unsigned int tags;
|
||||||
int isfloating;
|
int isfloating;
|
||||||
@ -574,12 +576,14 @@ createnotifyx11(struct wl_listener *listener, void *data)
|
|||||||
|
|
||||||
/* Listen to the various events it can emit */
|
/* Listen to the various events it can emit */
|
||||||
if (!xwayland_surface->override_redirect) {
|
if (!xwayland_surface->override_redirect) {
|
||||||
|
c->type = X11Managed;
|
||||||
c->map.notify = maprequest;
|
c->map.notify = maprequest;
|
||||||
c->unmap.notify = unmapnotify;
|
c->unmap.notify = unmapnotify;
|
||||||
/* Only "managed" windows can be activated */
|
/* Only "managed" windows can be activated */
|
||||||
c->activate.notify = activatex11;
|
c->activate.notify = activatex11;
|
||||||
wl_signal_add(&xwayland_surface->events.request_activate, &c->activate);
|
wl_signal_add(&xwayland_surface->events.request_activate, &c->activate);
|
||||||
} else {
|
} else {
|
||||||
|
c->type = X11Unmanaged;
|
||||||
c->map.notify = maprequestindependent;
|
c->map.notify = maprequestindependent;
|
||||||
c->unmap.notify = unmapnotifyindependent;
|
c->unmap.notify = unmapnotifyindependent;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user