summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2017-10-05 13:49:11 +0200
committerBert Münnich <ber.t@posteo.de>2017-10-05 13:49:11 +0200
commitee908ca0a197ac579ab8abc5695c9ce421a96a21 (patch)
tree953db4e539ff8b31fcae566d3c58af1c42c0b49b
parentd81442f55dd1414fd23617044ea157de8d9f1baa (diff)
downloadnsxiv-ee908ca0a197ac579ab8abc5695c9ce421a96a21.tar.zst
Simplify cursor reset in image mode
No need to give cursor name. reset_cursor() is now the only place to decide what cursor to fall back to.
-rw-r--r--commands.c2
-rw-r--r--main.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/commands.c b/commands.c
index 01e7878..522413d 100644
--- a/commands.c
+++ b/commands.c
@@ -351,8 +351,8 @@ bool ci_drag(arg_t _)
x = e.xmotion.x;
y = e.xmotion.y;
}
- win_set_cursor(&win, CURSOR_ARROW);
set_timeout(reset_cursor, TO_CURSOR_HIDE, true);
+ reset_cursor();
return true;
}
diff --git a/main.c b/main.c
index f7e5762..5a828a9 100644
--- a/main.c
+++ b/main.c
@@ -622,8 +622,8 @@ void on_buttonpress(XButtonEvent *bev)
static Time firstclick;
if (mode == MODE_IMAGE) {
- win_set_cursor(&win, CURSOR_ARROW);
set_timeout(reset_cursor, TO_CURSOR_HIDE, true);
+ reset_cursor();
for (i = 0; i < ARRLEN(buttons); i++) {
if (buttons[i].button == bev->button &&
@@ -783,8 +783,8 @@ void run(void)
break;
case MotionNotify:
if (mode == MODE_IMAGE) {
- win_set_cursor(&win, CURSOR_ARROW);
set_timeout(reset_cursor, TO_CURSOR_HIDE, true);
+ reset_cursor();
}
break;
}