[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] ConfigureNotify events
From: |
Alexander Malmberg |
Subject: |
Re: [patch] ConfigureNotify events |
Date: |
Wed, 03 Mar 2004 00:50:14 +0100 |
Kazunobu Kuriyama wrote:
> Alexander Malmberg wrote:
> <snip>
>
> I tried this patch and found that the windows of GNUstep apps appear
> slightly higher
> than before. I have little time to track it down now, so I don't know
> the reason
> exactly.
Is this a one-time thing, or a gradual shift? If it's just a one-time
offset, I wouldn't worry about it. The old code was a bit off, and this
would mess up the coordinates of events at times. Thus, I'm not
surprised that there's a slight shift to bring everything in line,
although I'm not entirely sure what the direct cause is.
> Skimming the patch, I feel it should use XQeuryTree() and XGetGeometry()
> before
>
> >+ int root_x, root_y;
> >+ Window root_child;
> >+ XTranslateCoordinates(dpy, xEvent.xconfigure.window,
> >+ RootWindow(dpy, cWin->screen),
> >+ 0, 0,
> >+ &root_x, &root_y,
> >+ &root_child);
> >+ x.origin.x = root_x;
> >+ x.origin.y = root_y;
> >
> to get the window of the parent and its coordinates, and pass them to
> XTranslateCoordinates() if it does need them, not the ones of the root
> window.
I don't understand what you're trying to accomplish by doing that. The
only thing I can think of is that you want to get the coordinates of the
window including decorations added by the window manager. However, those
aren't the coordinates we want, and we have no way of getting them since
we can't assume that all window managers will use any particular
structure of windows (parents, siblings, etc.) for decorations.
Did you have something else in mind with that change?
- Alexander Malmberg
- Re: [patch] ConfigureNotify events,
Alexander Malmberg <=