Re: XGetWindowAttributes: 1x1 pixel for GTK apps?
- From: "Owen Taylor" <otaylor redhat com>
- To: "Adenilson Cavalcanti" <savagobr yahoo com>
- Cc: gtk-devel-list gnome org
- Subject: Re: XGetWindowAttributes: 1x1 pixel for GTK apps?
- Date: Tue, 4 Sep 2007 07:55:22 -0400
On 9/2/07, Adenilson Cavalcanti <savagobr yahoo com> wrote:
I'm trying to get the dimensions (width and height) of current 'in focus'
> window using XGetWindowAttributes.
>
> It works fine with KDE or Xlib based applications, but fails with
> all GTK based applications (window_attr.width and window_attr.height
> reports just '1'). The same behavior happens in Ubuntu 6.06, 6.10, 7.04
> when running Metacity as window manager (but not with Compiz or Beryl).
GTK+ puts the focus on a window *inside* the toplevel. Walk up to the
toplevel (check for the WM_STATE property, if not there, go to the
parent and repeat, if you hit the root window, without finding
WM_STATE the real toplevel was the immediate child of the root
window.)
- Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]