Add actualfullscreen patch and replace 4spaces to tab
This commit is contained in:
parent
89b87f20e0
commit
cc9b2c5f22
3
PATCHES
3
PATCHES
|
@ -1,3 +1,6 @@
|
||||||
|
actualfullscreen
|
||||||
|
|
||||||
|
|
||||||
fullgaps
|
fullgaps
|
||||||
status2d
|
status2d
|
||||||
extrabar
|
extrabar
|
||||||
|
|
48
dwm.c
48
dwm.c
|
@ -45,27 +45,27 @@
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
/* macros */
|
/* macros */
|
||||||
#define BUTTONMASK (ButtonPressMask|ButtonReleaseMask)
|
#define BUTTONMASK (ButtonPressMask|ButtonReleaseMask)
|
||||||
#define CLEANMASK(mask) (mask & ~(numlockmask|LockMask) & (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask))
|
#define CLEANMASK(mask) (mask & ~(numlockmask|LockMask) & (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask))
|
||||||
#define INTERSECT(x,y,w,h,m) (MAX(0, MIN((x)+(w),(m)->wx+(m)->ww) - MAX((x),(m)->wx)) \
|
#define INTERSECT(x,y,w,h,m) (MAX(0, MIN((x)+(w),(m)->wx+(m)->ww) - MAX((x),(m)->wx)) \
|
||||||
* MAX(0, MIN((y)+(h),(m)->wy+(m)->wh) - MAX((y),(m)->wy)))
|
* MAX(0, MIN((y)+(h),(m)->wy+(m)->wh) - MAX((y),(m)->wy)))
|
||||||
#define ISVISIBLE(C) ((C->tags & C->mon->tagset[C->mon->seltags]))
|
#define ISVISIBLE(C) ((C->tags & C->mon->tagset[C->mon->seltags]))
|
||||||
#define LENGTH(X) (sizeof X / sizeof X[0])
|
#define LENGTH(X) (sizeof X / sizeof X[0])
|
||||||
#define MOUSEMASK (BUTTONMASK|PointerMotionMask)
|
#define MOUSEMASK (BUTTONMASK|PointerMotionMask)
|
||||||
#define WIDTH(X) ((X)->w + 2 * (X)->bw)
|
#define WIDTH(X) ((X)->w + 2 * (X)->bw)
|
||||||
#define HEIGHT(X) ((X)->h + 2 * (X)->bw)
|
#define HEIGHT(X) ((X)->h + 2 * (X)->bw)
|
||||||
#define TAGMASK ((1 << LENGTH(tags)) - 1)
|
#define TAGMASK ((1 << LENGTH(tags)) - 1)
|
||||||
#define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad)
|
#define TEXTW(X) (drw_fontset_getwidth(drw, (X)) + lrpad)
|
||||||
|
|
||||||
/* enums */
|
/* enums */
|
||||||
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
|
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
|
||||||
enum { SchemeNorm, SchemeSel }; /* color schemes */
|
enum { SchemeNorm, SchemeSel }; /* color schemes */
|
||||||
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
|
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
|
||||||
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
|
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
|
||||||
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
|
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
|
||||||
enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */
|
enum { WMProtocols, WMDelete, WMState, WMTakeFocus, WMLast }; /* default atoms */
|
||||||
enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
|
enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
|
||||||
ClkClientWin, ClkRootWin, ClkLast }; /* clicks */
|
ClkClientWin, ClkRootWin, ClkLast }; /* clicks */
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
int i;
|
int i;
|
||||||
|
@ -116,7 +116,7 @@ struct Monitor {
|
||||||
float mfact;
|
float mfact;
|
||||||
int nmaster;
|
int nmaster;
|
||||||
int num;
|
int num;
|
||||||
int by; /* bar geometry */
|
int by; /* bar geometry */
|
||||||
int mx, my, mw, mh; /* screen size */
|
int mx, my, mw, mh; /* screen size */
|
||||||
int wx, wy, ww, wh; /* window area */
|
int wx, wy, ww, wh; /* window area */
|
||||||
unsigned int seltags;
|
unsigned int seltags;
|
||||||
|
@ -211,6 +211,7 @@ static void tagmon(const Arg *arg);
|
||||||
static void tile(Monitor *m);
|
static void tile(Monitor *m);
|
||||||
static void togglebar(const Arg *arg);
|
static void togglebar(const Arg *arg);
|
||||||
static void togglefloating(const Arg *arg);
|
static void togglefloating(const Arg *arg);
|
||||||
|
static void togglefullscr(const Arg *arg);
|
||||||
static void toggletag(const Arg *arg);
|
static void toggletag(const Arg *arg);
|
||||||
static void toggleview(const Arg *arg);
|
static void toggleview(const Arg *arg);
|
||||||
static void unfocus(Client *c, int setfocus);
|
static void unfocus(Client *c, int setfocus);
|
||||||
|
@ -238,9 +239,9 @@ static void zoom(const Arg *arg);
|
||||||
static const char broken[] = "broken";
|
static const char broken[] = "broken";
|
||||||
static char stext[256];
|
static char stext[256];
|
||||||
static int screen;
|
static int screen;
|
||||||
static int sw, sh; /* X display screen geometry width, height */
|
static int sw, sh; /* X display screen geometry width, height */
|
||||||
static int bh; /* bar height */
|
static int bh; /* bar height */
|
||||||
static int lrpad; /* sum of left and right padding for text */
|
static int lrpad; /* sum of left and right padding for text */
|
||||||
static int (*xerrorxlib)(Display *, XErrorEvent *);
|
static int (*xerrorxlib)(Display *, XErrorEvent *);
|
||||||
static unsigned int numlockmask = 0;
|
static unsigned int numlockmask = 0;
|
||||||
static void (*handler[LASTEvent]) (XEvent *) = {
|
static void (*handler[LASTEvent]) (XEvent *) = {
|
||||||
|
@ -288,7 +289,7 @@ applyrules(Client *c)
|
||||||
c->isfloating = 0;
|
c->isfloating = 0;
|
||||||
c->tags = 0;
|
c->tags = 0;
|
||||||
XGetClassHint(dpy, c->win, &ch);
|
XGetClassHint(dpy, c->win, &ch);
|
||||||
class = ch.res_class ? ch.res_class : broken;
|
class = ch.res_class ? ch.res_class : broken;
|
||||||
instance = ch.res_name ? ch.res_name : broken;
|
instance = ch.res_name ? ch.res_name : broken;
|
||||||
|
|
||||||
for (i = 0; i < LENGTH(rules); i++) {
|
for (i = 0; i < LENGTH(rules); i++) {
|
||||||
|
@ -523,7 +524,7 @@ clientmessage(XEvent *e)
|
||||||
if (cme->message_type == netatom[NetWMState]) {
|
if (cme->message_type == netatom[NetWMState]) {
|
||||||
if (cme->data.l[1] == netatom[NetWMFullscreen]
|
if (cme->data.l[1] == netatom[NetWMFullscreen]
|
||||||
|| cme->data.l[2] == netatom[NetWMFullscreen])
|
|| cme->data.l[2] == netatom[NetWMFullscreen])
|
||||||
setfullscreen(c, (cme->data.l[0] == 1 /* _NET_WM_STATE_ADD */
|
setfullscreen(c, (cme->data.l[0] == 1 /* _NET_WM_STATE_ADD */
|
||||||
|| (cme->data.l[0] == 2 /* _NET_WM_STATE_TOGGLE */ && !c->isfullscreen)));
|
|| (cme->data.l[0] == 2 /* _NET_WM_STATE_TOGGLE */ && !c->isfullscreen)));
|
||||||
} else if (cme->message_type == netatom[NetActiveWindow]) {
|
} else if (cme->message_type == netatom[NetActiveWindow]) {
|
||||||
if (c != selmon->sel && !c->isurgent)
|
if (c != selmon->sel && !c->isurgent)
|
||||||
|
@ -1735,6 +1736,13 @@ togglefloating(const Arg *arg)
|
||||||
arrange(selmon);
|
arrange(selmon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
togglefullscr(const Arg *arg)
|
||||||
|
{
|
||||||
|
if(selmon->sel)
|
||||||
|
setfullscreen(selmon->sel, !selmon->sel->isfullscreen);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
toggletag(const Arg *arg)
|
toggletag(const Arg *arg)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue