diff options
author | Po Lu <luangruo@yahoo.com> | 2022-07-07 02:48:19 +0000 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-07-07 02:48:19 +0000 |
commit | fd016ea99724f7abedfddbb470ab96ece6ddf4ae (patch) | |
tree | e874e42b2a69d1c22411e2a78c1fa9d2a4270284 /src/haikuterm.c | |
parent | 8575962d46d1f1d08836bf00cb74ccd344953bcb (diff) | |
download | emacs-fd016ea99724f7abedfddbb470ab96ece6ddf4ae.tar.gz |
Port `x-lost-selection-functions' to Haiku
* src/haiku_io.c (haiku_len): Add `CLIPBOARD_CHANGED_EVENT'.
* src/haiku_select.cc (be_update_clipboard_count): Set ownership
flags.
(be_handle_clipboard_changed_message):
(be_start_watching_selection): New functions.
* src/haiku_support.cc (class Emacs): Handle
B_CLIPBOARD_CHANGED.
* src/haiku_support.h (enum haiku_event_type): New event
`CLIPBOARD_CHANGED_EVENT'.
(struct haiku_clipboard_changed_event): New struct.
* src/haikuselect.c (haiku_handle_selection_clear)
(haiku_selection_disowned, haiku_start_watching_selections): New
functions.
(syms_of_haikuselect): New defsym and defvar.
* src/haikuselect.h: Update prototypes.
* src/haikuterm.c (haiku_read_socket): Handle selection events.
(haiku_term_init): Start watching selections.
* src/haikuterm.h: Update prototypes.
* src/keyboard.c (kbd_buffer_get_event, process_special_events)
(mark_kboards): Handle SELECTON_CLEAR_EVENTs correctly on Haiku.
Diffstat (limited to 'src/haikuterm.c')
-rw-r--r-- | src/haikuterm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/haikuterm.c b/src/haikuterm.c index d7247c99e08..bcb3af0e2c3 100644 --- a/src/haikuterm.c +++ b/src/haikuterm.c @@ -32,6 +32,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ #include "haiku_support.h" #include "thread.h" #include "window.h" +#include "haikuselect.h" #include <math.h> #include <stdlib.h> @@ -4010,6 +4011,9 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit) inev.timestamp = b->when / 1000; break; } + case CLIPBOARD_CHANGED_EVENT: + be_handle_clipboard_changed_message (); + break; case APP_QUIT_REQUESTED_EVENT: inev.kind = SAVE_SESSION_EVENT; inev.arg = Qt; @@ -4403,6 +4407,7 @@ haiku_term_init (void) else dpyinfo->default_name = build_string ("GNU Emacs"); + haiku_start_watching_selections (); unblock_input (); return dpyinfo; |