Kris YotamImport dwm historybc80b522 months agoHistory
70 lines · 1.7 KB · C
RawDownload
voidmaximize(int x, int y, int w, int h){	XEvent ev; 	if (!selmon->sel || selmon->sel->isfixed)		return;	XRaiseWindow(dpy, selmon->sel->win);	if (!selmon->sel->ismax) {		if (!selmon->lt[selmon->sellt]->arrange || selmon->sel->isfloating)			selmon->sel->wasfloating = True;		else {			togglefloating(NULL);			selmon->sel->wasfloating = False;		}		selmon->sel->oldx = selmon->sel->x;		selmon->sel->oldy = selmon->sel->y;		selmon->sel->oldw = selmon->sel->w;		selmon->sel->oldh = selmon->sel->h;		resize(selmon->sel, x, y, w, h, True);		selmon->sel->ismax = True;	}	else {		resize(selmon->sel, selmon->sel->oldx, selmon->sel->oldy, selmon->sel->oldw, selmon->sel->oldh, True);		if (!selmon->sel->wasfloating)			togglefloating(NULL);		selmon->sel->ismax = False;	}	drawbar(selmon);	while (XCheckMaskEvent(dpy, EnterWindowMask, &ev));} #if SETBORDERPX_PATCHvoidtogglemax(const Arg *arg){	maximize(selmon->wx, selmon->wy, selmon->ww - 2 * selmon->borderpx, selmon->wh - 2 * selmon->borderpx);} voidtoggleverticalmax(const Arg *arg){	maximize(selmon->sel->x, selmon->wy, selmon->sel->w, selmon->wh - 2 * selmon->borderpx);} voidtogglehorizontalmax(const Arg *arg){	maximize(selmon->wx, selmon->sel->y, selmon->ww - 2 * selmon->borderpx, selmon->sel->h);}#elsevoidtogglemax(const Arg *arg){	maximize(selmon->wx, selmon->wy, selmon->ww - 2 * borderpx, selmon->wh - 2 * borderpx);} voidtoggleverticalmax(const Arg *arg){	maximize(selmon->sel->x, selmon->wy, selmon->sel->w, selmon->wh - 2 * borderpx);} voidtogglehorizontalmax(const Arg *arg){	maximize(selmon->wx, selmon->sel->y, selmon->ww - 2 * borderpx, selmon->sel->h);}#endif // SETBORDERPX_PATCH 

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t