summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-03-15 22:43:06 +0100
committerwm4 <wm4@nowhere>2016-03-15 22:43:06 +0100
commitcd706658034e67208705a9baa886ebc018de9326 (patch)
treef8ba8a78be2b82580cff0d76e493f51f074ed711 /input
parent7e75e2a5dc1719326ec46265d67205336b975eec (diff)
downloadmpv-cd706658034e67208705a9baa886ebc018de9326.tar.bz2
mpv-cd706658034e67208705a9baa886ebc018de9326.tar.xz
input: accept plain text for drag&drop
This will work for the X11 backend. It could be easily extended to Wayland too, maybe.
Diffstat (limited to 'input')
-rw-r--r--input/event.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/input/event.c b/input/event.c
index a15bc11919..188e800699 100644
--- a/input/event.c
+++ b/input/event.c
@@ -82,5 +82,12 @@ int mp_event_get_mime_type_score(struct input_ctx *ictx, const char *mime_type)
// X11 and Wayland file list format.
if (strcmp(mime_type, "text/uri-list") == 0)
return 10;
+ // Just text; treat it the same for convenience.
+ if (strcmp(mime_type, "text/plain;charset=utf-8") == 0)
+ return 5;
+ if (strcmp(mime_type, "text/plain") == 0)
+ return 4;
+ if (strcmp(mime_type, "text") == 0)
+ return 0;
return -1;
}