summaryrefslogtreecommitdiffstats
path: root/window.c
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2017-10-04 18:12:27 +0200
committerBert Münnich <ber.t@posteo.de>2017-10-04 18:22:43 +0200
commite310136e02ada4862c250280034d36fbfa24fc61 (patch)
tree496db891475c1b9670ab49e5f025012d05f4b37a /window.c
parent9b6acc781e3fc2994bde60db397cfd82e2e050d1 (diff)
downloadnsxiv-e310136e02ada4862c250280034d36fbfa24fc61.tar.zst
Mouse drag translates pointer position to image area
This makes mouse panning more direct and faster.
Diffstat (limited to 'window.c')
-rw-r--r--window.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/window.c b/window.c
index c6d22d6..6ed4bfc 100644
--- a/window.c
+++ b/window.c
@@ -37,7 +37,7 @@ enum {
static Cursor carrow;
static Cursor cnone;
-static Cursor chand;
+static Cursor cdrag;
static Cursor cwatch;
static GC gc;
@@ -210,7 +210,7 @@ void win_open(win_t *win)
PointerMotionMask | StructureNotifyMask);
carrow = XCreateFontCursor(e->dpy, XC_left_ptr);
- chand = XCreateFontCursor(e->dpy, XC_fleur);
+ cdrag = XCreateFontCursor(e->dpy, XC_dotbox);
cwatch = XCreateFontCursor(e->dpy, XC_watch);
if (XAllocNamedColor(e->dpy, DefaultColormap(e->dpy, e->scr), "black",
@@ -277,7 +277,7 @@ CLEANUP void win_close(win_t *win)
{
XFreeCursor(win->env.dpy, carrow);
XFreeCursor(win->env.dpy, cnone);
- XFreeCursor(win->env.dpy, chand);
+ XFreeCursor(win->env.dpy, cdrag);
XFreeCursor(win->env.dpy, cwatch);
XFreeGC(win->env.dpy, gc);
@@ -465,8 +465,8 @@ void win_set_cursor(win_t *win, cursor_t cursor)
case CURSOR_NONE:
XDefineCursor(win->env.dpy, win->xwin, cnone);
break;
- case CURSOR_HAND:
- XDefineCursor(win->env.dpy, win->xwin, chand);
+ case CURSOR_DRAG:
+ XDefineCursor(win->env.dpy, win->xwin, cdrag);
break;
case CURSOR_WATCH:
XDefineCursor(win->env.dpy, win->xwin, cwatch);