Martin Dietze wrote:
> On Thu, September 10, 2009, Martin Dietze wrote:
> 
>> Now the window maximises, but in its original screen, i.e. it
>> gets "warped" back before the maximisation is performed. I can
>> then drag it to the larger screen again and maximise again, and
>> then the effect is gone, i.e. it is maximised in the right
>> screen. 
> 
> Did some more testing, it seems like this effect can be
> reproduced this way:
> 
> Open a window on screen 1. 
> Maximise it.
> Drag it to screen 2.
> Unmaximise it.
> 
> The window will be unmaximised to screen 1.
> This effect is repeatable, i.e. it does not only happen the
> first time. 

Oh, this description makes much more sense to me now!

In fact when this email arrived I was thinking how the changes
to the un-maximization stuff could be causing this, and I was
a bit lost about it.

But now I understand why it happens. When I "cleaned up" the
unmaximization logic I did that

        save_old_geometry(wwin)

to save the old coordinates before maximizing, so that wmaker
could use them when it detects that you want to un-maximize the
window by hitting the maximize shortcut again, to get back
to the original geometry before you hit maximize for the first
time.

So the problem is that it really saves the old geometry, including
the fact that it was in the "old" screen before.

It is annoying in your case, and it was not happening before so
I should try to fix it (although I don't have how to test it myself).
I think it could be done by checking whether the un-maximization
step is happening in the same screen as the old geometry coordinates,
and if not, update the old geometry to point to the new screen (but
with the old x and y coords).

I guess it makes sense from the point of view restoring the
old geometry when you hit the maximize shortcut twice, but
"makes sense" is not always equal to "does not annoy me".


-- 
To unsubscribe, send mail to [email protected].

Reply via email to