pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Import wm/wmctrl as wmctrl



Module Name:	pkgsrc-wip
Committed By:	kikadf <kikadf.01%gmail.com@localhost>
Pushed By:	kikadf
Date:		Thu Jan 16 16:27:08 2025 +0100
Changeset:	402c47d46572e2613b18f2397867636436a008af

Modified Files:
	Makefile
Added Files:
	wmctrl/DESCR
	wmctrl/Makefile
	wmctrl/PLIST
	wmctrl/distinfo
	wmctrl/patches/patch-aa

Log Message:
Import wm/wmctrl as wmctrl

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=402c47d46572e2613b18f2397867636436a008af

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                |  1 +
 wmctrl/DESCR            | 12 +++++++++
 wmctrl/Makefile         | 19 ++++++++++++++
 wmctrl/PLIST            |  3 +++
 wmctrl/distinfo         |  6 +++++
 wmctrl/patches/patch-aa | 68 +++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 109 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 0d1a894c5b..873d3583a0 100644
--- a/Makefile
+++ b/Makefile
@@ -5916,6 +5916,7 @@ SUBDIR+=	wla-dx-git
 SUBDIR+=	wlroots
 SUBDIR+=	wmbattery
 SUBDIR+=	wmc2d
+SUBDIR+=	wmctrl
 SUBDIR+=	wmii-devel
 SUBDIR+=	wmname
 SUBDIR+=	wmnetload
