diff --git a/glfw/wl_window.c b/glfw/wl_window.c index 37420bc17..04ef7cb08 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -2510,7 +2510,7 @@ static void handle_primary_selection_offer(void *data UNUSED, struct zwp_primary // Helper function to update drop state from callback results static void -update_drop_state(_GLFWWaylandDataOffer *d, _GLFWwindow* window, size_t accepted_count) { +update_drop_state(_GLFWWaylandDataOffer *d, _GLFWwindow* window, const size_t accepted_count) { d->copy_mimes_count = accepted_count; bool accepted = accepted_count > 0; bool acceptance_changed = (accepted != d->drag_accepted); diff --git a/kitty/glfw.c b/kitty/glfw.c index 54f957543..12405d340 100644 --- a/kitty/glfw.c +++ b/kitty/glfw.c @@ -810,10 +810,6 @@ drop_dest_callback(GLFWwindow *window, GLFWDropEvent *ev) { is_client_drop = !is_kitty_ui_drag && wid && w && w->drop.wanted; global_state.drop_dest.allowed_ops = ev->operation.source_actions; if (is_client_drop) { - if (!w->drop.initialized) { - w->drop.initialized = true; - w->drop.accepted_operation = GLFW_DRAG_OPERATION_NONE; - } drop_move_on_child(w, ev->mimes, ev->num_mimes, false); ev->num_mimes = drop_update_mimes(w, ev->mimes, ev->num_mimes); ev->operation.allowed = w->drop.accepted_operation; diff --git a/kitty/state.h b/kitty/state.h index 555b31c9d..ce0307e70 100644 --- a/kitty/state.h +++ b/kitty/state.h @@ -290,7 +290,7 @@ typedef struct Window { bool is_hovering; } scrollbar; struct { - bool wanted, hovered, dropped, is_remote_client, initialized; + bool wanted, hovered, dropped, is_remote_client; uint32_t client_id; char *registered_mimes; char *uri_list; size_t uri_list_sz;