MediaPlayer: make sure info window is on screen.

This commit is contained in:
Axel Dörfler 2015-01-14 08:59:17 +01:00
parent aeb121ec03
commit 9b61a43ad6

View File

@ -32,6 +32,7 @@
#include <MessageFormat.h>
#include <Mime.h>
#include <NodeInfo.h>
#include <Screen.h>
#include <String.h>
#include <StringForRate.h>
#include <StringView.h>
@ -219,6 +220,13 @@ InfoWin::InfoWin(BPoint leftTop, Controller* controller)
fController->AddListener(fControllerObserver);
Update();
// Move window on screen if needed
BScreen screen(this);
if (screen.Frame().bottom < Frame().bottom)
MoveBy(0, screen.Frame().bottom - Frame().bottom);
if (screen.Frame().right < Frame().right)
MoveBy(0, screen.Frame().right - Frame().right);
Show();
}