Your message dated Thu, 10 Oct 2024 07:39:50 +0000
with message-id <[email protected]>
and subject line Bug#516345: fixed in wmctrl 1.07+git20240228.1105759-1
has caused the Debian Bug report #516345,
regarding wmctrl: add ability to list information about :ACTIVE: and :SELECT: 
windows
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
516345: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=516345
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: wmctrl
Version: 1.07-6
Severity: wishlist
Tags: patch

I wanted to be able to list the information about the currently active
window, like it's title and geometery.  This patch adds a -r <WIN> -L
option which displays the information about <WIN> as it would in -l

-- System Information:
Debian Release: 5.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-486
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages wmctrl depends on:
ii  libc6                         2.7-18     GNU C Library: Shared libraries
ii  libglib2.0-0                  2.16.6-1   The GLib library of C routines
ii  libice6                       2:1.0.4-1  X11 Inter-Client Exchange library
ii  libsm6                        2:1.0.3-2  X11 Session Management library
ii  libx11-6                      2:1.1.5-2  X11 client-side library
ii  libxmu6                       2:1.0.4-1  X11 miscellaneous utility library

wmctrl recommends no packages.

wmctrl suggests no packages.

-- no debconf information
diff -urbBw wmctrl-1.07/main.c wmctrl-1.07.patched/main.c
--- wmctrl-1.07/main.c	2005-01-28 19:31:33.000000000 -0800
+++ wmctrl-1.07.patched/main.c	2008-07-20 11:45:34.000000000 -0700
@@ -65,6 +65,7 @@
 "  -r <WIN> -N <STR>    Set the name (long title) of the window.\n" \
 "  -r <WIN> -I <STR>    Set the icon name (short title) of the window.\n" \
 "  -r <WIN> -T <STR>    Set both the name and the icon name of the window.\n" \
+"  -r <WIN> -L          List information about the window.\n" \
 "  -k (on|off)          Activate or deactivate window manager's\n" \
 "                       \"showing the desktop\" mode. Many window managers\n" \
 "                       do not implement this mode.\n" \
@@ -217,6 +218,7 @@
         Atom xa_prop_type, gchar *prop_name, unsigned long *size);
 static void init_charset(void);
 static int window_move_resize (Display *disp, Window win, char *arg);
+static void display_window (Display *disp, Window win, int max_client_machine_len);
 static int window_state (Display *disp, Window win, char *arg);
 static Window Select_Window(Display *dpy);
 static Window get_active_window(Display *dpy);
@@ -264,7 +266,7 @@
         }
     }
    
