47 lines
2.3 KiB
Plaintext
47 lines
2.3 KiB
Plaintext
--- dwm.c
|
|
+++ dwm.c
|
|
@@ -55,6 +55,7 @@
|
|
#define WIDTH(X) ((X)->w + 2 * (X)->bw)
|
|
#define HEIGHT(X) ((X)->h + 2 * (X)->bw)
|
|
#define TAGMASK ((1 << LENGTH(tags)) - 1)
|
|
+#define TAGSLENGTH (LENGTH(tags))
|
|
#define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad)
|
|
|
|
/* enums */
|
|
@@ -62,7 +63,7 @@ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
|
|
enum { SchemeNorm, SchemeSel }; /* color schemes */
|
|
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
|
|
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
|
|
- NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
|
|
+ NetWMWindowTypeDialog, NetClientList, NetDesktopNames, NetDesktopViewport, NetNumberOfDesktops, NetCurrentDesktop, NetLast }; /* EWMH atoms */
|
|
enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */
|
|
enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
|
|
ClkClientWin, ClkRootWin, ClkLast }; /* clicks */
|
|
@@ -197,11 +198,15 @@ static void scan(void);
|
|
static int sendevent(Client *c, Atom proto);
|
|
static void sendmon(Client *c, Monitor *m);
|
|
static void setclientstate(Client *c, long state);
|
|
+static void setcurrentdesktop(void);
|
|
+static void setdesktopnames(void);
|
|
static void setfocus(Client *c);
|
|
static void setfullscreen(Client *c, int fullscreen);
|
|
static void setlayout(const Arg *arg);
|
|
static void setmfact(const Arg *arg);
|
|
+static void setnumdesktops(void);
|
|
static void setup(void);
|
|
+static void setviewport(void);
|
|
static void seturgent(Client *c, int urg);
|
|
static void showhide(Client *c);
|
|
static void sigchld(int unused);
|
|
@@ -1579,6 +1601,10 @@ setup(void)
|
|
netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False);
|
|
netatom[NetWMWindowTypeDialog] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DIALOG", False);
|
|
netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False);
|
|
+ netatom[NetDesktopViewport] = XInternAtom(dpy, "_NET_DESKTOP_VIEWPORT", False);
|
|
+ netatom[NetNumberOfDesktops] = XInternAtom(dpy, "_NET_NUMBER_OF_DESKTOPS", False);
|
|
+ netatom[NetCurrentDesktop] = XInternAtom(dpy, "_NET_CURRENT_DESKTOP", False);
|
|
+ netatom[NetDesktopNames] = XInternAtom(dpy, "_NET_DESKTOP_NAMES", False);
|
|
/* init cursors */
|
|
cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr);
|
|
cursor[CurResize] = drw_cur_create(drw, XC_sizing);
|