After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 420587 - The value of WINDOWID env var isn't correct.
The value of WINDOWID env var isn't correct.
Status: RESOLVED WONTFIX
Product: gnome-terminal
Classification: Core
Component: general
2.18.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
[decision][chpe:wontfix]
Depends on:
Blocks:
 
 
Reported: 2007-03-20 16:00 UTC by Sven Arvidsson
Modified: 2008-06-16 20:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sven Arvidsson 2007-03-20 16:00:41 UTC
This is Debian bug #387884.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=387884

"When I print with echo the value of WINDOWID environment variable, it's not correct. I compare it with the value reported by xwininfo."

Values given by xwininfo by selecting window manually:
xwininfo: Window id: 0x3800020

  Absolute upper-left X:  694
  Absolute upper-left Y:  294
  Relative upper-left X:  5
  Relative upper-left Y:  25

Values given by xwininfo by providing the id from $WINDOWID:
xwininfo: Window id: 0x380004e

  Absolute upper-left X:  694
  Absolute upper-left Y:  315
  Relative upper-left X:  0
  Relative upper-left Y:  21

In xterm for example, these two examples match.
Comment 1 Havoc Pennington 2007-03-20 16:12:57 UTC
I think WINDOWID is set to the child X window that corresponds to the terminal display. xterm doesn't have nested windows in the same way as gnome-terminal.

Though, who knows if there is really any spec for what WINDOWID is set to, I believe the reason it's set to the child window is to allow horrible hacks like terminal web browsers that connect to X to display images. It's hard to imagine a use of WINDOWID that isn't a horrible hack, really.

If you need the toplevel window, just walk up the X window tree with Xlib calls.
Comment 2 Behdad Esfahbod 2008-06-16 20:14:53 UTC
Agree with Havoc and ChPe.