delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2026/02/25/00:12:00

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 61P5BxwB266203
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 61P5BxwB266203
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=C8ZQviuK
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AEEB14BA23E6
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1771996318;
bh=9wiJpOVOXlb94WXerTmJeS5zT/Y1JDFY4Geargc+tdA=;
h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=C8ZQviuK+2XylJKr2/9TISByytXxgaw8yELn6PY2u7F650jFRynWxERdRYHUm2T/H
a7ZFzjGNuqshoeFU/tqK+TbqtkzN50UbJwdTaGWfSjMJlPlFYc8kyz/JWiuiV3Zqqp
QJRGUGgURySaZEqmqeMTmfXoZGlZu/KA6sl3G/GE=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D2A4A4BA23DB
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D2A4A4BA23DB
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771996295; cv=none;
b=A7Ar9ZMGjTJekXuuyK8bK7s86FoZHjhmulWf7dUISChEYNZd1rHDm4g0B+jo01icnpPmx+p7qr6glxP2EL4tWG/6Z/IJMRNARG6cRfGnIvPTfnmjuhOMQrhP9y+rijm2kY3+MENgy2MWS5FNeCE7s5ugU69G3UJPW11XOdZFg4w=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1771996295; c=relaxed/simple;
bh=+Du9fmkNCrJvIvbPXhz0AbElOfF755BAL8pMtUNbcc4=;
h=Date:From:To:Subject:Message-Id:Mime-Version:DKIM-Signature;
b=Z1SU0pOcdWA7x6zM2hNRCEU8sy6p4PrN22tBRSxGbUzpdpagwjYZ2JekW7yp4liqxBa9Wt9kDPR491TQHtrsKiPoPOd6cnw55hggHzdr5V2x1JnYWLPKNXHV7Q80qMPYburzwBy4aw1QCUlfmD8RaJmc4cguC2gUg2cgND/iFYE=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D2A4A4BA23DB
Date: Wed, 25 Feb 2026 14:11:30 +0900
To: cygwin AT cygwin DOT com
Subject: Re: General clipboard issue on cygwin (mintty, putclip, getclip,
/dev/clipboard)
Message-Id: <20260225141130.b0a8230af4e4b032e8b4899e@nifty.ne.jp>
In-Reply-To: <26acff9e-bdd8-4b2e-9fbd-c40e03093b3b@towo.net>
References: <20260224103628 DOT fdbd7396311092795834c24f AT nifty DOT ne DOT jp>
<26acff9e-bdd8-4b2e-9fbd-c40e03093b3b AT towo DOT net>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Takashi Yano via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

Hi Thomas,

On Wed, 25 Feb 2026 05:18:34 +0100
Thomas Wolff wrote:
> Am 24.02.2026 um 02:36 schrieb Takashi Yano:
> > Hi,
> >
> > I encountered a clipboard issue common to cygwin.
> >
> > Affected components:
> > /dev/clipboard, putclip/getclip, mintty
> >
> > The issue:
> > If the clipbard is opened by `OpenClipboard(NULL)`, occasionally
> > SetClipboardData() and GetClipboardData() fails with
> > ERROR_CLIPBOARD_NOT_OPEN.
> >
> > When UltraVNC Viewer (https://uvnc.com/) is opened, this issue
> > happens with a very high probability (> ~90%).
> >
> > $ echo AAAA > /dev/clipboard
> > echo: write error: Permission denied
> >
> > On mintty, text selection by mouse and clicking center button
> > fails at the first attempt.
> According to Windows docs, OpenClipboard(0) would make SetClipboardData 
> fail. There is no such statement about reading from the clipboard.
> Accordingly, mintty calls OpenClipbard(wnd) before writing to the 
> clipboard and (0) only before pasting. Also I'm not aware pasting ever 
> fails for me. But if there is a chance to fail, I'll add the (wnd) to 
> both other calls.

Thanks. That's fine.

> About the cygwin patch, could perhaps GetDesktopWindow help?

I guess, I confirmed GetDesktopWindow() normally works.
However, unfortunately, it does not work in ssh session
even though it returns non-zero HWND.

-- 
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019