Hi,
I put that bookmark there to remind me that I haven't tested the new code inside this method with floating windows. I think there is a problem in that a floating window decorator needs to be invalidated sometimes to give of to take the highlighted state.
Okay, I'll write a floating window test app some day later, if you don't have a good one (under R5, I just used ArtPaint for this, maybe it works under Haiku as well).
The only problem is: floating windows are broken since July. By you. :-)
Will try to fix this shortly.
R5 defines 3 window concepts: Active, Front and Focus.
[...]
While I understand the need for Focus to get the window which accepts
KB events and Front to know the first/most-visible important window, I
don't understand the need for the term "Active"!
I think Active() is only important from the user side of things. Apart from that, I *think* it has no importance in the app_server.
Exactly! I coded Active like this: WinBorder * Workspace::Active() const { // in case of a normal or modal window if (fFrontItem && fFrontItem == fFocusItem) return fFrontItem->layerPtr;
// a floating window is considered active if it has focus. if (fFocusItem && (fFocusItem->layerPtr->Level() == B_FLOATING_APP || fFocusItem->layerPtr->Level() == B_FLOATING_ALL)) return fFocusItem->layerPtr;
return NULL; }
because I saw this was the behavior in R5.
At least with FFM, there can only be one active window, anyway, and it doesn't seem to hurt the app in question.
Now for the active window tab - I think it's a good idea to keep the border of a window with floating windows active at all times - because only then you know to which window the floating windows belong.
No problem with me. I agree; that why I put that bookmark in RootLayer. :-)
Maybe we should even introduce a third color state for this case, as it wouldn't work to well with FFM if it would be the same.
In any case, I think floating windows should just behave like any other window - ie. they can be active.
OK, but what 'active' means?
I guess BWindow::IsFront() does not take B_FLOATING_ALL_WINDOW_FEEL windows into account?
bye, Adi.