Add a temporary backwards compatibility fix for applications that accidently
mix up the resizingMode and flags field in the BView constructor. This does not cause problems under BeOS but was causing wrong follow modes when those applications were run under Haiku. In case such an application is detetected a corresponding warning is printed out. Also added a comment explaining the rational behind the change and a ToDo for the later cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23424 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
f82c11c079
commit
5d196712c9
@ -4193,8 +4193,18 @@ BView::_InitData(BRect frame, const char *name, uint32 resizingMode, uint32 flag
|
||||
|
||||
STRACE(("BView::InitData: enter\n"));
|
||||
|
||||
// initialize members
|
||||
fFlags = (resizingMode & _RESIZE_MASK_) | (flags & ~_RESIZE_MASK_);
|
||||
// initialize members
|
||||
if ((resizingMode & ~_RESIZE_MASK_) || (flags & _RESIZE_MASK_))
|
||||
printf("BView::InitData(): resizing mode or flags swapped\n");
|
||||
|
||||
// There are applications that swap the resize mask and the flags in the
|
||||
// BView constructor. This does not cause problems under BeOS as it just
|
||||
// ors the two fields to one 32bit flag.
|
||||
// For now we do the same but print the above warning message.
|
||||
// ToDo: this should be removed at some point and the original
|
||||
// version restored:
|
||||
// fFlags = (resizingMode & _RESIZE_MASK_) | (flags & ~_RESIZE_MASK_);
|
||||
fFlags = resizingMode | flags;
|
||||
|
||||
// handle rounding
|
||||
frame.left = roundf(frame.left);
|
||||
|
Loading…
Reference in New Issue
Block a user