According to Stephan the bug I wrote this code for (#1307) is no longer an

issue. Since there may be valid reasons to have part of the media player window
offscreen this code could get annoying. I still think it is pretty though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31551 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ryan Leavengood
2009-07-14 04:36:17 +00:00
parent ab49b58c80
commit b097110bfb
-25
View File
@@ -671,31 +671,6 @@ MainWin::MessageReceived(BMessage *msg)
void
MainWin::WindowActivated(bool active)
{
if (active) {
BScreen screen(this);
BRect screenFrame = screen.Frame();
BRect frame = Frame();
float diffX = 0.0;
float diffY = 0.0;
// If the frame is off the edge of the screen at all
// we will move it so all the window is on the screen.
if (frame.right > screenFrame.right)
// Move left
diffX = screenFrame.right - frame.right;
if (frame.bottom > screenFrame.bottom)
// Move up
diffY = screenFrame.bottom - frame.bottom;
if (frame.left < screenFrame.left)
// Move right
diffX = screenFrame.left - frame.left;
if (frame.top < screenFrame.top)
// Move down
diffY = screenFrame.top - frame.top;
MoveBy(diffX, diffY);
}
fController->PlayerActivated(active);
}