aboutsummaryrefslogtreecommitdiff
path: root/window-copy.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2019-05-15 22:50:42 +0100
committerThomas Adam <thomas@xteddy.org>2019-05-15 22:50:42 +0100
commitd9ac0e7576496982045b6012c4f1ed70a3de248d (patch)
tree7acc16f91bf06c1222a71160296287343251fe0a /window-copy.c
parentdcf0bc2cc9293ba625fb421c32a906b47fae8e29 (diff)
parentcf4566b47b184abbb28e1cf4a05df6ce0ce2da96 (diff)
downloadrtmux-d9ac0e7576496982045b6012c4f1ed70a3de248d.tar.gz
rtmux-d9ac0e7576496982045b6012c4f1ed70a3de248d.tar.bz2
rtmux-d9ac0e7576496982045b6012c4f1ed70a3de248d.zip
Merge branch 'obsd-master'
Diffstat (limited to 'window-copy.c')
-rw-r--r--window-copy.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/window-copy.c b/window-copy.c
index 84bef8e4..d4985062 100644
--- a/window-copy.c
+++ b/window-copy.c
@@ -3477,7 +3477,9 @@ window_copy_move_mouse(struct mouse_event *m)
if (wp == NULL)
return;
wme = TAILQ_FIRST(&wp->modes);
- if (wme == NULL || wme->mode != &window_copy_mode)
+ if (wme == NULL)
+ return;
+ if (wme->mode != &window_copy_mode && wme->mode != &window_view_mode)
return;
if (cmd_mouse_at(wp, m, &x, &y, 0) != 0)
@@ -3500,7 +3502,9 @@ window_copy_start_drag(struct client *c, struct mouse_event *m)
if (wp == NULL)
return;
wme = TAILQ_FIRST(&wp->modes);
- if (wme == NULL || wme->mode != &window_copy_mode)
+ if (wme == NULL)
+ return;
+ if (wme->mode != &window_copy_mode && wme->mode != &window_view_mode)
return;
if (cmd_mouse_at(wp, m, &x, &y, 1) != 0)
@@ -3534,7 +3538,9 @@ window_copy_drag_update(struct client *c, struct mouse_event *m)
if (wp == NULL)
return;
wme = TAILQ_FIRST(&wp->modes);
- if (wme == NULL || wme->mode != &window_copy_mode)
+ if (wme == NULL)
+ return;
+ if (wme->mode != &window_copy_mode && wme->mode != &window_view_mode)
return;
data = wme->data;
@@ -3573,7 +3579,9 @@ window_copy_drag_release(struct client *c, struct mouse_event *m)
if (wp == NULL)
return;
wme = TAILQ_FIRST(&wp->modes);
- if (wme == NULL || wme->mode != &window_copy_mode)
+ if (wme == NULL)
+ return;
+ if (wme->mode != &window_copy_mode && wme->mode != &window_view_mode)
return;
data = wme->data;