summaryrefslogtreecommitdiffstats
path: root/window.c
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-02-03 10:15:01 +0100
committerBert <ber.t@gmx.com>2011-02-03 10:15:01 +0100
commit8f4af658ae484c3090dbd5b5b9b498943b3eb959 (patch)
tree995810dbc295f16bc5438844cb9eafc8cd5b9864 /window.c
parentf5c125b3ee7ac6d718cf23ef3c7aaba90ce89ff8 (diff)
downloadnsxiv-8f4af658ae484c3090dbd5b5b9b498943b3eb959.tar.zst
Refactored, new files util.[ch], C89
Diffstat (limited to 'window.c')
-rw-r--r--window.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/window.c b/window.c
index a7a1121..aa2f699 100644
--- a/window.c
+++ b/window.c
@@ -16,14 +16,14 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include <stdlib.h>
-#include <stdio.h>
#include <string.h>
#include <X11/Xutil.h>
#include <X11/cursorfont.h>
-#include "sxiv.h"
+#include "config.h"
+#include "options.h"
+#include "util.h"
#include "window.h"
static Cursor arrow;
@@ -43,7 +43,7 @@ void win_open(win_t *win) {
e = &win->env;
if (!(e->dpy = XOpenDisplay(NULL)))
- DIE("could not open display");
+ die("could not open display");
e->scr = DefaultScreen(e->dpy);
e->scrw = DisplayWidth(e->dpy, e->scr);
@@ -54,7 +54,7 @@ void win_open(win_t *win) {
if (!XAllocNamedColor(e->dpy, DefaultColormap(e->dpy, e->scr), BG_COLOR,
&bgcol, &bgcol))
- DIE("could not allocate color: %s", BG_COLOR);
+ die("could not allocate color: %s", BG_COLOR);
win->bgcol = bgcol.pixel;
win->pm = 0;
@@ -88,7 +88,7 @@ void win_open(win_t *win) {
win->x, win->y, win->w, win->h, 0,
e->depth, InputOutput, e->vis, 0, None);
if (win->xwin == None)
- DIE("could not create window");
+ die("could not create window");
XSelectInput(e->dpy, win->xwin, StructureNotifyMask | KeyPressMask |
ButtonPressMask | ButtonReleaseMask | Button2MotionMask);