[haiku-appserver] Re: weird R5 behaviour with regards to follow mode

  • From: jonathanthompson@xxxxxxxxxxxxxxxxxxxxxxx
  • To: <haiku-appserver@xxxxxxxxxxxxx>
  • Date: Wed, 19 Apr 2006 09:34:41 -0400

It blows goats that R5's behavior is inconsistent, and there's some semblance 
of consistency with the other things stated.  However, since Haiku R1 is 
supposed to be compatible with R5, the best thing to avoid messing up existing 
applications (I'd be surprised if there aren't a few that also use FOLLOW_NONE 
like yours and rely on that) is to figure out what crack pipe R5 is smoking and 
smoking the same crack :P

>Hi all,
>
>the other day, I had a weird problem in one of my apps with regards to view 
>follow modes. I had a couple of views set to B_FOLLOW_NONE. Their parent 
>view was set to B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM. When the parent view was 
>moved because its parent view was resized, the B_FOLLOW_NONE children 
>actually stayed fixed with regards to window coordinates.
>So I've written a small test app for the test environment that was supposed 
>to demonstrate the behaviour. It turned out however, that R5 behaves 
>inconsistently.
>
>hierarchy:
>View1 -> View2 (B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM) -> View3 (B_FOLLOW_NONE)
>
>Indeed, if View2 is *moved* within its parent because the parent is 
>*resized*, View3 stay fixed (*moves* within View2 so that it stays fixed in 
>window space). However, if View2 is moved programmatically then View3 moves 
>along as if it had B_FOLLOW_LEFT | B_FOLLOW_TOP!!
>
>In our app_server, B_FOLLOW_LEFT | B_FOLLOW_TOP is actually implicit. 
>Children views *always* move along with their parent. The follow modes are 
>only interesting with regards to parent views being resized. Since you 
>cannot resize a views left or top side (that's considered moving the view 
>plus resizing it), B_FOLLOW_LEFT and B_FOLLOW_TOP don't really have any 
>meaning. I think our logic is consistent (the coordinate system is simply 
>inherited).
>
>I can not see the logic in what R5 is doing. If it worked in such a way 
>that B_FOLLOW_NONE makes sure a view stays fixed in window space regardless 
>of its parent, then it would make some sense. However, if the difference is 
>the *reason* for the parents movement, then I consider it a bug.
>
>Any comments (should B_FOLLOW_NONE make sure a view stays fixed in window 
>space)?
>
>Best regards,
>-Stephan
>

Other related posts: