* solved that damn bug that run me into debugger. yuppyyy.
* removed some comments * mouse down messages go only to the view that has focus. Yeah, they didn't. :p * solved a bug where some windows did not redraw when hiding a modal. * another bug where a floating window would not come in front for gaining focus. * added client's team_id into window title. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11918 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -424,16 +424,6 @@ void Desktop::RemoveWinBorderFromSubset(WinBorder *winBorder, WinBorder *fromWin
|
|||||||
Unlock();
|
Unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline
|
|
||||||
bool Desktop::HasWinBorder(WinBorder *winBorder)
|
|
||||||
{
|
|
||||||
bool isIn = false;
|
|
||||||
Lock();
|
|
||||||
isIn = fWinBorderList.HasItem(winBorder);
|
|
||||||
Unlock();
|
|
||||||
return isIn;
|
|
||||||
}
|
|
||||||
|
|
||||||
WinBorder* Desktop::FindWinBorderByServerWindowTokenAndTeamID(int32 token, team_id teamID)
|
WinBorder* Desktop::FindWinBorderByServerWindowTokenAndTeamID(int32 token, team_id teamID)
|
||||||
{
|
{
|
||||||
WinBorder* wb;
|
WinBorder* wb;
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ public:
|
|||||||
void RemoveWinBorder(WinBorder *winBorder);
|
void RemoveWinBorder(WinBorder *winBorder);
|
||||||
void AddWinBorderToSubset(WinBorder *winBorder, WinBorder *toWinBorder);
|
void AddWinBorderToSubset(WinBorder *winBorder, WinBorder *toWinBorder);
|
||||||
void RemoveWinBorderFromSubset(WinBorder *winBorder, WinBorder *fromWinBorder);
|
void RemoveWinBorderFromSubset(WinBorder *winBorder, WinBorder *fromWinBorder);
|
||||||
bool HasWinBorder(WinBorder *winBorder);
|
|
||||||
|
|
||||||
WinBorder* FindWinBorderByServerWindowTokenAndTeamID(int32 token, team_id teamID);
|
WinBorder* FindWinBorderByServerWindowTokenAndTeamID(int32 token, team_id teamID);
|
||||||
// get list of registed windows
|
// get list of registed windows
|
||||||
|
|||||||
@@ -344,13 +344,7 @@ Layer* RootLayer::VirtualTopChild() const
|
|||||||
fWinBorderIndex = fWinBorderCount-1;
|
fWinBorderIndex = fWinBorderCount-1;
|
||||||
|
|
||||||
if (fWinBorderIndex < fWinBorderCount && fWinBorderIndex >= 0)
|
if (fWinBorderIndex < fWinBorderCount && fWinBorderIndex >= 0)
|
||||||
{
|
return fWinBorderList[fWinBorderIndex--];
|
||||||
WinBorder *wb = fWinBorderList[fWinBorderIndex];
|
|
||||||
fWinBorderIndex--;
|
|
||||||
//printf("Adi: VTC: %p.\n", wb);
|
|
||||||
// return fWinBorderList[fWinBorderIndex--];
|
|
||||||
return wb;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -358,13 +352,7 @@ Layer* RootLayer::VirtualTopChild() const
|
|||||||
Layer* RootLayer::VirtualLowerSibling() const
|
Layer* RootLayer::VirtualLowerSibling() const
|
||||||
{
|
{
|
||||||
if (fWinBorderIndex < fWinBorderCount && fWinBorderIndex > 0)
|
if (fWinBorderIndex < fWinBorderCount && fWinBorderIndex > 0)
|
||||||
{
|
return fWinBorderList[fWinBorderIndex--];
|
||||||
WinBorder *wb = fWinBorderList[fWinBorderIndex];
|
|
||||||
fWinBorderIndex--;
|
|
||||||
//printf("Adi: VLS: %p.\n", wb);
|
|
||||||
return wb;
|
|
||||||
// return fWinBorderList[fWinBorderIndex--];
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -372,13 +360,7 @@ Layer* RootLayer::VirtualLowerSibling() const
|
|||||||
Layer* RootLayer::VirtualUpperSibling() const
|
Layer* RootLayer::VirtualUpperSibling() const
|
||||||
{
|
{
|
||||||
if (fWinBorderIndex < fWinBorderCount && fWinBorderIndex > 0)
|
if (fWinBorderIndex < fWinBorderCount && fWinBorderIndex > 0)
|
||||||
{
|
return fWinBorderList[fWinBorderIndex++];
|
||||||
WinBorder *wb = fWinBorderList[fWinBorderIndex];
|
|
||||||
fWinBorderIndex++;
|
|
||||||
//printf("Adi: VUS: %p.\n", wb);
|
|
||||||
return wb;
|
|
||||||
// return fWinBorderList[fWinBorderIndex++];
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -388,13 +370,7 @@ Layer* RootLayer::VirtualBottomChild() const
|
|||||||
fWinBorderIndex = 0;
|
fWinBorderIndex = 0;
|
||||||
|
|
||||||
if (fWinBorderIndex < fWinBorderCount && fWinBorderIndex >= 0)
|
if (fWinBorderIndex < fWinBorderCount && fWinBorderIndex >= 0)
|
||||||
{
|
return fWinBorderList[fWinBorderIndex++];
|
||||||
WinBorder *wb = fWinBorderList[fWinBorderIndex];
|
|
||||||
fWinBorderIndex++;
|
|
||||||
//printf("Adi: VBC: %p.\n", wb);
|
|
||||||
return wb;
|
|
||||||
// return fWinBorderList[fWinBorderIndex++];
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -966,8 +942,10 @@ void RootLayer::MouseEventHandler(int32 code, BPortLink& msg)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (exFocus != FocusWinBorder()
|
if (target != FocusWinBorder())
|
||||||
&& !(target->Window()->Flags() & B_WILL_ACCEPT_FIRST_CLICK))
|
sendMessage = false;
|
||||||
|
else if (exFocus != FocusWinBorder()
|
||||||
|
&& !(target->Window()->Flags() & B_WILL_ACCEPT_FIRST_CLICK))
|
||||||
sendMessage = false;
|
sendMessage = false;
|
||||||
|
|
||||||
target->MouseDown(evt, sendMessage);
|
target->MouseDown(evt, sendMessage);
|
||||||
@@ -1000,7 +978,8 @@ void RootLayer::MouseEventHandler(int32 code, BPortLink& msg)
|
|||||||
// currently mouse up goes to the same window which received mouse down
|
// currently mouse up goes to the same window which received mouse down
|
||||||
if (fMouseTarget)
|
if (fMouseTarget)
|
||||||
{
|
{
|
||||||
fMouseTarget->MouseUp(evt);
|
if (fMouseTarget == FocusWinBorder())
|
||||||
|
fMouseTarget->MouseUp(evt);
|
||||||
fMouseTarget = NULL;
|
fMouseTarget = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1562,6 +1541,10 @@ void RootLayer::show_winBorder(WinBorder *winBorder)
|
|||||||
|
|
||||||
if (fWorkspace[i] &&
|
if (fWorkspace[i] &&
|
||||||
(fWorkspace[i]->HasWinBorder(winBorder) ||
|
(fWorkspace[i]->HasWinBorder(winBorder) ||
|
||||||
|
// subset modals are a bit like floating windows, they are being added
|
||||||
|
// and removed from workspace when there's at least a normal window
|
||||||
|
// that uses them.
|
||||||
|
winBorder->Level() == B_MODAL_APP ||
|
||||||
// floating windows are inserted/removed on-the-fly so this window,
|
// floating windows are inserted/removed on-the-fly so this window,
|
||||||
// although needed may not be in workspace's list.
|
// although needed may not be in workspace's list.
|
||||||
winBorder->Level() == B_FLOATING_APP))
|
winBorder->Level() == B_FLOATING_APP))
|
||||||
@@ -1649,10 +1632,6 @@ void RootLayer::get_workspace_windows()
|
|||||||
|
|
||||||
if (!present)
|
if (!present)
|
||||||
empty_visible_regions(fWinBorderList2[i]);
|
empty_visible_regions(fWinBorderList2[i]);
|
||||||
// {
|
|
||||||
// fWinBorderList2[i]->fVisible.MakeEmpty();
|
|
||||||
// fWinBorderList2[i]->fFullVisible.MakeEmpty();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// enlarge 2nd buffer also
|
// enlarge 2nd buffer also
|
||||||
|
|||||||
@@ -198,7 +198,9 @@ ServerWindow::ServerWindow(BRect rect, const char *string, uint32 wlook,
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
void ServerWindow::Init(void)
|
void ServerWindow::Init(void)
|
||||||
{
|
{
|
||||||
fWinBorder = new WinBorder( fFrame, fTitle.String(), fLook, fFeel, 0UL,
|
char newName[256];
|
||||||
|
sprintf(newName, "%ld: %s", fClientTeamID, fTitle.String());
|
||||||
|
fWinBorder = new WinBorder( fFrame, newName, fLook, fFeel, 0UL,
|
||||||
this, desktop->GetDisplayDriver());
|
this, desktop->GetDisplayDriver());
|
||||||
|
|
||||||
// Spawn our message-monitoring thread
|
// Spawn our message-monitoring thread
|
||||||
@@ -1166,7 +1168,10 @@ void ServerWindow::DispatchMessage(int32 code, LinkMsgReader &link)
|
|||||||
case AS_LAYER_CLIP_TO_PICTURE:
|
case AS_LAYER_CLIP_TO_PICTURE:
|
||||||
{
|
{
|
||||||
DTRACE(("ServerWindow %s: Message AS_LAYER_CLIP_TO_PICTURE: Layer: %s\n",fTitle.String(), cl->fName->String()));
|
DTRACE(("ServerWindow %s: Message AS_LAYER_CLIP_TO_PICTURE: Layer: %s\n",fTitle.String(), cl->fName->String()));
|
||||||
|
|
||||||
|
// TODO: you are not allowed to use Layer regions here!!!
|
||||||
|
// If there is no other way, then first lock RootLayer object first.
|
||||||
|
|
||||||
// TODO: Watch out for the coordinate system in AS_LAYER_CLIP_TO_PICTURE
|
// TODO: Watch out for the coordinate system in AS_LAYER_CLIP_TO_PICTURE
|
||||||
int32 pictureToken;
|
int32 pictureToken;
|
||||||
BPoint where;
|
BPoint where;
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ bool Workspace::GetWinBorderList(void **list, int32 *itemCount ) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
@@ -589,7 +589,7 @@ STRACE(("W(%ld)::HideWinBorder(%s) \n", fID, winBorder? winBorder->GetName(): "N
|
|||||||
fFocusItem = NULL;
|
fFocusItem = NULL;
|
||||||
newFront = findNextFront();
|
newFront = findNextFront();
|
||||||
if (newFront)
|
if (newFront)
|
||||||
MoveToFront(newFront->layerPtr);
|
returnValue = MoveToFront(newFront->layerPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// floating windows can have focus state. what if this removed window is
|
// floating windows can have focus state. what if this removed window is
|
||||||
|
|||||||
Reference in New Issue
Block a user