]> git.eshelyaron.com Git - emacs.git/commitdiff
Handle dropping text/uri-list on Haiku
authorPo Lu <luangruo@yahoo.com>
Thu, 2 Jun 2022 07:05:21 +0000 (07:05 +0000)
committerPo Lu <luangruo@yahoo.com>
Thu, 2 Jun 2022 07:05:21 +0000 (07:05 +0000)
* lisp/term/haiku-win.el (window-system-initialization): Remove
extra whitespace.
(haiku-drag-and-drop): Handle "text/uri-list".

lisp/term/haiku-win.el

index 2a31dd38c8145e17697dc22e7bde5486d89b82db..2fa27ed08afd0e395f5f3957bc3cdbdf94a417c6 100644 (file)
@@ -185,7 +185,6 @@ The resources should be a list of strings in COMMAND-LINE-RESOURCES."
   "Set up the window system.  WINDOW-SYSTEM must be HAIKU.
 DISPLAY may be set to the name of a display that will be initialized."
   (cl-assert (not haiku-initialized))
-
   (create-default-fontset)
   (when x-command-line-resources
     (haiku--handle-x-command-line-resources
@@ -307,6 +306,11 @@ or a pair of markers) and turns it into a file system reference."
           (dolist (filename (cddr (assoc "refs" string)))
             (dnd-handle-one-url window 'private
                                 (concat "file:" filename)))))
+       ((assoc "text/uri-list" string)
+        (dolist (text (cddr (assoc "text/uri-list" string)))
+          (let ((uri-list (split-string text "[\0\r\n]" t)))
+            (dolist (bf uri-list)
+              (dnd-handle-one-url window 'private bf)))))
        ((assoc "text/plain" string)
         (with-selected-window window
           (raise-frame)