[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#72254: 29.4; Cannot yank media when image come from Gnome-shell scre
From: |
Robert Pluim |
Subject: |
bug#72254: 29.4; Cannot yank media when image come from Gnome-shell screenshot |
Date: |
Tue, 23 Jul 2024 14:26:38 +0200 |
>>>>> On Tue, 23 Jul 2024 14:03:49 +0200, Sébastien Gendre <seb@k-7.ch> said:
Sébastien> Robert Pluim <rpluim@gmail.com> writes:
>> If instead of running `yank-media' at this point, what happens if you
>> evaluate:
>>
>> (gui-get-selection 'CLIPBOARD 'TARGETS)
Sébastien> If I evaluate this, I get the result:
Sébastien> image/png
Hmm, thatʼs supposed to be a vector, not a symbol. Could you try the
following patch and see if it improves things?
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index ced2750202b..cc952672580 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -1370,6 +1370,16 @@ gui-backend-get-selection
(x-get-selection-internal selection-symbol target-type
time-stamp terminal))
+(cl-defmethod gui-backend-get-selection ((selection-symbol (eql 'CLIPBOARD))
+ (target-type (eql 'TARGETS))
+ &context (window-system x)
+ &optional time-stamp terminal)
+ (let ((sel (x-get-selection-internal selection-symbol target-type
+ time-stamp terminal)))
+ (if (vectorp sel)
+ sel
+ (vector sel))))
+
;; Initiate drag and drop
(add-hook 'after-make-frame-functions 'x-dnd-init-frame)
(define-key special-event-map [drag-n-drop] 'x-dnd-handle-drag-n-drop-event)
Robert
--
- bug#72254: 29.4; Cannot yank media when image come from Gnome-shell screenshot, Sébastien Gendre, 2024/07/23
- bug#72254: 29.4; Cannot yank media when image come from Gnome-shell screenshot, Robert Pluim, 2024/07/23
- bug#72254: 29.4; Cannot yank media when image come from Gnome-shell screenshot, Eli Zaretskii, 2024/07/23
- Message not available
- bug#72254: 29.4; Cannot yank media when image come from Gnome-shell screenshot,
Robert Pluim <=
- Message not available
- bug#72254: 29.4; Cannot yank media when image come from Gnome-shell screenshot, Robert Pluim, 2024/07/23
- Message not available
- bug#72254: 29.4; Cannot yank media when image come from Gnome-shell screenshot, Robert Pluim, 2024/07/23
- Message not available
- bug#72254: 29.4; Cannot yank media when image come from Gnome-shell screenshot, Robert Pluim, 2024/07/23
- bug#72254: 29.4; Cannot yank media when image come from Gnome-shell screenshot, Visuwesh, 2024/07/23
- Message not available
- bug#72254: 29.4; Cannot yank media when image come from Gnome-shell screenshot, Robert Pluim, 2024/07/23
- Message not available
- bug#72254: 29.4; Cannot yank media when image come from Gnome-shell screenshot, Robert Pluim, 2024/07/24
- bug#72254: 29.4; Cannot yank media when image come from Gnome-shell screenshot, Po Lu, 2024/07/24
- bug#72254: 29.4; Cannot yank media when image come from Gnome-shell screenshot, Robert Pluim, 2024/07/24
- bug#72254: 29.4; Cannot yank media when image come from Gnome-shell screenshot, Po Lu, 2024/07/24
- bug#72254: 29.4; Cannot yank media when image come from Gnome-shell screenshot, Robert Pluim, 2024/07/24