From: Po Lu Date: Fri, 1 Apr 2022 03:59:38 +0000 (+0000) Subject: Simplify Haiku drag-and-drop implementation X-Git-Tag: emacs-29.0.90~1931^2~842 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f8be5eb97fe938483d64691e1ccc3a276f7da3db;p=emacs.git Simplify Haiku drag-and-drop implementation * lisp/term/haiku-win.el (x-begin-drag): Bind `mouse-highlight' to nil. * src/haikuselect.c (haiku_unwind_drag_message) (Fhaiku_drag_message): * src/haikuterm.h (HAVE_CHAR_CACHE_MAX): * src/xdisp.c (note_mouse_highlight): Delete `haiku_dnd_in_progress' variable. --- diff --git a/lisp/term/haiku-win.el b/lisp/term/haiku-win.el index 738cf56caaa..810feced212 100644 --- a/lisp/term/haiku-win.el +++ b/lisp/term/haiku-win.el @@ -279,6 +279,7 @@ take effect on menu items until the menu bar is updated again." (unless haiku-dnd-selection-value (error "No local value for XdndSelection")) (let ((message nil) + (mouse-highlight nil) (haiku-signal-invalid-refs nil)) (dolist (target targets) (let ((selection-converter (cdr (assoc (intern target) diff --git a/src/haikuselect.c b/src/haikuselect.c index d2582e777f1..f6199ccc1e7 100644 --- a/src/haikuselect.c +++ b/src/haikuselect.c @@ -27,7 +27,6 @@ along with GNU Emacs. If not, see . */ #include -bool haiku_dnd_in_progress; static void haiku_lisp_to_message (Lisp_Object, void *); DEFUN ("haiku-selection-data", Fhaiku_selection_data, Shaiku_selection_data, @@ -728,7 +727,6 @@ static void haiku_unwind_drag_message (void *message) { BMessage_delete (message); - haiku_dnd_in_progress = false; } DEFUN ("haiku-drag-message", Fhaiku_drag_message, Shaiku_drag_message, @@ -776,7 +774,6 @@ ignored if it is dropped on top of FRAME. */) if (!FRAME_VISIBLE_P (f)) error ("Frame is invisible"); - haiku_dnd_in_progress = true; be_message = be_create_simple_message (); record_unwind_protect_ptr (haiku_unwind_drag_message, be_message); diff --git a/src/haikuterm.h b/src/haikuterm.h index 86abcc560c9..5f8052f0f99 100644 --- a/src/haikuterm.h +++ b/src/haikuterm.h @@ -35,7 +35,6 @@ along with GNU Emacs. If not, see . */ #define HAVE_CHAR_CACHE_MAX 65535 extern int popup_activated_p; -extern bool haiku_dnd_in_progress; extern void be_app_quit (void); diff --git a/src/xdisp.c b/src/xdisp.c index f6fe3253e98..62c8f9d4d93 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -34247,7 +34247,7 @@ note_mouse_highlight (struct frame *f, int x, int y) #endif #if defined (HAVE_HAIKU) - if (popup_activated_p || haiku_dnd_in_progress) + if (popup_activated_p) return; #endif