Added cases for Minimize buttons in decorators

Buttons on up-to-date decorators now work properly


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7957 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
DarkWyrm
2004-06-14 20:32:21 +00:00
parent 0468f4215d
commit a3031ab19b
2 changed files with 28 additions and 4 deletions
+15 -2
View File
@@ -379,6 +379,10 @@ bool ServerWindow::IsHidden(void)
void ServerWindow::Minimize(bool status)
{
// This function doesn't need much -- check to make sure that we should and
// send the message to the client. According to the BeBook, the BWindow hook function
// does all the heavy lifting for us. :)
bool sendMessages = false;
if (status)
@@ -406,8 +410,6 @@ void ServerWindow::Minimize(bool status)
msg.AddBool("minimize", status);
SendMessageToClient(&msg);
// TODO: Do we need to notify Tracker? The Deskbar? If so, how?
}
}
@@ -2248,6 +2250,17 @@ int32 ServerWindow::MonitorWin(void *data)
delete win;
break;
}
// TODO: This message is never received.... why?
/* case AS_QUIT_APP:
{
// We receive this _only_ when the server is shutting down. The app_server
// is not asking the app to quit - it's *telling* it to quit because
// in just a short time, the server itself is going to disappear.
BMessage msg(_QUIT_);
win->SendMessageToClient(&msg);
}
*/
case B_QUIT_REQUESTED:
{
STRACE(("ServerWindow %s received Quit request\n",win->Title()));
+11
View File
@@ -222,6 +222,14 @@ void WinBorder::MouseDown(PortMessage *msg)
STRACE_CLICK(("===> DEC_ZOOM\n"));
break;
}
case DEC_MINIMIZE:
{
fIsMinimizing = true;
fDecorator->SetMinimize(true);
fDecorator->DrawMinimize();
STRACE_CLICK(("===> DEC_MINIMIZE\n"));
break;
}
case DEC_RESIZE:
{
fIsResizing = true;
@@ -342,6 +350,7 @@ void WinBorder::MouseUp(PortMessage *msg)
fIsZooming = false;
fDecorator->SetZoom(false);
fDecorator->DrawZoom();
Window()->Zoom();
return;
}
if (fIsClosing)
@@ -349,6 +358,7 @@ void WinBorder::MouseUp(PortMessage *msg)
fIsClosing = false;
fDecorator->SetClose(false);
fDecorator->DrawClose();
Window()->Quit();
return;
}
if(fIsMinimizing)
@@ -356,6 +366,7 @@ void WinBorder::MouseUp(PortMessage *msg)
fIsMinimizing = false;
fDecorator->SetMinimize(false);
fDecorator->DrawMinimize();
Window()->Minimize(true);
return;
}
}