From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#72254: 29.4; Cannot yank media when image come from Gnome-shell screenshot Date: Tue, 23 Jul 2024 14:26:38 +0200 Message-ID: <87o76o9tvl.fsf@gmail.com> References: <87y15sqstb.fsf@k-7.ch> <87wmlc9wvz.fsf@gmail.com> <87plr4qpqy.fsf@k-7.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39524"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 72254@debbugs.gnu.org To: =?UTF-8?Q?S=C3=A9bastien?= Gendre Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 23 14:28:31 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sWEd5-000A65-5l for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Jul 2024 14:28:31 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWEcc-0005bN-GR; Tue, 23 Jul 2024 08:28:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sWEcX-0005ay-M6 for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2024 08:27:58 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sWEcX-0006LW-Do for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2024 08:27:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sWEcb-0005NV-Pk for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2024 08:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Jul 2024 12:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72254 X-GNU-PR-Package: emacs Original-Received: via spool by 72254-submit@debbugs.gnu.org id=B72254.172173767320659 (code B ref 72254); Tue, 23 Jul 2024 12:28:01 +0000 Original-Received: (at 72254) by debbugs.gnu.org; 23 Jul 2024 12:27:53 +0000 Original-Received: from localhost ([127.0.0.1]:59422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWEcS-0005N9-I7 for submit@debbugs.gnu.org; Tue, 23 Jul 2024 08:27:52 -0400 Original-Received: from mail-wm1-f54.google.com ([209.85.128.54]:58487) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWEcQ-0005Mv-Lp for 72254@debbugs.gnu.org; Tue, 23 Jul 2024 08:27:51 -0400 Original-Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-427cede1e86so39143885e9.0 for <72254@debbugs.gnu.org>; Tue, 23 Jul 2024 05:27:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721737600; x=1722342400; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=9vdjc3+agyIIEmin3vxDaaBNxBAeW+ZxbtZ761jvp+M=; b=AL2iesBgpf4kuil/MiRDIllNnPt0wbQBwamPkHoD2oewerksVYrJafFlqdbSKECXNw 14XQZiZYsMyYVWtfKPpl2KwkMyPh/K+edyV3c9u3Q4udEFIL0R1VeKfyjugRpAzs+mqg ziJDG5tPE5ijxvOFMDlZUjgdylK0C/nzSOy/E6OcxOCyb5xXtiJcqcjT+/mtOqWEt0K8 cXGLYyRSRwIoL8MaCH0LUC/NXj4Is9tL1og3gTAhhY7nAsy4cS/daBk7YrTD4lQEhKav 5KXLNrkXGw2gRoGmj6TisS8yKbLNfs6GUfxlRoAocdG5Huyc7A965jCgaizGAGFNAC+B GSZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721737600; x=1722342400; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9vdjc3+agyIIEmin3vxDaaBNxBAeW+ZxbtZ761jvp+M=; b=L+wqnz+PelqJpqWJiUkBM2gOom9I6hauaNuAdNyAekZRxIPFI0ATUgssJ5SUtj2LEf GZyCTY5YQEIRVdG2WNaNGdqi9jboYOVvWjuqmo/L6+dHKlVVedyV/OEXB5JnN3E/Ix45 IQZWW//KnjJ+4Ju5/kvu9J8M4oBo4usVzPcBYHIXY8gtUvWfnmL76uu+DztvVu3700Lk SS5p/PhhutEH888IxPVBnNQMozxNBZ9o/lLjckrWBbuCMxm2oBPLs057O0jUdOjqahX1 W4gHEcARAXI6ST1SfwN2vyP6aGgF29D3fhC/jKL6jMaqW07ZiiDOfEpm5O5WEeOEA3X6 wP8w== X-Gm-Message-State: AOJu0YxB6s43iZynzIztUgTN2mfSpb7kAu3cGvLDzvrMmKXpUoy2Xfyo SUaLe8dthYsgP0aR46TBPqA2N9y4iggjD25Syryge1cvTLe4w1bt X-Google-Smtp-Source: AGHT+IGtNyF+apVk5uJBJ2pgATQHrl4hFzlXldWTgn3ofQx90jjfokn0Xm7JTGKKZwFAcvw96TDNOA== X-Received: by 2002:a5d:6dc8:0:b0:368:7f59:a9f2 with SMTP id ffacd0b85a97d-369bae23a52mr6544331f8f.10.1721737600091; Tue, 23 Jul 2024 05:26:40 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-368786847e6sm11431534f8f.18.2024.07.23.05.26.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jul 2024 05:26:39 -0700 (PDT) In-Reply-To: <87plr4qpqy.fsf@k-7.ch> ("=?UTF-8?Q?S=C3=A9bastien?= Gendre"'s message of "Tue, 23 Jul 2024 14:03:49 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289162 Archived-At: >>>>> On Tue, 23 Jul 2024 14:03:49 +0200, S=C3=A9bastien Gendre said: S=C3=A9bastien> Robert Pluim writes: >> If instead of running `yank-media' at this point, what happens if you >> evaluate: >>=20 >> (gui-get-selection 'CLIPBOARD 'TARGETS) S=C3=A9bastien> If I evaluate this, I get the result: S=C3=A9bastien> image/png Hmm, that=CA=BCs 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)) =20 +(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-even= t) Robert --=20