Red Hat Bugzilla – Bug 215173
X11 XGetWindowProperty _NET_WORKAREA wrong on x86_64
Last modified: 2018-04-11 06:30:55 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/418.9 (KHTML, like Gecko) Safari/419.3
Description of problem:
I have a piece of code that uses the _NET_WORKAREA property of XGetWindowProperty to determine the
usable screen area. This code works correctly under i386 builds but fails on x86-64 builds.
Investigation shows that, although XGetWindowProperty claims in it's returned status that the returned
parameter array is 32-bit aligned, examination of the raw byte array returned shows it is actually 64-bit
However, subsequent codes depends on the format value returned by XGetWindowProperty to extract
the returned values, and so of course it fails - the resulting window sizes are therefore unusable.
I would guess that the raw parameter array returned by XGetWindowProperty has not been correctly
packed and so returns the machine native alignment, but fails to report that in the format status code.
Version-Release number of selected component (if applicable):
Xorg 7.1.1 kernel-2.6.18-1.2798.fc6
Steps to Reproduce:
1. Build code that uses XGetWindowProperty and _NET_WORKAREA
2. Show window sized to fit workarea
Window appears, but wrong size and positon, since the x, y, w, h, screen workarea parameters have been
A window the right size and position to fit the screen should appear
You need to show us your code for us to find the error...
Created attachment 141036 [details]
C code sample that illustrates the failure
Created attachment 141039 [details]
Notes on results obtained running test-code
I was just running through my open bugs and I see this one still marked as NEEDINFO against my name...
Is there still more inout you need from me, or is the sample code and results I've posted so far enough?
Sorry for the delat, this bug somehow got lost -- is it still reproducible with
the current update of FC6? If yes, please attach your X server config file
(/etc/X11/xorg.conf) and X server log file (/var/log/Xorg.*.log) to the bug
report as individual uncompressed file attachments using the bugzilla file
attachment link below.
Could you please also try to run without any /etc/X11/xorg.conf whatsoever and
let X11 autodetect your display and video card? Attach to this bug
/var/log/Xorg.0.log from this attempt as well, please.
We will review this issue again once you've had a chance to attach this information.
Thanks in advance.
Sorry - I no longer have this box in x86_64 mode. I needed to to be working and stable, so I converted
it to i386 mode and it works fine in that config. Same hardware etc., all running well.
I didn't think to configure for dual-boot (I was deperate to get the box working) and I'll need it in this
sate for at least 4~6 weeks with my current work, so I can't easily get back to an x86-64 state anytime
I take it that nobody else sees this then? It seemed robustly reproducible to me, anyway!
This is just a quirk of XGetWindowProperty. From the man page:
If the returned format is 32, the returned data is represented
as a long array and should be cast to that type to obtain the elements.