Re: Quick question about spec
- From: Tim Janik <timj gtk org>
- To: Bradley Tyson Hughes <bhughes tcac net>
- cc: wm-spec-list gnome org
- Subject: Re: Quick question about spec
- Date: Tue, 22 Feb 2000 06:48:22 +0100 (CET)
On Mon, 21 Feb 2000, Bradley Tyson Hughes wrote:
> On Mon, 21 Feb 2000, Tim Janik wrote:
> > On Mon, 21 Feb 2000, Bradley Tyson Hughes wrote:
> >
> > > On Mon, 21 Feb 2000, you wrote:
> > > > On Mon, 21 Feb 2000, Bradley Tyson Hughes wrote:
> > > >
> > > > > On Mon, 21 Feb 2000, Tim Janik wrote:
> > > > >
> > > > > [snip]
> > > > >
> > > > > > yes, basically. it is also important for toolkits to figure the position of their
> > > > > > wm frame window, so they can store/restore window positions, since an unmapped window
> > > > > > moved to x,y will be mapped at x+frame_width,y+frame_height.
> > > > >
> > > > > it should be easy... XTranslateCoordinates can do this...
> > > >
> > > > i'm sorry, i don't follow. the coordinates required here are not the window's
> > > > x,y but the frame's x,y. gtk contains gdk_window_get_deskrelative_origin() for exactly
> > > > this purpose. and figuring the frame requires the (virtual) root window to be identified.
> > >
> > > heh... sorry... i probably should have worded this differently...
> > >
> > > you can use XTranslateCoordinates to find the frame coordinates (by traversing
> > > up the window tree to the root window)
> > >
> > > in cases where there is a virtual root window (more specifically... one that
> > > doesn't reside at 0,0) then this method can't be used... and some other way
> > > would have to be devised
> >
> > you got it. that's exactly what this property is for: identifying the virtual root
> > window.
>
> how about a suggestion... what if instead of setting all sorts of properties
> and what not that won't be used except when an app decides to save it's current
> position (like when it quits)... what if there was some clientmessage mechanism
> where the app would send a request to the root window (similar to
> WM_CHANGE_STATE) and the WM would send a phony ConfigureNotify with the window
> id and coordinates of the toplevel frame window? a client interested in
> keeping coordinates could send the message to the wm when it exits (which could
> result in the app waiting forever for the coordinates whenever a non-compliant
> window manager is used)... or the app could send the message after it gets a
> configurenotify from the window manager (after a window move for example)
>
> not the best way for sure... but hopefully it will get other ideas brewing
thee's really no need to do such a thing.
for one a virtual-root-window property is already widely used practice
(look at sawmill or enlightenment code), and for another, pagers have to
perform way more complicated stuff with the root window, e.g. lurking
on substructure notify events and the like.
but even if it weren't for the pagers, i'd consider your approach somewhat
more complicated than simply setting a property (only a couple of bytes)
per virtual root window to simply flag it.
what problem are you trying to solve?
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]