Fix compiler warnings
This commit is contained in:
parent
78dfc1f940
commit
85b13ce941
2 changed files with 4 additions and 3 deletions
|
|
@ -1065,14 +1065,14 @@ drag_notify(Window *w, DragNotifyType type) {
|
|||
if (strcmp(ds.items[i].mime_type, global_state.drag_source.accepted_mime_type) == 0) {
|
||||
sz += snprintf(buf + sz, sizeof(buf) - sz, "y=%zu", i); break;
|
||||
}
|
||||
}
|
||||
} break;
|
||||
case DRAG_NOTIFY_ACTION_CHANGED:
|
||||
switch (global_state.drag_source.action) {
|
||||
case GLFW_DRAG_OPERATION_MOVE:
|
||||
sz += snprintf(buf + sz, sizeof(buf) - sz, "o=2"); break;
|
||||
default:
|
||||
sz += snprintf(buf + sz, sizeof(buf) - sz, "o=1"); break;
|
||||
}
|
||||
} break;
|
||||
case DRAG_NOTIFY_DROPPED: break;
|
||||
case DRAG_NOTIFY_FINISHED:
|
||||
sz += snprintf(buf + sz, sizeof(buf) - sz, "y=%d", global_state.drag_source.was_canceled ? 1 : 0); break;
|
||||
|
|
|
|||
|
|
@ -1115,8 +1115,9 @@ drag_source_callback(GLFWwindow *window UNUSED, GLFWDragEvent *ev) {
|
|||
if (is_client_drag) drag_notify(w, DRAG_NOTIFY_ACCEPTED);
|
||||
break;
|
||||
case GLFW_DRAG_ACTION_CHANGED:
|
||||
ds.action = ev->action; break;
|
||||
ds.action = ev->action;
|
||||
if (is_client_drag) drag_notify(w, DRAG_NOTIFY_ACTION_CHANGED);
|
||||
break;
|
||||
case GLFW_DRAG_DROPPED:
|
||||
ds.was_dropped = true;
|
||||
// On Wayland, we cant trust the value of ev->action as it is zero
|
||||
|
|
|
|||
Loading…
Reference in a new issue