Browse Source

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
pull/39/head
Erwan Tulou 10 years ago
parent
commit
b6603b4c8c
  1. 6
      modules/gui/skins2/src/window_manager.cpp

6
modules/gui/skins2/src/window_manager.cpp

@ -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() );

Loading…
Cancel
Save