diff options
| author | Po Lu | 2022-04-01 03:59:38 +0000 |
|---|---|---|
| committer | Po Lu | 2022-04-01 03:59:38 +0000 |
| commit | f8be5eb97fe938483d64691e1ccc3a276f7da3db (patch) | |
| tree | 3a02e560f0da77e66fed8dbae47965b7e71865d5 /src | |
| parent | 52c31f9e13c349609091620ecf56ac42747c1652 (diff) | |
| download | emacs-f8be5eb97fe938483d64691e1ccc3a276f7da3db.tar.gz emacs-f8be5eb97fe938483d64691e1ccc3a276f7da3db.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/haikuselect.c | 3 | ||||
| -rw-r--r-- | src/haikuterm.h | 1 | ||||
| -rw-r--r-- | src/xdisp.c | 2 |
3 files changed, 1 insertions, 5 deletions
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 <https://www.gnu.org/licenses/>. */ | |||
| 27 | 27 | ||
| 28 | #include <stdlib.h> | 28 | #include <stdlib.h> |
| 29 | 29 | ||
| 30 | bool haiku_dnd_in_progress; | ||
| 31 | static void haiku_lisp_to_message (Lisp_Object, void *); | 30 | static void haiku_lisp_to_message (Lisp_Object, void *); |
| 32 | 31 | ||
| 33 | DEFUN ("haiku-selection-data", Fhaiku_selection_data, Shaiku_selection_data, | 32 | DEFUN ("haiku-selection-data", Fhaiku_selection_data, Shaiku_selection_data, |
| @@ -728,7 +727,6 @@ static void | |||
| 728 | haiku_unwind_drag_message (void *message) | 727 | haiku_unwind_drag_message (void *message) |
| 729 | { | 728 | { |
| 730 | BMessage_delete (message); | 729 | BMessage_delete (message); |
| 731 | haiku_dnd_in_progress = false; | ||
| 732 | } | 730 | } |
| 733 | 731 | ||
| 734 | DEFUN ("haiku-drag-message", Fhaiku_drag_message, Shaiku_drag_message, | 732 | DEFUN ("haiku-drag-message", Fhaiku_drag_message, Shaiku_drag_message, |
| @@ -776,7 +774,6 @@ ignored if it is dropped on top of FRAME. */) | |||
| 776 | if (!FRAME_VISIBLE_P (f)) | 774 | if (!FRAME_VISIBLE_P (f)) |
| 777 | error ("Frame is invisible"); | 775 | error ("Frame is invisible"); |
| 778 | 776 | ||
| 779 | haiku_dnd_in_progress = true; | ||
| 780 | be_message = be_create_simple_message (); | 777 | be_message = be_create_simple_message (); |
| 781 | 778 | ||
| 782 | record_unwind_protect_ptr (haiku_unwind_drag_message, be_message); | 779 | 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 <https://www.gnu.org/licenses/>. */ | |||
| 35 | #define HAVE_CHAR_CACHE_MAX 65535 | 35 | #define HAVE_CHAR_CACHE_MAX 65535 |
| 36 | 36 | ||
| 37 | extern int popup_activated_p; | 37 | extern int popup_activated_p; |
| 38 | extern bool haiku_dnd_in_progress; | ||
| 39 | 38 | ||
| 40 | extern void be_app_quit (void); | 39 | extern void be_app_quit (void); |
| 41 | 40 | ||
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) | |||
| 34247 | #endif | 34247 | #endif |
| 34248 | 34248 | ||
| 34249 | #if defined (HAVE_HAIKU) | 34249 | #if defined (HAVE_HAIKU) |
| 34250 | if (popup_activated_p || haiku_dnd_in_progress) | 34250 | if (popup_activated_p) |
| 34251 | return; | 34251 | return; |
| 34252 | #endif | 34252 | #endif |
| 34253 | 34253 | ||