Bug 426383 - wmctrl -l does not list all open windows
Summary: wmctrl -l does not list all open windows
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: wmctrl
Version: 8
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Michael Rice
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-12-20 17:07 UTC by Mark Knoop
Modified: 2008-10-20 20:26 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-20 20:26:59 UTC
Type: ---
Embargoed:


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

Description Mark Knoop 2007-12-20 17:07:32 UTC
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 17:07:32 UTC
Created attachment 290169 [details]
strace wmctrl -l

Comment 2 Chris Reuter 2008-03-30 21:46:35 UTC
(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 10:11:10 UTC
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 13:26:16 UTC
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 06:42:50 UTC
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 20:26:55 UTC
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.