MediaPlayer: make sure info window is on screen.
This commit is contained in:
parent
aeb121ec03
commit
9b61a43ad6
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user