delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/11/06/13:55:26

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E1E8C3858414
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1699296924;
bh=lE1oJIG13BpzwRLVWcgIFvGaY0rjIAmupwxw0bOcSK8=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=w50wwkT3J3qukHX2MMEBiEOHN2HjFqf+I6Fc9ldiAtB+Zz39505kvoPHnyyxyCOkH
qgiB4xSfr8aNFcj1f53HrJWnTmd4UQO1/i4JKDD97lcqfQYgpcMqtKBleI6g1GGxb7
LW7whZYOvoDIOi1yHBSPGwzUAU86ew/hWq4Tu1jU=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DB3C63858D20
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DB3C63858D20
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699296885; cv=none;
b=PZHZ3XrZ53TcM7cKK12G6VH7he8cw7QdOKHqdfJfvpkBYtAgzCbxAnBuj2k/pcCxGdiBSL9Ca+q9H10Dh94k2ExzNbxKvImCvCYA+gBgveEtgvFf3PNHil4UXkS5Q4rWlJPefMLIAwwiXaoWSeFZHRc9VqcQyEYnTwnkhrv/Yss=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1699296885; c=relaxed/simple;
bh=62bXg9vaT/E0QcTLGLu49YmnbYCVO73uWjX2vLUYI4s=;
h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From;
b=WEnm6X6R317oCaxD9MC0lAk3sL/3xpvrkoYjm2db+QmXZ56rd8SttvYFTSpH6hmwd4Hy1x/OIoq9lw7lZ8RCe0xfCdmWCb+o3s7+DEmmCaAGfPAGxKSiVzN0ffK1gTtR1SPcARAKQ8J4z7sYqiUafMlr4YgBQp+0Zg/ga4Y2cM4=
ARC-Authentication-Results: i=1; server2.sourceware.org
X-Authority-Analysis: v=2.4 cv=KJNJsXJo c=1 sm=1 tr=0 ts=65493673
a=DxHlV3/gbUaP7LOF0QAmaA==:117 a=DxHlV3/gbUaP7LOF0QAmaA==:17
a=IkcTkHD0fZMA:10 a=w_pzkKWiAAAA:8 a=-EMQBOfIoMvN1GBqOPsA:9 a=QEXdDO2ut3YA:10
a=fjqZ3bWSz-cA:10 a=sRI3_1zDfAgwuvI8zelB:22
Message-ID: <7166752f-e08e-4595-8915-d8eaec920718@Shaw.ca>
Date: Mon, 6 Nov 2023 11:54:41 -0700
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [EXT] Re: XWin copy/paste succeeds on Windows 7, crashes on
Windows 11 Enterprise.
To: cygwin AT cygwin DOT com
References: <242d35130d84418d934265782064690b AT ida DOT org>
<18fd5519-180d-4d48-95d1-994f7c5e36f5 AT dronecode DOT org DOT uk>
<474496f4a2e94e3c8ba06e1a2eaa1d75 AT ida DOT org>
Organization: Inglis
In-Reply-To: <474496f4a2e94e3c8ba06e1a2eaa1d75@ida.org>
X-CMAE-Envelope: MS4xfOWRJJSNdd+nOzNRJB0IB8gIWUW15G92e9DMOUbs1rG6XNNqu1VOGbnYITnfGnKN4Q2bZa3SnqcY6Oxj/hi7dNiiLjPdQWgP6U/chvB7vk6HRgUmnQdQ
En1jla1x8qQLKp3Y2gvgLMPSMMeSKJfRa0bOzz8wWq+BfgGvF3Xh5L9JwNtYTniZqmINKx82iiv6lRVQH1Us6x6e7fDczFskr1E=
X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,
RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
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: Brian Inglis via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Brian Inglis <Brian DOT Inglis AT Shaw DOT ca>, "Stone, Timothy M" <tstone AT ida DOT org>
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>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 3A6ItPFM030786

