Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
renamed gridmenu.c into menu.c
[dwm.git]
/
wm.c
diff --git
a/wm.c
b/wm.c
index
4c4a513
..
c8bb0a4
100644
(file)
--- a/
wm.c
+++ b/
wm.c
@@
-13,15
+13,20
@@
#include "wm.h"
#include "wm.h"
+/* X structs */
Display *dpy;
Window root;
XRectangle rect;
Display *dpy;
Window root;
XRectangle rect;
-
int screen, sel_screen
;
+
Pixmap pmap
;
Atom wm_atom[WMLast];
Atom net_atom[NetLast];
Cursor cursor[CurLast];
Atom wm_atom[WMLast];
Atom net_atom[NetLast];
Cursor cursor[CurLast];
+
+int screen, sel_screen;
unsigned int kmask, numlock_mask;
unsigned int kmask, numlock_mask;
-Pixmap pmap;
+
+/* draw structs */
+Brush brush = {0};
enum { WM_PROTOCOL_DELWIN = 1 };
enum { WM_PROTOCOL_DELWIN = 1 };
@@
-208,7
+213,7
@@
main(int argc, char *argv[])
XSetErrorHandler(startup_error_handler);
/* this causes an error if some other WM is running */
XSelectInput(dpy, root, SubstructureRedirectMask);
XSetErrorHandler(startup_error_handler);
/* this causes an error if some other WM is running */
XSelectInput(dpy, root, SubstructureRedirectMask);
- X
Sync(dpy, False
);
+ X
Flush(dpy
);
if(other_wm_running)
error("gridwm: another window manager is already running\n");
if(other_wm_running)
error("gridwm: another window manager is already running\n");
@@
-246,6
+251,10
@@
main(int argc, char *argv[])
wa.cursor = cursor[CurNormal];
XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa);
wa.cursor = cursor[CurNormal];
XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa);
+ /* style */
+ loadcolors(dpy, screen, &brush, BGCOLOR, FGCOLOR, BORDERCOLOR);
+ loadfont(dpy, &brush.font, FONT);
+
scan_wins();
cleanup();
scan_wins();
cleanup();