diff options
| author | Po Lu | 2022-01-20 01:01:52 +0000 |
|---|---|---|
| committer | Po Lu | 2022-01-20 01:05:53 +0000 |
| commit | d2a23c7441dda2f0650b78d4bb9e2340a02b66bc (patch) | |
| tree | 4725c1ffaa5f67a162809d883aded21719f5225d /lisp/term | |
| parent | 9396b7d0b425a114eb6e8695c439be3d30490f98 (diff) | |
| download | emacs-d2a23c7441dda2f0650b78d4bb9e2340a02b66bc.tar.gz emacs-d2a23c7441dda2f0650b78d4bb9e2340a02b66bc.zip | |
Implement selection ownership on Haiku
* lisp/term/haiku-win.el (haiku-selection-owner-p): New
declaration.
(gui-backend-selection-owner-p): Implement using newly exposed
primitive.
* src/haiku_select.cc
(count_clipboard, count_primary, count_secondary): New
variables for tracking selection ownership.
(BClipboard_set_system_data):
(BClipboard_set_primary_selection_data):
(BClipboard_set_secondary_selection_data): Set ownership
variables.
(BClipboard_owns_clipboard):
(BClipboard_owns_primary):
(BClipboard_owns_secondary): New functions.
* src/haikuselect.c (Fhaiku_selection_owner_p): New function.
(syms_of_haikuselect): Define new subr.
* src/haikuselect.h: New prototypes.
Diffstat (limited to 'lisp/term')
| -rw-r--r-- | lisp/term/haiku-win.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/term/haiku-win.el b/lisp/term/haiku-win.el index 739ea9fdfce..a5cde929f96 100644 --- a/lisp/term/haiku-win.el +++ b/lisp/term/haiku-win.el | |||
| @@ -50,6 +50,7 @@ | |||
| 50 | (declare-function haiku-selection-data "haikuselect.c") | 50 | (declare-function haiku-selection-data "haikuselect.c") |
| 51 | (declare-function haiku-selection-put "haikuselect.c") | 51 | (declare-function haiku-selection-put "haikuselect.c") |
| 52 | (declare-function haiku-selection-targets "haikuselect.c") | 52 | (declare-function haiku-selection-targets "haikuselect.c") |
| 53 | (declare-function haiku-selection-owner-p "haikuselect.c") | ||
| 53 | (declare-function haiku-put-resource "haikufns.c") | 54 | (declare-function haiku-put-resource "haikufns.c") |
| 54 | 55 | ||
| 55 | (defun haiku--handle-x-command-line-resources (command-line-resources) | 56 | (defun haiku--handle-x-command-line-resources (command-line-resources) |
| @@ -105,9 +106,8 @@ If TYPE is nil, return \"text/plain\"." | |||
| 105 | &context (window-system haiku)) | 106 | &context (window-system haiku)) |
| 106 | (haiku-selection-data selection "text/plain")) | 107 | (haiku-selection-data selection "text/plain")) |
| 107 | 108 | ||
| 108 | (cl-defmethod gui-backend-selection-owner-p (_ | 109 | (cl-defmethod gui-backend-selection-owner-p (selection &context (window-system haiku)) |
| 109 | &context (window-system haiku)) | 110 | (haiku-selection-owner-p selection)) |
| 110 | t) | ||
| 111 | 111 | ||
| 112 | (declare-function haiku-read-file-name "haikufns.c") | 112 | (declare-function haiku-read-file-name "haikufns.c") |
| 113 | 113 | ||