[vlc-commits] skins2: fix maximizing a window in a multi-screen context.

Erwan Tulou git at videolan.org
Mon Feb 1 12:14:45 CET 2016


vlc/vlc-2.2 | branch: master | Erwan Tulou <erwan10 at videolan.org> | Thu Jan 28 20:08:00 2016 +0100| [b442adbeec75aaf03b69eac60234a21d3f1ddd5d] | committer: 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

(cherry picked from commit b6603b4c8cdcd93e8d64f686c708e5fe3beb724c)
Signed-off-by: Erwan Tulou <erwan10 at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=b442adbeec75aaf03b69eac60234a21d3f1ddd5d
---

 modules/gui/skins2/src/window_manager.cpp |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/gui/skins2/src/window_manager.cpp b/modules/gui/skins2/src/window_manager.cpp
index 093e6d3..7941cd5 100644
--- a/modules/gui/skins2/src/window_manager.cpp
+++ b/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() );



More information about the vlc-commits mailing list