On 2023-11-06 11:33, Stone, Timothy M via Cygwin wrote:
>> On 03/11/2023 20:17, Stone, Timothy M via Cygwin wrote:
>>> I'm having a really hard time debugging this issue.
>>> If I use the exact same version of cygwin and XWin, exact same code,
>>> exact same Motif GUI app...
>>> I find that when I try to use copy/paste functionality in
>>> TextFieldWidgets:
>>>     *Cut/Copy/Paste works perfectly on Windows 7 Professional
>>>     *Cut/Copy/Paste does not work at all and typically crashes on
>>> Windows 11 Enterprise
>> I'm assuming this means "the X server crashes", but it's not exactly clear.
>> If that is the case, there are some instructions on generating backtraces to
>> help with debugging at [1].
>> [1] https://x.cygwin.com/devel/backtrace.html
>>> I am using an older version of cygwin for this specific test (cygwin 1.7.15
>>> and XWin 1.13.2-1), but I am having the same issue with the latest version
>>> as well.>> Any help greatly appreciated!  Seems this must be a system issue since 
>>> everything about the cygwin and XWin is exactly the same on both systems?> It's not really safe to make assumptions like this. This could be a latent
>> bug in XWin which just happens to get exposed on W11 (or that particular
>> system, even)...

> Thanks for your reply. I didn't provide enough information last time, sorry
> about that. > Let me start over, with an example and some brief code.
> Below is some simple code to bring up a shell with a TextField widget in it.
> When I initialize the TextField widget, I change the code to use 1 of the 2 listed translations:
>    translations_copypaste:  This translation table calls the built-in actions for paste-clipboard, copy-clipboard, and cut-clipboard when the familiar ctrl-c, ctrl-x, and ctrl-v are pressed.
>    translations_ignore:  This translation table always calls ignore_cut_paste() when the same keys are pressed.  This function just prints a message to the console ("Ignoring") so I know it's working.
> This is almost the entire program.  All that is missing is initializing the parent and the app_context.
> What happens is:
> On Windows 7 Professional:
> Both translation tables work as expected:
> translations_ignore: Correctly causes the text "Ignoring" to print every time ctrl-c, ctrl-x, or ctrl-v are pressed.
> translations_copypaste:  Correctly causes text in the small window to cut/paste/copy as expected and is integrated with the system clipboard.
> On Windows 11 Enterprise:
> translations_ignore: Correctly causes the text "Ignoring" to print every time ctrl-c, ctrl-x, or ctrl-v are pressed.
> translations_copypaste:  My application (not the X-Server) crashes every time ctrl-c, ctrl-x, or ctrl-v are pressed.  The X-Server seems to continue running.
> I don't know how to debug this further...
>    it seems like the translation table is working, since the "ignore" translation table works...
>    also, everything works perfectly on Windows 7 professional, so it seems like the "should"" be OK.
> Code:
> void ignore_cut_paste(Widget widget, XEvent *event, String *args, int *num_args)
> {
>    printf("Ignoring\n");
> }
> 
> void TestPaste(Widget parent)
> {
>    Widget thewin,rowcol,textarea;
>    XtActionsRec actions2;
> 
>    actions2.string = "ignore_cut_paste";
>    actions2.proc = (XtActionProc)ignore_cut_paste;
>    XtAppAddActions (app_context, &actions2, 1);
> 
>    String translations_copypaste = "#override\n Ctrl<Key>v:  paste-clipboard()\n Ctrl<Key>c:  copy-clipboard()\n Ctrl<Key>x:  cut-clipboard()";
> 
>    String translations_ignore = "#override\n Ctrl<Key>v:  ignore_cut_paste()\n Ctrl<Key>c:  ignore_cut_paste()\n Ctrl<Key>x:  ignore_cut_paste()";
> 
>    thewin = XtCreatePopupShell("Test", topLevelShellWidgetClass,parent,NULL,0);
> 
>    rowcol = XtVaCreateWidget ("rowcol",xmRowColumnWidgetClass, thewin, NULL);
> 
>    textarea = XtVaCreateManagedWidget ("test_area",
>                                    xmTextFieldWidgetClass, rowcol,
>                                    XmNmaxLength,        80,
>                                    XmNtranslations,     XtParseTranslationTable ( translations_copypaste ) ,
>                                    NULL);
>    XtManageChild(textarea);
>    XtManageChild (rowcol);
>    XtPopup(thewin,XtGrabNone);
> }

Have you tried the original Motif copy/cut/paste C-Ins/S-Del/S-Ins available at 
Windows system level to see if that can give you some hints about what's happening?

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

-- 
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