On 2/23/07, Danny Baumann <[EMAIL PROTECTED]> wrote:
> I added printf statements. While the app (written in GTKMM) first sets
> the geometry hint and maximizes after that, Beryl sees first the state
> atom change even and after that the normal hint change event. Maybe GTK
> swaps the messages here?

Possibly, seems like a strange thing to do though.

> > I assume you've looked at the -v -v option in beryl? Might give some
> > more information about events, though not very complete at the moment.
> >
> > It sounds to me like we don't really evalute the size hints when we
> > receive them, but afterwards at some event. This would explain some
> > strange behavior we've seen with other bugs in the past too (like the
> > OOo bug or xinerama maximization).
>
> I've tracked it down with printf statements I added. What happens is the
> following:
> - There is a state change message. Because of that,
> updateWindowAttributes is called (event.c:1315). This function in
> principle updates the window state and size.
> - updateWindowAttributes calls (among other things) addWindowSizeChanges
> (window.c:3861), which updates the window size according to size hints
> and window state.
> - addWindowSizeChanges then calls constrainNewWindowSize
> (window.c:3475), which applies the maximum window width constraint and
> thus hinders the windows from getting the "maximized size". That
> function call may be the place to reset the maximization flags if it
> fails.

Not sure about that, then we wouldn't be able to restore the size.
Consider a window with default size 100x100 and maximum size
1000x1000, if you hit maximize, it would go to 1000x1000, which
wouldn't be 1280x1024 (for instance), and with your suggestion, there
would be no way to get the original size of 100x100 back for the user,
except manually resizing the window.

> - In case of the normal hint change, updateWindowAttributes is never
> called (event.c:1966), so the window size isn't updated when these hints
> change (should we call updateWindowAttributes here?)

I definitly think we should, makes sense to verify the size after a
change in the size hints for a number of reasons. Wether we should
honor the default size or not is another question but that's not as
important, I doubt programs wishing to resize their window will do it
through changing the size hint.

> - If one clicks on a window, updateWindowAttributes is called
> (event.c:1867) and thus the window size is updated

Do you know why this is done? It seems like a fallback saftey solution
in case we had some changes that we never registered (Like we have
now, for instance), the attributes of a window shouldn't change just
by clicking a button... Ideally, I belive we shouldn't have to do this
at all.

-- 
Regards
Kristian
_______________________________________________
beryl-dev mailing list
beryl-dev@lists.beryl-project.org
http://lists.beryl-project.org/mailman/listinfo/beryl-dev

Reply via email to