From db3b9f21898813e196a277077c002e37e0fa22aa Mon Sep 17 00:00:00 2001 From: bakkeby Date: Tue, 18 May 2021 09:44:45 +0200 Subject: [PATCH] Adding desktop icons patch --- dwm/dwm-desktop_icons-6.2.diff | 59 ++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 dwm/dwm-desktop_icons-6.2.diff diff --git a/dwm/dwm-desktop_icons-6.2.diff b/dwm/dwm-desktop_icons-6.2.diff new file mode 100644 index 0000000..fd14718 --- /dev/null +++ b/dwm/dwm-desktop_icons-6.2.diff @@ -0,0 +1,59 @@ +From 708242a473b83a3b399f778ffc5fe7d1358295af Mon Sep 17 00:00:00 2001 +From: bakkeby +Date: Tue, 18 May 2021 09:41:13 +0200 +Subject: [PATCH] desktop icons patch + +New windows that has the _NET_WM_WINDOW_TYPE_DESKTOP window type +will not be managed by dwm. + +Example programs that this applies to: + - pcmanfm --desktop + - nautilus -n (legacy) + - nemo-desktop + - caja --force-desktop --no-default-window + +Note that these applications have a tendency of managing the +background wallpaper as well, the exception being nemo-desktop +where it appears to just be transparent if a compositor is used. +--- + 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, ++ NetWMWindowTypeDesktop, + 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[NetWMWindowTypeDesktop]) { ++ 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[NetWMWindowTypeDesktop] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DESKTOP", False); + netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False); + /* init cursors */ + cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr); +-- +2.19.1 +