Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 708242a473b83a3b399f778ffc5fe7d1358295af Mon Sep 17 00:00:00 2001
- From: bakkeby <[email protected]>
- Date: Tue, 18 May 2021 09:41:13 +0200
- Subject: [PATCH] dock windows patch
- New windows that have the _NET_WM_WINDOW_TYPE_DOCK window type
- will not be managed by dwm.
- This will apply to any application setting its window type hint to DOCK.
- ---
- dwm.c | 10 ++++++++++
- 1 file changed, 10 insertions(+)
- diff --git a/dwm.c b/dwm.c
- index 4465af1..34a95ce 100644
- --- a/dwm.c
- +++ b/dwm.c
- @@ -62,6 +62,7 @@ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
- enum { SchemeNorm, SchemeSel }; /* color schemes */
- enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
- NetWMFullscreen, NetActiveWindow, NetWMWindowType,
- + NetWMWindowTypeDock,
- NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
- enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */
- enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
- @@ -1023,6 +1024,14 @@ manage(Window w, XWindowAttributes *wa)
- c = ecalloc(1, sizeof(Client));
- c->win = w;
- +
- + if (getatomprop(c, netatom[NetWMWindowType]) == netatom[NetWMWindowTypeDock]) {
- + XMapWindow(dpy, c->win);
- + XLowerWindow(dpy, c->win);
- + free(c);
- + return;
- + }
- +
- /* geometry */
- c->x = c->oldx = wa->x;
- c->y = c->oldy = wa->y;
- @@ -1561,6 +1570,7 @@ setup(void)
- netatom[NetWMFullscreen] = XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", False);
- netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False);
- netatom[NetWMWindowTypeDialog] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DIALOG", False);
- + netatom[NetWMWindowTypeDock] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DOCK", False);
- netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False);
- /* init cursors */
- cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr);
- --
- 2.19.1
Advertisement
Add Comment
Please, Sign In to add comment