-    while ((opt = getopt(argc, argv, "FGVvhlupidmxa:r:s:c:t:w:k:o:n:g:e:b:N:I:T:R:")) != -1) {
+    while ((opt = getopt(argc, argv, "FGVvhlupidmxa:r:s:c:t:w:k:o:n:g:e:b:N:I:T:LR:")) != -1) {
         missing_option = 0;
         switch (opt) {
             case 'F':
@@ -296,7 +298,7 @@
             case 'r':
                 options.param_window = optarg;
                 break; 
-            case 't': case 'e': case 'b': case 'N': case 'I': case 'T':
+            case 't': case 'e': case 'b': case 'N': case 'I': case 'T': case 'L':
                 options.param = optarg;
                 action = opt;
                 break;
@@ -356,7 +358,7 @@
             ret = wm_info(disp);
             break;
         case 'a': case 'c': case 'R': 
-        case 't': case 'e': case 'b': case 'N': case 'I': case 'T':
+        case 't': case 'e': case 'b': case 'N': case 'I': case 'T': case 'L':
             if (! options.param_window) {
                 fputs("No window was specified.\n", stderr);
                 return EXIT_FAILURE;
@@ -874,6 +876,69 @@
     }
 }/*}}}*/
 
+static void display_window (Display *disp, Window win, int max_client_machine_len) {/*{{{*/
+    gchar *title_utf8 = get_window_title(disp, win); /* UTF8 */
+    gchar *title_out = get_output_str(title_utf8, TRUE);
+    gchar *client_machine;
+    gchar *class_out = get_window_class(disp, win); /* UTF8 */
+    unsigned long *pid;
+    unsigned long *desktop;
+    int x, y, junkx, junky;
+    unsigned int wwidth, wheight, bw, depth;
+    Window junkroot;
+
+    /* desktop ID */
+    if ((desktop = (unsigned long *)get_property(disp, win,
+            XA_CARDINAL, "_NET_WM_DESKTOP", NULL)) == NULL) {
+        desktop = (unsigned long *)get_property(disp, win,
+                XA_CARDINAL, "_WIN_WORKSPACE", NULL);
+    }
+
+    /* client machine */
+    client_machine = get_property(disp, win,
+            XA_STRING, "WM_CLIENT_MACHINE", NULL);
+  
+    /* pid */
+    pid = (unsigned long *)get_property(disp, win,
+            XA_CARDINAL, "_NET_WM_PID", NULL);
+
+  /* geometry */
+    XGetGeometry (disp, win, &junkroot, &junkx, &junky,
+                      &wwidth, &wheight, &bw, &depth);
+    XTranslateCoordinates (disp, win, junkroot, junkx, junky,
+                          &x, &y, &junkroot);
+  
+    /* special desktop ID -1 means "all desktops", so we 
+      have to convert the desktop value to signed long */
+    printf("0x%.8lx %2ld", win, 
+            desktop ? (signed long)*desktop : 0);
+    if (options.show_pid) {
+      printf(" %-6lu", pid ? *pid : 0);
+    }
+    if (options.show_geometry) {
+      printf(" %-4d %-4d %-4d %-4d", x, y, wwidth, wheight);
+    }
+    if (options.show_class) {
+        printf(" %-20s ", class_out ? class_out : "N/A");
+    }
+
+    if (max_client_machine_len == 0) {
+      max_client_machine_len = strlen(client_machine);
+    }
+
+    printf(" %*s %s\n",
+          max_client_machine_len,
+          client_machine ? client_machine : "N/A",
+          title_out ? title_out : "N/A"
+    );
+    g_free(title_utf8);
+    g_free(title_out);
+    g_free(desktop);
+    g_free(client_machine);
+    g_free(class_out);
+    g_free(pid);
+}/*}}}*/
+
 static int action_window (Display *disp, Window win, char mode) {/*{{{*/
     p_verbose("Using window: 0x%.8lx\n", win);
     switch (mode) {
@@ -883,6 +948,10 @@
         case 'c':
             return close_window(disp, win);
 
+        case 'L':
+            display_window(disp, win, 0);
+            return EXIT_SUCCESS;
+
         case 'e':
             /* resize/move the window around the desktop => -r -e */
             return window_move_resize(disp, win, options.param);
@@ -1297,62 +1366,7 @@
     
     /* print the list */
     for (i = 0; i < client_list_size / sizeof(Window); i++) {
-        gchar *title_utf8 = get_window_title(disp, client_list[i]); /* UTF8 */
-        gchar *title_out = get_output_str(title_utf8, TRUE);
-        gchar *client_machine;
-        gchar *class_out = get_window_class(disp, client_list[i]); /* UTF8 */
-        unsigned long *pid;
-        unsigned long *desktop;
-        int x, y, junkx, junky;
-        unsigned int wwidth, wheight, bw, depth;
-        Window junkroot;
-
-        /* desktop ID */
-        if ((desktop = (unsigned long *)get_property(disp, client_list[i],
-                XA_CARDINAL, "_NET_WM_DESKTOP", NULL)) == NULL) {
-            desktop = (unsigned long *)get_property(disp, client_list[i],
-                    XA_CARDINAL, "_WIN_WORKSPACE", NULL);
-        }
-
-        /* client machine */
-        client_machine = get_property(disp, client_list[i],
-                XA_STRING, "WM_CLIENT_MACHINE", NULL);
-       
-        /* pid */
-        pid = (unsigned long *)get_property(disp, client_list[i],
-                XA_CARDINAL, "_NET_WM_PID", NULL);
-
-	    /* geometry */
-        XGetGeometry (disp, client_list[i], &junkroot, &junkx, &junky,
-                          &wwidth, &wheight, &bw, &depth);
-        XTranslateCoordinates (disp, client_list[i], junkroot, junkx, junky,
-                               &x, &y, &junkroot);
-      
-        /* special desktop ID -1 means "all desktops", so we 
-           have to convert the desktop value to signed long */
-        printf("0x%.8lx %2ld", client_list[i], 
-                desktop ? (signed long)*desktop : 0);
-        if (options.show_pid) {
-           printf(" %-6lu", pid ? *pid : 0);
-        }
-        if (options.show_geometry) {
-           printf(" %-4d %-4d %-4d %-4d", x, y, wwidth, wheight);
-        }
-		if (options.show_class) {
-		   printf(" %-20s ", class_out ? class_out : "N/A");
-		}
-
-        printf(" %*s %s\n",
-              max_client_machine_len,
-              client_machine ? client_machine : "N/A",
-              title_out ? title_out : "N/A"
-		);
-        g_free(title_utf8);
-        g_free(title_out);
-        g_free(desktop);
-        g_free(client_machine);
-        g_free(class_out);
-        g_free(pid);
+        display_window(disp, client_list[i], max_client_machine_len);
     }
     g_free(client_list);
    

--- End Message ---
--- Begin Message ---
Source: wmctrl
Source-Version: 1.07+git20240228.1105759-1
Done: Andreas Tille <[email protected]>

We believe that the bug you reported is fixed in the latest version of
wmctrl, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andreas Tille <[email protected]> (supplier of updated wmctrl package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Mon, 30 Sep 2024 08:31:27 +0200
Source: wmctrl
Architecture: source
Version: 1.07+git20240228.1105759-1
Distribution: unstable
Urgency: medium
Maintainer: Package Salvaging Team <[email protected]>
Changed-By: Andreas Tille <[email protected]>
Closes: 465109 516345 683968 683970 743262 764501 1011233 1079861
Changes:
 wmctrl (1.07+git20240228.1105759-1) unstable; urgency=medium
 .
   * Team upload.
     Closes: #1079861
 .
   [ Helmut Grohne ]
   * Fix FTCBFS: (Closes: ##846827)
      + 03_cross.patch: Consider ac_tool_prefix for pkg-config
      + autoreconf
 .
   [ Andreas Tille ]
   * New upstream commit
     Closes: #764501
   * Move package to Package Salvage team space
   * Fix Homepage
     Closes: #1011233
   * Standards-Version: 4.7.0 (routine-update)
   * debhelper-compat 13 (routine-update)
   * Secure URI in copyright format (routine-update)
   * Remove trailing whitespace in debian/changelog (routine-update)
   * Remove trailing whitespace in debian/copyright (routine-update)
   * Rules-Requires-Root: no (routine-update)
   * Trim trailing whitespace.
   * Drop unnecessary dependency on dh-autoreconf.
   * Fix day-of-week for changelog entry 1.05-1.
   * Avoid explicitly specifying -Wl,--as-needed linker flag.
   * Remove constraints unnecessary since bullseye (oldstable):
     + Build-Depends: Replace dependency on transitional package
       x11proto-core-dev with replacement x11proto-dev.
   * watch file standard 4 (routine-update)
   * Fix manpage
     Closes: #683968, #683970, #743262
   * Enable hardening options
 .
   [ Scott Barker ]
   * Add ability to change application icons
     Closes: #465109
 .
   [ Zach Dwiel ]
   * Add ability to list information about :ACTIVE: and :SELECT: windows
     Closes: #516345
Checksums-Sha1:
 8620a15ac9c223bda33773f8fbdbce9f2fc730c2 2106 
wmctrl_1.07+git20240228.1105759-1.dsc
 632e7b43b0487553e933ce26bb4a2c99582ac6c7 70308 
wmctrl_1.07+git20240228.1105759.orig.tar.xz
 408e3460a01fda15eeeb79c00cde2a13a4f4960b 8524 
wmctrl_1.07+git20240228.1105759-1.debian.tar.xz
 c318e0d4469518a23fe4eefb95bd57a7969269b3 8640 
wmctrl_1.07+git20240228.1105759-1_amd64.buildinfo
Checksums-Sha256:
 f6e1444672efceebff55dd290bada5b8f922ab805a3c5f5102af6492c0ac6b7d 2106 
wmctrl_1.07+git20240228.1105759-1.dsc
 f92ba2547a3f1919ce441249867d8a695d859f4e104972800f974d7031a5be0a 70308 
wmctrl_1.07+git20240228.1105759.orig.tar.xz
 26aba6a6a5f67614d67f371276f43ae5800730ec548f98ff5dfcb4f310cf9dd1 8524 
wmctrl_1.07+git20240228.1105759-1.debian.tar.xz
 fed55481999e93d52184ef688f732a93785322bb497c1cb217ee0b3836294e36 8640 
wmctrl_1.07+git20240228.1105759-1_amd64.buildinfo
Files:
 a4893c4266d42d06c41973ff7ac4186c 2106 x11 optional 
wmctrl_1.07+git20240228.1105759-1.dsc
 3a5997794fa357af0a3e79c44c961bed 70308 x11 optional 
wmctrl_1.07+git20240228.1105759.orig.tar.xz
 883cc239be945eb9784f8599b603051c 8524 x11 optional 
wmctrl_1.07+git20240228.1105759-1.debian.tar.xz
 186f3014ccb3811bcbc446f8cb730dfb 8640 x11 optional 
wmctrl_1.07+git20240228.1105759-1_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJFBAEBCAAvFiEE8fAHMgoDVUHwpmPKV4oElNHGRtEFAmb6RsURHHRpbGxlQGRl
Ymlhbi5vcmcACgkQV4oElNHGRtEM4g/9HWVfsTWoT2JDZHkobagSGale8nuYQBNv
fbKu5u/zgNQdrZjlTbYurXGTIDWm7ZHdtr5HPcLJkr09ikl2or4EjDD+a59w0C9o
7+wDyXQHv9vqqdiLYv85C1FXm3K05DgubMU+rl3e47w36f75hoUP+AyaBfsIDsL5
rnooPPJf9hyyglADAEAHyCwTiMFI3inPviBTxM/RBI7/7XzHZnxvZrwpxfrDuVlB
7Kd2DEwtU5y2aYsqkMt8fT/iEuRPTGr+bgVXgUW11yGhaFEW4RkmP1ORcX7rx+MO
q8N2KCGTfKK3fZ9bsRKCYN51wA6uk+blYh2Qk392lCBTJfhecMvyO7GIiyqbHNti
tZiUDy11Mwt3n1cr6nQ0KomXV2x1LYRZNd8K6rF+C1QPaDHGL+Ze/6Cwrw6fK45H
CAl/6auM7Ntue3VnN7RDEpDB7zO20aBORrMLRK8blWCkwLMWVoKBQtI1uQtDrkFH
ZrtJZl8XTPIuusg7+2T/EOkDqzSCSKLtg5aj7gNILlx/fo0oB/5SGONNnEIQOevA
J4yi85V4s29FWyC87Cvujihsq8i4kVkcbn1etsfN0wKOlZNgrD4sMSj4p3Sdn+N4
T+/M7ypFviOi6MaPPF7t36PvuutrOP5IlZylJQKLCMHI93bneBsHwfw+2I719pIX
CWgGs3cicSg=
=bJda
-----END PGP SIGNATURE-----

Attachment: pgpG1UXsTPXR8.pgp
Description: PGP signature


--- End Message ---

Reply via email to