Commit b6603b4c authored by Erwan Tulou's avatar Erwan Tulou

skins2: fix maximizing a window in a multi-screen context.

  The current screen in a multi-screen config is chosen to
  maximize the window instead of the default main screen.

  This fixes trac #16500
parent 60aae68d
......@@ -325,7 +325,11 @@ void WindowManager::maximize( TopWindow &rWindow )
rWindow.getLeft() + rWindow.getWidth(),
rWindow.getTop() + rWindow.getHeight() );
SkinsRect workArea = OSFactory::instance( getIntf() )->getWorkArea();
// maximise the window within the current screen (multiple screens allowed)
int x, y, width, height;
rWindow.getMonitorInfo( &x, &y, &width, &height );
SkinsRect workArea(x, y, x + width, y + height);
// Move the window
startMove( rWindow );
move( rWindow, workArea.getLeft(), workArea.getTop() );
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment