(interactive "e")
(let* ((string (caddr event))
(window (posn-window (event-start event))))
- (cond
- ((assoc "refs" string)
- (with-selected-window window
- (raise-frame)
- (dolist (filename (cddr (assoc "refs" string)))
- (dnd-handle-one-url window 'private
- (concat "file:" filename)))))
- ((assoc "text/plain" string)
- (with-selected-window window
- (raise-frame)
- (dolist (text (cddr (assoc "text/plain" string)))
- (goto-char (posn-point (event-start event)))
- (dnd-insert-text window 'private
- (if (multibyte-string-p text)
- text
- (decode-coding-string text 'undecided))))))
- (t (message "Don't know how to drop any of: %s" (mapcar #'car string))))))
+ (if (eq string 'lambda) ; This means the mouse moved.
+ (dnd-handle-movement (event-start event))
+ (cond
+ ((assoc "refs" string)
+ (with-selected-window window
+ (raise-frame)
+ (dolist (filename (cddr (assoc "refs" string)))
+ (dnd-handle-one-url window 'private
+ (concat "file:" filename)))))
+ ((assoc "text/plain" string)
+ (with-selected-window window
+ (raise-frame)
+ (dolist (text (cddr (assoc "text/plain" string)))
+ (goto-char (posn-point (event-start event)))
+ (dnd-insert-text window 'private
+ (if (multibyte-string-p text)
+ text
+ (decode-coding-string text 'undecided))))))
+ (t (message "Don't know how to drop any of: %s"
+ (mapcar #'car string)))))))
(define-key special-event-map [drag-n-drop]
'haiku-drag-and-drop)
struct haiku_mouse_motion_event *b = buf;
struct frame *f = haiku_mouse_or_wdesc_frame (b->window);
Mouse_HLInfo *hlinfo = &x_display_list->mouse_highlight;
+ Lisp_Object frame;
if (!f)
continue;
break;
}
- Lisp_Object frame;
XSETFRAME (frame, f);
x_display_list->last_mouse_movement_time = b->time / 1000;
&& (!NILP (focus_follows_mouse)
|| f == SELECTED_FRAME ()))
{
- inev.kind = SELECT_WINDOW_EVENT;
- inev.frame_or_window = window;
+ inev2.kind = SELECT_WINDOW_EVENT;
+ inev2.frame_or_window = window;
}
last_mouse_window = window;
if (!NILP (help_echo_string)
|| !NILP (previous_help_echo_string))
do_help = 1;
+
+ if (b->dnd_message)
+ {
+ /* It doesn't make sense to show tooltips when
+ another program is dragging stuff over us. */
+
+ do_help = -1;
+ inev.kind = DRAG_N_DROP_EVENT;
+ inev.arg = Qlambda;
+
+ XSETINT (inev.x, b->x);
+ XSETINT (inev.y, b->y);
+ XSETFRAME (inev.frame_or_window, f);
+ break;
+ }
}
if (FRAME_DIRTY_P (f))