From nobody Tue Dec 05 00:09:27 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SkgrR6FrZz5319C; Tue, 5 Dec 2023 00:09:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SkgrR5qmjz4ZfQ; Tue, 5 Dec 2023 00:09:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701734967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LeebAQm2ZtAFE4rqzoJEMZ4Q/yrMWo6REEY8MOEs3tI=; b=ZAwq/AaVgk6YBnAoBTqCbZoTgZHKhFkSsOkyYz/KnIhCHdUD2M7P7iUrcgsswVGT1GDUiv t5yy3ooi1+C543qXaQ1e9Xq/eRtQZb62E+2JSYqcclZQC5ArH77kSFi+Wa04a+VdUsZJYa fwVbhQ15ZQoz6T/VAqoifLlA2HkqgoZ2U6MGYB4iRuu52j7QB+KJRReCEDahP189JwayzI TUDRfdgC4ePD47xWziZ5yB3ECX8N5hCEONr7zHz97KjKuoCOD3HdVCdoKPy6se6Et2/nrY 2JB8yrNOxeboxvi2NuiKQdhrpTAkQnYn0jnjzrwZ23/wSAfAv41QWSW3tN1a9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701734967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LeebAQm2ZtAFE4rqzoJEMZ4Q/yrMWo6REEY8MOEs3tI=; b=vuYg3yqpka9CqaNpOmq/M2EaZ66pJhgDjoQVjUHhu2aixY2aiH0ohG2r4+KJ4Bdse67teE 99/lkyEV1TKHTlIxrGSWv9jbIMPTOu4PYhxpSlBnuoL2aqGUpsP5mbu8TcCPLxWY4jB/OB F5M9JidnGH6Qmsqc1Yo+tmGZfWXBNli5bcdRcXReDDOIOeY461VV6c+M2Obk/3ZNSl3VwF ZqCZEOWwiYHDZvyn7yWPE6BpO+6kf34IMcnOfh3SEfjwY8iaxKxMoUnD8FpYIXkBtTtcD7 UAVUHRI2wHBwf5O5Zb5SXjSNJCjdE/2HPA5gSmLV0ikkOQ5rFe4LVLV3/zxB6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701734967; a=rsa-sha256; cv=none; b=S2VTudCACv/09HmDM+qWaKdFbwoHHP7APP6TKvEYXfQ+LYz7xCx2DWtMZHrhqeuZkpxEIU hUfZ8VIRm0cJ80jcWop8Lv7B1mHAzeewSEwthvAxDcU2pXnaKsk2MhN9fmCLs+Y7q3yhgW fGru//+PItmEZUmrDcCC5WIjWYClx9Bku04AvFsw2yELWBKV2xBegcNbZklDIJjZ/g/LlV w/NbPjtz2M350fVixDs48ziAm/q/naPeV9OxJ/tt7XYJ7w1b7BPuRT9lcScbrIWUw79N4P uKFP055Lhhbnmaf2EDmBqLCcLH6Po7rwBpYElzaxFz46poDOlbXhWmnR2Mv4sA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SkgrR4wrbznQG; Tue, 5 Dec 2023 00:09:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3B509RX8063869; Tue, 5 Dec 2023 00:09:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3B509R4q063866; Tue, 5 Dec 2023 00:09:27 GMT (envelope-from git) Date: Tue, 5 Dec 2023 00:09:27 GMT Message-Id: <202312050009.3B509R4q063866@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Cy Schubert Subject: git: 673bb072f659 - main - x11-toolkits/open-motif*: Disable XmPIXMAP mode for drag-and-drop List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 673bb072f65941cabebffbbdc73ebd5c7ade48cc Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/ports/commit/?id=673bb072f65941cabebffbbdc73ebd5c7ade48cc commit 673bb072f65941cabebffbbdc73ebd5c7ade48cc Author: Cy Schubert AuthorDate: 2023-12-05 00:00:23 +0000 Commit: Cy Schubert CommitDate: 2023-12-05 00:02:06 +0000 x11-toolkits/open-motif*: Disable XmPIXMAP mode for drag-and-drop In XmPIXMAP mode, Motif will draw to the root window with IncludeInferious without being under a GrabServer. This results in a variety of graphical glitches. For example, when a compositing window manager updates the screen it will erase the drag icon. This continues until the icon leaves the origin window, when Motif does a GrabServer. The GrabServer avoids the graphical glitches, but it also freezes the rest of the desktop (which is impolite). Given that all current X servers support SHAPE, and given that most users are running a compositing window manager, XmDRAG_WINDOW is always a better choice. Therefore, disable XmPIXMAP entirely. Obtained from: https://sourceforge.net/p/motif/code/merge-requests/1/ --- x11-toolkits/open-motif-devel/Makefile | 2 +- .../open-motif-devel/files/patch-lib_Xm_DragC.c | 76 ++++++++++++++++++++++ x11-toolkits/open-motif/Makefile | 2 +- x11-toolkits/open-motif/files/patch-lib_Xm_DragC.c | 76 ++++++++++++++++++++++ 4 files changed, 154 insertions(+), 2 deletions(-) diff --git a/x11-toolkits/open-motif-devel/Makefile b/x11-toolkits/open-motif-devel/Makefile index 36f53474ca9d..ec74a5e473a9 100644 --- a/x11-toolkits/open-motif-devel/Makefile +++ b/x11-toolkits/open-motif-devel/Makefile @@ -1,6 +1,6 @@ PORTNAME= open-motif PORTVERSION= ${COMMIT_DATE} -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= x11-toolkits PKGNAMESUFFIX= -devel diff --git a/x11-toolkits/open-motif-devel/files/patch-lib_Xm_DragC.c b/x11-toolkits/open-motif-devel/files/patch-lib_Xm_DragC.c new file mode 100644 index 000000000000..8001ce0251a6 --- /dev/null +++ b/x11-toolkits/open-motif-devel/files/patch-lib_Xm_DragC.c @@ -0,0 +1,76 @@ +--- lib/Xm/DragC.c.orig 2023-02-15 16:42:34.000000000 -0800 ++++ lib/Xm/DragC.c 2023-12-04 15:58:13.960304000 -0800 +@@ -846,35 +846,18 @@ + if (newStyle != oldStyle) + { + /* +- * If we're not still waiting to hear from the window manager, +- * and we're not running dynamic, then we can grab. ++ * If we are in pixmap mode, release the grab. + */ +- if ((dc->drag.trackingMode != XmDRAG_TRACK_WM_QUERY_PENDING) && +- (newStyle != XmDRAG_DYNAMIC) && +- (initiator != XmDRAG_DYNAMIC) && +- (initiator != XmDRAG_PREFER_DYNAMIC)) ++ if (dc->drag.serverGrabbed) + { +- if (!dc->drag.serverGrabbed) +- { +- XGrabServer(XtDisplay(dc)); +- dc->drag.serverGrabbed = True; +- XtSetArg(args[0], XmNdragOverMode, XmPIXMAP); +- XtSetValues( (Widget)dc->drag.curDragOver, args, 1); +- } ++ XUngrabServer(XtDisplay(dc)); ++ dc->drag.serverGrabbed = False; ++ if (xmDisplay -> display.displayHasShapeExtension) ++ XtSetArg(args[0], XmNdragOverMode, XmDRAG_WINDOW); ++ else ++ XtSetArg(args[0], XmNdragOverMode, XmCURSOR); ++ XtSetValues( (Widget)dc->drag.curDragOver, args, 1); + } +- else +- { +- if (dc->drag.serverGrabbed) +- { +- XUngrabServer(XtDisplay(dc)); +- dc->drag.serverGrabbed = False; +- if (xmDisplay -> display.displayHasShapeExtension) +- XtSetArg(args[0], XmNdragOverMode, XmDRAG_WINDOW); +- else +- XtSetArg(args[0], XmNdragOverMode, XmCURSOR); +- XtSetValues( (Widget)dc->drag.curDragOver, args, 1); +- } +- } + } + } + +@@ -1687,23 +1670,13 @@ + /* Build a new one */ + i = 0; + /* +- * If this is the first call, tracking mode will be querypending +- * and we have to come up in cursor mode. Otherwise, we come up +- * in cursor for dynamic and pixmap for preregister. ++ * Always come up in window mode (or cursor if SHAPE is not available). + */ +- if ((dc->drag.trackingMode == XmDRAG_TRACK_WM_QUERY_PENDING) || +- (dc->drag.activeProtocolStyle == XmDRAG_DYNAMIC)) +- { +- if (dpy -> display.displayHasShapeExtension) +- XtSetArg(args[i], XmNdragOverMode, XmDRAG_WINDOW); +- else +- XtSetArg(args[i], XmNdragOverMode, XmCURSOR); +- i++; +- } ++ if (dpy -> display.displayHasShapeExtension) ++ XtSetArg(args[i], XmNdragOverMode, XmDRAG_WINDOW); + else +- { +- XtSetArg(args[i], XmNdragOverMode, XmPIXMAP); i++; +- } ++ XtSetArg(args[i], XmNdragOverMode, XmCURSOR); ++ i++; + + XtSetArg(args[i], XmNhotX, dc->core.x); i++; + XtSetArg(args[i], XmNhotY, dc->core.y); i++; diff --git a/x11-toolkits/open-motif/Makefile b/x11-toolkits/open-motif/Makefile index 99fa75185d19..2723ca4a7381 100644 --- a/x11-toolkits/open-motif/Makefile +++ b/x11-toolkits/open-motif/Makefile @@ -1,6 +1,6 @@ PORTNAME= open-motif PORTVERSION= 2.3.8 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= x11-toolkits # MASTER_SITES= SF/${PORTNAME}/Motif%202.3.4%20Source%20Code/ MASTER_SITES= SF/motif/Motif%20${PORTVERSION}%20Source%20Code/ diff --git a/x11-toolkits/open-motif/files/patch-lib_Xm_DragC.c b/x11-toolkits/open-motif/files/patch-lib_Xm_DragC.c new file mode 100644 index 000000000000..4a96f46a04f4 --- /dev/null +++ b/x11-toolkits/open-motif/files/patch-lib_Xm_DragC.c @@ -0,0 +1,76 @@ +--- lib/Xm/DragC.c.orig 2017-08-16 17:38:43.000000000 -0700 ++++ lib/Xm/DragC.c 2023-12-04 15:58:26.431030000 -0800 +@@ -846,35 +846,18 @@ + if (newStyle != oldStyle) + { + /* +- * If we're not still waiting to hear from the window manager, +- * and we're not running dynamic, then we can grab. ++ * If we are in pixmap mode, release the grab. + */ +- if ((dc->drag.trackingMode != XmDRAG_TRACK_WM_QUERY_PENDING) && +- (newStyle != XmDRAG_DYNAMIC) && +- (initiator != XmDRAG_DYNAMIC) && +- (initiator != XmDRAG_PREFER_DYNAMIC)) ++ if (dc->drag.serverGrabbed) + { +- if (!dc->drag.serverGrabbed) +- { +- XGrabServer(XtDisplay(dc)); +- dc->drag.serverGrabbed = True; +- XtSetArg(args[0], XmNdragOverMode, XmPIXMAP); +- XtSetValues( (Widget)dc->drag.curDragOver, args, 1); +- } ++ XUngrabServer(XtDisplay(dc)); ++ dc->drag.serverGrabbed = False; ++ if (xmDisplay -> display.displayHasShapeExtension) ++ XtSetArg(args[0], XmNdragOverMode, XmDRAG_WINDOW); ++ else ++ XtSetArg(args[0], XmNdragOverMode, XmCURSOR); ++ XtSetValues( (Widget)dc->drag.curDragOver, args, 1); + } +- else +- { +- if (dc->drag.serverGrabbed) +- { +- XUngrabServer(XtDisplay(dc)); +- dc->drag.serverGrabbed = False; +- if (xmDisplay -> display.displayHasShapeExtension) +- XtSetArg(args[0], XmNdragOverMode, XmDRAG_WINDOW); +- else +- XtSetArg(args[0], XmNdragOverMode, XmCURSOR); +- XtSetValues( (Widget)dc->drag.curDragOver, args, 1); +- } +- } + } + } + +@@ -1687,23 +1670,13 @@ + /* Build a new one */ + i = 0; + /* +- * If this is the first call, tracking mode will be querypending +- * and we have to come up in cursor mode. Otherwise, we come up +- * in cursor for dynamic and pixmap for preregister. ++ * Always come up in window mode (or cursor if SHAPE is not available). + */ +- if ((dc->drag.trackingMode == XmDRAG_TRACK_WM_QUERY_PENDING) || +- (dc->drag.activeProtocolStyle == XmDRAG_DYNAMIC)) +- { +- if (dpy -> display.displayHasShapeExtension) +- XtSetArg(args[i], XmNdragOverMode, XmDRAG_WINDOW); +- else +- XtSetArg(args[i], XmNdragOverMode, XmCURSOR); +- i++; +- } ++ if (dpy -> display.displayHasShapeExtension) ++ XtSetArg(args[i], XmNdragOverMode, XmDRAG_WINDOW); + else +- { +- XtSetArg(args[i], XmNdragOverMode, XmPIXMAP); i++; +- } ++ XtSetArg(args[i], XmNdragOverMode, XmCURSOR); ++ i++; + + XtSetArg(args[i], XmNhotX, dc->core.x); i++; + XtSetArg(args[i], XmNhotY, dc->core.y); i++;