summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-01-20 01:01:52 +0000
committerPo Lu <luangruo@yahoo.com>2022-01-20 01:05:53 +0000
commitd2a23c7441dda2f0650b78d4bb9e2340a02b66bc (patch)
tree4725c1ffaa5f67a162809d883aded21719f5225d /lisp
parent9396b7d0b425a114eb6e8695c439be3d30490f98 (diff)
downloademacs-d2a23c7441dda2f0650b78d4bb9e2340a02b66bc.tar.gz
emacs-d2a23c7441dda2f0650b78d4bb9e2340a02b66bc.tar.bz2
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')
-rw-r--r--lisp/term/haiku-win.el6
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 @@
(declare-function haiku-selection-data "haikuselect.c")
(declare-function haiku-selection-put "haikuselect.c")
(declare-function haiku-selection-targets "haikuselect.c")
+(declare-function haiku-selection-owner-p "haikuselect.c")
(declare-function haiku-put-resource "haikufns.c")
(defun haiku--handle-x-command-line-resources (command-line-resources)
@@ -105,9 +106,8 @@ If TYPE is nil, return \"text/plain\"."
&context (window-system haiku))
(haiku-selection-data selection "text/plain"))
-(cl-defmethod gui-backend-selection-owner-p (_
- &context (window-system haiku))
- t)
+(cl-defmethod gui-backend-selection-owner-p (selection &context (window-system haiku))
+ (haiku-selection-owner-p selection))
(declare-function haiku-read-file-name "haikufns.c")