From caf9cb2df270cc108c652a7b53746f975af2b84c Mon Sep 17 00:00:00 2001 From: der richter Date: Sat, 12 Sep 2026 21:45:57 +0200 Subject: [PATCH] input/dnd: read initial enabled state of input-builtin-drag-and-drop drag and drop is enabled by default in the options, but disabled in the dnd handling in code before the initial property change event was dispatched. leading to ignored dropped-files events when dispatched too early. Fixes #17921 --- input/dnd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/input/dnd.c b/input/dnd.c index b03b2bb486..22fecf1c7c 100644 --- a/input/dnd.c +++ b/input/dnd.c @@ -114,6 +114,10 @@ static MP_THREAD_VOID mpv_event_loop_fn(void *arg) mpv_observe_property(mpv, 0, "dropped-files", MPV_FORMAT_NODE); mpv_observe_property(mpv, 0, "input-builtin-drag-and-drop", MPV_FORMAT_FLAG); + int enabled_flag; + if (mpv_get_property(mpv, "input-builtin-drag-and-drop", MPV_FORMAT_FLAG, &enabled_flag) == MPV_ERROR_SUCCESS) + enabled = enabled_flag; + while (1) { mpv_event *event = mpv_wait_event(mpv, -1); if (event->event_id == MPV_EVENT_SHUTDOWN)