mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-16 22:40:53 +08:00
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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user