aboutsummaryrefslogtreecommitdiff
path: root/dwl.c
diff options
context:
space:
mode:
Diffstat (limited to 'dwl.c')
-rw-r--r--dwl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dwl.c b/dwl.c
index 5f9cbcd..fc8f7b2 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1535,7 +1535,7 @@ motionnotify(uint32_t time)
/* Find the client under the pointer and send the event along. */
xytonode(cursor->x, cursor->y, &surface, &c, NULL, &sx, &sy);
- if (cursor_mode == CurPressed) {
+ if (cursor_mode == CurPressed && !seat->drag) {
surface = seat->pointer_state.focused_surface;
c = client_from_wlr_surface(surface);
sx = c ? cursor->x - c->geom.x : 0;
@@ -1545,7 +1545,7 @@ motionnotify(uint32_t time)
/* If there's no client surface under the cursor, set the cursor image to a
* default. This is what makes the cursor image appear when you move it
* off of a client or over its border. */
- if (!surface && (!cursor_image || strcmp(cursor_image, "left_ptr")))
+ if (!surface && !seat->drag && (!cursor_image || strcmp(cursor_image, "left_ptr")))
wlr_xcursor_manager_set_cursor_image(cursor_mgr, (cursor_image = "left_ptr"), cursor);
pointerfocus(c, surface, sx, sy, time);
@@ -1906,7 +1906,7 @@ setcursor(struct wl_listener *listener, void *data)
/* If we're "grabbing" the cursor, don't use the client's image, we will
* restore it after "grabbing" sending a leave event, followed by a enter
* event, which will result in the client requesting set the cursor surface */
- if (cursor_mode != CurNormal)
+ if (cursor_mode != CurNormal && cursor_mode != CurPressed)
return;
cursor_image = NULL;
/* This can be sent by any client, so we check to make sure this one is