Bug 426383 - wmctrl -l does not list all open windows
wmctrl -l does not list all open windows
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: wmctrl (Show other bugs)
8
All Linux
low Severity medium
: ---
: ---
Assigned To: Michael Rice
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-20 12:07 EST by Mark Knoop
Modified: 2008-10-20 16:26 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-20 16:26:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
strace wmctrl -l (27.66 KB, application/octet-stream)
2007-12-20 12:07 EST, Mark Knoop
no flags Details

  None (edit)
Description Mark Knoop 2007-12-20 12:07:32 EST
Description of problem:
"wmctrl -l" should list all open windows. Instead, I get the following output

0x0140001f 4294967295 localhost.localdomain Desktop
0x01200003 4294967295 localhost.localdomain Top Panel
0x0120002b 4294967295 localhost.localdomain Bottom Expanded Edge Panel
0x02c00021  0 localhost.localdomain user@localhost:~

when I actually also have Thunderbird, Firefox, and Gvim open. Note that the
second column, which should be -1 for the desktop and panels, is 2^32 - 1. 

Version-Release number of selected component (if applicable):
wmctrl-1.07-2.fc6.x86_64

Additional info:

I first noticed this on F8 with compiz and nvidia drivers, however the problem
persists with the nv driver and metacity (and all combinations). Also tried with
a brand-new user but get the same problem.

It used to work on F7 without problems, and still works on another upgraded F8
machine.

I'm not sure how to debug this further.
Comment 1 Mark Knoop 2007-12-20 12:07:32 EST
Created attachment 290169 [details]
strace wmctrl -l
Comment 2 Chris Reuter 2008-03-30 17:46:35 EDT
(In reply to comment #0)
> Description of problem:
> "wmctrl -l" should list all open windows. Instead, I get the following output

I poked around a bit and figured out what's going on.

Short answer: recompile with the "-m32" flag.

Long answer:

The problem is that the X protocol returns window IDs as 32-bit
integers while the x86_64 XLib defines window handles as 64-bit
integers.

wmctrl gets back an array of 32-bit window IDs but treats it as an
array of 64-bit quantities.

This happens in the function get_client_list() (main.c, line 1264):

    if ((client_list = (Window *)get_property(disp, DefaultRootWindow(disp), 
               XA_WINDOW, "_NET_CLIENT_LIST", size)) == NULL) {

The function get_property() is returning an array of 32-bit values but
since type Window is 64-bit, each element actually contains two window
IDs, one of which is subsequently ignored.

Comment 3 Patrice Dumas 2008-09-16 06:11:10 EDT
It seems that there is a fix in the debian package. I'll have a look as time permits.
Comment 4 Fedora Update System 2008-09-28 09:26:16 EDT
wmctrl-1.07-5.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/wmctrl-1.07-5.fc9
Comment 5 Fedora Update System 2008-10-01 02:42:50 EDT
wmctrl-1.07-5.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update wmctrl'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-8516
Comment 6 Fedora Update System 2008-10-20 16:26:55 EDT
wmctrl-1.07-5.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.