diff --git a/wmctrl/DESCR b/wmctrl/DESCR
new file mode 100644
index 0000000000..bc9ecbc9e1
--- /dev/null
+++ b/wmctrl/DESCR
@@ -0,0 +1,12 @@
+wmctrl is a command line tool to interact with an EWMH/NetWM compatible X
+Window Manager.
+
+It provides command line access to almost all the features defined in the EWMH
+specification.  Using it, it's possible to, for example, obtain information
+about the window manager, get a detailed list of desktops and managed windows,
+switch and resize desktops, change number of desktops, make windows
+full-screen, always-above or sticky, and activate, close, move, resize,
+maximize and minimize them.
+
+The command line access makes it easy to automate these tasks and execute them
+from any application that is able to run a command in response to some event.
diff --git a/wmctrl/Makefile b/wmctrl/Makefile
new file mode 100644
index 0000000000..7cf066fe55
--- /dev/null
+++ b/wmctrl/Makefile
@@ -0,0 +1,19 @@
+# $NetBSD: Makefile,v 1.20 2021/12/08 16:06:52 adam Exp $
+
+DISTNAME=		wmctrl-1.07
+PKGREVISION=		6
+CATEGORIES=		wm
+MASTER_SITES=		https://sites.google.com/site/tstyblo/wmctrl/
+
+MAINTAINER=		snj%NetBSD.org@localhost
+HOMEPAGE=		https://sites.google.com/site/tstyblo/wmctrl
+COMMENT=		Command line interface to an EWMH-compliant WM
+LICENSE=		gnu-gpl-v2
+
+USE_TOOLS+=		pkg-config
+GNU_CONFIGURE=		YES
+USE_PKGLOCALEDIR=	YES
+
+.include "../../devel/glib2/buildlink3.mk"
+.include "../../x11/libXmu/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/wmctrl/PLIST b/wmctrl/PLIST
new file mode 100644
index 0000000000..335a03b914
--- /dev/null
+++ b/wmctrl/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.2 2007/01/03 12:09:19 obache Exp $
+bin/wmctrl
+man/man1/wmctrl.1
diff --git a/wmctrl/distinfo b/wmctrl/distinfo
new file mode 100644
index 0000000000..cb62a7c9d2
--- /dev/null
+++ b/wmctrl/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.6 2021/10/26 11:25:20 nia Exp $
+
+BLAKE2s (wmctrl-1.07.tar.gz) = 3d8f31f82c6b6d3aea6f606529405892a0d99131a65a39c90df6db1b5e9df759
+SHA512 (wmctrl-1.07.tar.gz) = 4c77ad1e204e8d444f682ad1d05c0993bcab9097ac6d4b6a944556ab85acbe713f549dbaf443cd4d1226a162ce7d46fbd209c92652e87fc8e609feee74907daa
+Size (wmctrl-1.07.tar.gz) = 87820 bytes
+SHA1 (patch-aa) = 67995df18aa47c62ca06f3286f0e1eb9d5c4799e
diff --git a/wmctrl/patches/patch-aa b/wmctrl/patches/patch-aa
new file mode 100644
index 0000000000..2ad1472e84
--- /dev/null
+++ b/wmctrl/patches/patch-aa
@@ -0,0 +1,68 @@
+$NetBSD: patch-aa,v 1.1.1.1 2004/01/28 22:42:58 snj Exp $
+
+* Support undecorated properties
+* Fix 64 bit data from debian
+
+--- main.c.orig	2005-01-29 03:31:33.000000000 +0000
++++ main.c
+@@ -159,6 +159,8 @@ Free Software Foundation, Inc., 675 Mass
+ "                           shaded, skip_taskbar, skip_pager, hidden,\n" \
+ "                           fullscreen, above, below\n" \
+ "\n" \
++"                       With Openbox3 you can also use \"undecorated\".\n" \
++"\n" \
+ "Workarounds:\n" \
+ "\n" \
+ "  DESKTOP_TITLES_INVALID_UTF8      Print non-ASCII desktop titles correctly\n" \
+@@ -776,7 +778,11 @@ static int window_state (Display *disp, 
+                 fputs("Invalid zero length property.\n", stderr);
+                 return EXIT_FAILURE;
+             }
+-            tmp_prop2 = g_strdup_printf("_NET_WM_STATE_%s", tmp2 = g_ascii_strup(p2, -1));
++            if (strcmp(p2,"undecorated") == 0) {
++                tmp_prop2 = g_strdup_printf("_OB_WM_STATE_%s", tmp2 = g_ascii_strup(p2,-1));
++            } else {
++                tmp_prop2 = g_strdup_printf("_NET_WM_STATE_%s", tmp2 = g_ascii_strup(p2,-1));
++            }
+             p_verbose("State 2: %s\n", tmp_prop2); 
+             prop2 = XInternAtom(disp, tmp_prop2, False);
+             g_free(tmp2);
+@@ -788,7 +794,11 @@ static int window_state (Display *disp, 
+             fputs("Invalid zero length property.\n", stderr);
+             return EXIT_FAILURE;
+         }
+-        tmp_prop1 = g_strdup_printf("_NET_WM_STATE_%s", tmp1 = g_ascii_strup(p1, -1));
++        if (strcmp(p1,"undecorated") == 0) {
++            tmp_prop1 = g_strdup_printf("_OB_WM_STATE_%s", tmp1 = g_ascii_strup(p1,-1));
++        } else {
++            tmp_prop1 = g_strdup_printf("_NET_WM_STATE_%s", tmp1 = g_ascii_strup(p1,-1));
++        }    
+         p_verbose("State 1: %s\n", tmp_prop1); 
+         prop1 = XInternAtom(disp, tmp_prop1, False);
+         g_free(tmp1);
+@@ -1425,6 +1435,16 @@ static gchar *get_property (Display *dis
+      *
+      * long_length = Specifies the length in 32-bit multiples of the
+      *               data to be retrieved.
++     *
++     * NOTE:  see
++     * http://mail.gnome.org/archives/wm-spec-list/2003-March/msg00067.html
++     * In particular:
++     *
++     * When the X window system was ported to 64-bit architectures, a
++     * rather peculiar design decision was made. 32-bit quantities such
++     * as Window IDs, atoms, etc, were kept as longs in the client side
++     * APIs, even when long was changed to 64 bits.
++     *
+      */
+     if (XGetWindowProperty(disp, win, xa_prop_name, 0, MAX_PROPERTY_VALUE_LEN / 4, False,
+             xa_prop_type, &xa_ret_type, &ret_format,     
+@@ -1441,6 +1461,8 @@ static gchar *get_property (Display *dis
+ 
+     /* null terminate the result to make string handling easier */
+     tmp_size = (ret_format / 8) * ret_nitems;
++    /* Correct 64 Architecture implementation of 32 bit data */
++    if(ret_format==32) tmp_size *= sizeof(long)/4;
+     ret = g_malloc(tmp_size + 1);
+     memcpy(ret, ret_prop, tmp_size);
+     ret[tmp_size] = '\0';


Home | Main Index | Thread Index | Old Index