Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
implemented the maximization as I described on the mailinglist, this feels better...
[dwm.git]
/
main.c
diff --git
a/main.c
b/main.c
index
f63a697
..
b3c753e
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-24,7
+24,6
@@
unsigned int ntags, numlockmask;
Atom wmatom[WMLast], netatom[NetLast];
Bool running = True;
Bool issel = True;
Atom wmatom[WMLast], netatom[NetLast];
Bool running = True;
Bool issel = True;
-Bool maximized = False;
Client *clients = NULL;
Client *sel = NULL;
Client *stack = NULL;
Client *clients = NULL;
Client *sel = NULL;
Client *stack = NULL;
@@
-39,8
+38,7
@@
static int (*xerrorxlib)(Display *, XErrorEvent *);
static Bool otherwm, readin;
static void
static Bool otherwm, readin;
static void
-cleanup()
-{
+cleanup() {
close(STDIN_FILENO);
while(sel) {
resize(sel, True, TopLeft);
close(STDIN_FILENO);
while(sel) {
resize(sel, True, TopLeft);
@@
-60,8
+58,7
@@
cleanup()
}
static void
}
static void
-scan()
-{
+scan() {
unsigned int i, num;
Window *wins, d1, d2;
XWindowAttributes wa;
unsigned int i, num;
Window *wins, d1, d2;
XWindowAttributes wa;
@@
-82,8
+79,7
@@
scan()
}
static void
}
static void
-setup()
-{
+setup() {
int i, j;
unsigned int mask;
Window w;
int i, j;
unsigned int mask;
Window w;
@@
-112,7
+108,8
@@
setup()
}
XFree(modmap);
}
XFree(modmap);
- wa.event_mask = SubstructureRedirectMask | SubstructureNotifyMask | EnterWindowMask | LeaveWindowMask;
+ wa.event_mask = SubstructureRedirectMask | SubstructureNotifyMask
+ | EnterWindowMask | LeaveWindowMask;
wa.cursor = cursor[CurNormal];
XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa);
wa.cursor = cursor[CurNormal];
XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa);
@@
-163,8
+160,7
@@
setup()
* is already running.
*/
static int
* is already running.
*/
static int
-xerrorstart(Display *dsply, XErrorEvent *ee)
-{
+xerrorstart(Display *dsply, XErrorEvent *ee) {
otherwm = True;
return -1;
}
otherwm = True;
return -1;
}
@@
-172,8
+168,7
@@
xerrorstart(Display *dsply, XErrorEvent *ee)
/* extern */
int
/* extern */
int
-getproto(Window w)
-{
+getproto(Window w) {
int i, format, protos, status;
unsigned long extra, res;
Atom *protocols, real;
int i, format, protos, status;
unsigned long extra, res;
Atom *protocols, real;
@@
-191,8
+186,7
@@
getproto(Window w)
}
void
}
void
-sendevent(Window w, Atom a, long value)
-{
+sendevent(Window w, Atom a, long value) {
XEvent e;
e.type = ClientMessage;
XEvent e;
e.type = ClientMessage;
@@
-206,8
+200,7
@@
sendevent(Window w, Atom a, long value)
}
void
}
void
-quit(Arg *arg)
-{
+quit(Arg *arg) {
readin = running = False;
}
readin = running = False;
}
@@
-217,8
+210,7
@@
quit(Arg *arg)
* default error handler, which may call exit.
*/
int
* default error handler, which may call exit.
*/
int
-xerror(Display *dpy, XErrorEvent *ee)
-{
+xerror(Display *dpy, XErrorEvent *ee) {
if(ee->error_code == BadWindow
|| (ee->request_code == X_SetInputFocus && ee->error_code == BadMatch)
|| (ee->request_code == X_PolyText8 && ee->error_code == BadDrawable)
if(ee->error_code == BadWindow
|| (ee->request_code == X_SetInputFocus && ee->error_code == BadMatch)
|| (ee->request_code == X_PolyText8 && ee->error_code == BadDrawable)
@@
-234,8
+226,7
@@
xerror(Display *dpy, XErrorEvent *ee)
}
int
}
int
-main(int argc, char *argv[])
-{
+main(int argc, char *argv[]) {
int r, xfd;
fd_set rd;
int r, xfd;
fd_set rd;