Re: on viewport; doc review request & questions

Sorry for my slow response....

Teika Kazura <teika lavabit com> writes:
> On Tue, 24 Nov 2009 08:28:43 -0600, Jeremy Hankins wrote:
>> But we should obviously get rid of either window-relative-position
>> or window-absolute-position.
> I noticed they're not exactly the same. window-absolute-position
> returns the adjusted position only if it's completely outside of the
> current VP, but window-relative-position always uses the
> window-viewport.
> They have to be united into one, perhaps using an optional arg, but I
> don't know exactly what this difference means. Is it possible for you
> to complete it?

Yeah, I hadn't noticed that.  But it is important for the maximize code,
otherwise maximized windows would end up in the wrong viewport sometimes
when they overlap two (since it would depend on which viewport is
current).  From a quick glance at places that the absolute-position
version is used I'm not really sure whether the difference matters
there.  My guess is that it would not for sawfish.wm.ext.window-history
and sawfish.wm.swapper, but that it would for
sawfish.wm.state.configure.  But I'm not certain.

>> But what should the name be? To my mind
>> window-absolute-position seems like a very strange and non-intuitive
>> name for something that gives the position of a window relative to the
>> vp it occupies, but what do others think?
> I don't feel like another "incompatible change" notice (since
> there remain tasks, many for me, for 1.6 release). But
> my best candidate is "window-position-in-viewport"

Why don't we leave them then, for the time being?  Mark both functions
as to-be-changed in a comment and the docs, and explain the difference.
Having the extra function there isn't hurting anything at the moment.

I can do that, if you want...  Unless you've already merged them?
>>>>> I've renamed viewport-offset to viewport-offset-pixel.
>> [...] 
>> I disagree. [...]
> Ok, then I'll change it to "viewport-offset-coord". Anyway the
> suffix is necessary, and "pixel" in doc will suffice.

I still don't thing a suffix is necessary, but I'm happier with "coord"
than "pixel".  Anyway, it doesn't matter all that much anyway.

Jeremy Hankins <nowan nowan org>

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]