summaryrefslogtreecommitdiff
path: root/vcl/source/window/wrkwin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/wrkwin.cxx')
-rw-r--r--vcl/source/window/wrkwin.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx
index 5aea77559cb7..b993896ad980 100644
--- a/vcl/source/window/wrkwin.cxx
+++ b/vcl/source/window/wrkwin.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: wrkwin.cxx,v $
- * $Revision: 1.21 $
+ * $Revision: 1.21.138.2 $
*
* This file is part of OpenOffice.org.
*
@@ -196,6 +196,12 @@ void WorkWindow::ShowFullScreenMode( BOOL bFullScreenMode, sal_Int32 nDisplay )
if ( !mbFullScreenMode == !bFullScreenMode )
return;
+ if( (nDisplay < 0)
+ || (nDisplay >= static_cast<sal_Int32>(Application::GetScreenCount()) ) )
+ {
+ nDisplay = GetScreenNumber();
+ }
+
mbFullScreenMode = bFullScreenMode != 0;
if ( !mbSysChild )
{