Kaydet (Commit) 955b18d4 authored tarafından Michael Meeks's avatar Michael Meeks

vcl: second part of fix for fdo#43458 - get xrandr / y positioning right

üst 8d151e0e
...@@ -80,30 +80,33 @@ public: ...@@ -80,30 +80,33 @@ public:
virtual sal_Bool Close(); virtual sal_Bool Close();
/** The default value of nDisplay = -1 means "don't care" and /** The default value of nDisplayScreen = -1 means "don't care" and
allows to backends to use any screen [** or display? terminology!] allows to backends to use any screen they like (most probably
they like (most probably the current one). the current one).
NOTE: The default value cannot be 0, because 0 is a legitimate NOTE: The default value cannot be 0, because 0 is a legitimate
screen number. Display Screen number.
*/ */
void ShowFullScreenMode( sal_Bool bFullScreenMode = sal_True, sal_Int32 nDisplay = -1 ); void ShowFullScreenMode( sal_Bool bFullScreenMode = sal_True,
sal_Int32 nDisplayScreen = -1 );
void EndFullScreenMode() { ShowFullScreenMode( sal_False ); } void EndFullScreenMode() { ShowFullScreenMode( sal_False ); }
sal_Bool IsFullScreenMode() const { return mbFullScreenMode; } sal_Bool IsFullScreenMode() const { return mbFullScreenMode; }
void StartPresentationMode( sal_Bool bPresentation = sal_True, sal_uInt16 nFlags = 0, sal_Int32 nDisplay = 0 ); void StartPresentationMode( sal_Bool bPresentation = sal_True,
sal_uInt16 nFlags = 0,
sal_Int32 nDisplayScreen = 0 );
void EndPresentationMode() { StartPresentationMode( sal_False ); } void EndPresentationMode() { StartPresentationMode( sal_False ); }
sal_Bool IsPresentationMode() const { return mbPresentationMode; } sal_Bool IsPresentationMode() const { return mbPresentationMode; }
sal_Bool IsMinimized() const; sal_Bool IsMinimized() const;
sal_Bool SetPluginParent( SystemParentData* pParent ); sal_Bool SetPluginParent( SystemParentData* pParent );
void Minimize(); void Minimize();
void Restore(); void Restore();
void Maximize( sal_Bool bMaximize = sal_True ); void Maximize( sal_Bool bMaximize = sal_True );
sal_Bool IsMaximized() const; sal_Bool IsMaximized() const;
}; };
#endif // _SV_WRKWIN_HXX #endif // _SV_WRKWIN_HXX
......
...@@ -178,15 +178,15 @@ WorkWindow::~WorkWindow() ...@@ -178,15 +178,15 @@ WorkWindow::~WorkWindow()
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
void WorkWindow::ShowFullScreenMode( sal_Bool bFullScreenMode, sal_Int32 nDisplay ) void WorkWindow::ShowFullScreenMode( sal_Bool bFullScreenMode, sal_Int32 nDisplayScreen )
{ {
if ( !mbFullScreenMode == !bFullScreenMode ) if ( !mbFullScreenMode == !bFullScreenMode )
return; return;
if( (nDisplay < 0) if( (nDisplayScreen < 0)
|| (nDisplay >= static_cast<sal_Int32>(Application::GetScreenCount()) ) ) || (nDisplayScreen >= static_cast<sal_Int32>(Application::GetScreenCount()) ) )
{ {
nDisplay = GetScreenNumber(); nDisplayScreen = GetScreenNumber();
} }
mbFullScreenMode = bFullScreenMode != 0; mbFullScreenMode = bFullScreenMode != 0;
...@@ -205,13 +205,13 @@ void WorkWindow::ShowFullScreenMode( sal_Bool bFullScreenMode, sal_Int32 nDispla ...@@ -205,13 +205,13 @@ void WorkWindow::ShowFullScreenMode( sal_Bool bFullScreenMode, sal_Int32 nDispla
} }
mpWindowImpl->mpFrameWindow->mpWindowImpl->mbWaitSystemResize = sal_True; mpWindowImpl->mpFrameWindow->mpWindowImpl->mbWaitSystemResize = sal_True;
ImplGetFrame()->ShowFullScreen( bFullScreenMode, nDisplay ); ImplGetFrame()->ShowFullScreen( bFullScreenMode, nDisplayScreen );
} }
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
void WorkWindow::StartPresentationMode( sal_Bool bPresentation, sal_uInt16 nFlags, sal_Int32 nDisplay ) void WorkWindow::StartPresentationMode( sal_Bool bPresentation, sal_uInt16 nFlags, sal_Int32 nDisplayScreen )
{ {
if ( !bPresentation == !mbPresentationMode ) if ( !bPresentation == !mbPresentationMode )
return; return;
...@@ -224,7 +224,7 @@ void WorkWindow::StartPresentationMode( sal_Bool bPresentation, sal_uInt16 nFlag ...@@ -224,7 +224,7 @@ void WorkWindow::StartPresentationMode( sal_Bool bPresentation, sal_uInt16 nFlag
mnPresentationFlags = nFlags; mnPresentationFlags = nFlags;
if ( !(mnPresentationFlags & PRESENTATION_NOFULLSCREEN) ) if ( !(mnPresentationFlags & PRESENTATION_NOFULLSCREEN) )
ShowFullScreenMode( sal_True, nDisplay ); ShowFullScreenMode( sal_True, nDisplayScreen );
if ( !mbSysChild ) if ( !mbSysChild )
{ {
if ( mnPresentationFlags & PRESENTATION_HIDEALLAPPS ) if ( mnPresentationFlags & PRESENTATION_HIDEALLAPPS )
...@@ -246,7 +246,7 @@ void WorkWindow::StartPresentationMode( sal_Bool bPresentation, sal_uInt16 nFlag ...@@ -246,7 +246,7 @@ void WorkWindow::StartPresentationMode( sal_Bool bPresentation, sal_uInt16 nFlag
if ( mnPresentationFlags & PRESENTATION_HIDEALLAPPS ) if ( mnPresentationFlags & PRESENTATION_HIDEALLAPPS )
mpWindowImpl->mpFrame->SetAlwaysOnTop( sal_False ); mpWindowImpl->mpFrame->SetAlwaysOnTop( sal_False );
} }
ShowFullScreenMode( mbPresentationFull, nDisplay ); ShowFullScreenMode( mbPresentationFull, nDisplayScreen );
mbPresentationMode = sal_False; mbPresentationMode = sal_False;
mbPresentationVisible = sal_False; mbPresentationVisible = sal_False;
......
...@@ -1880,7 +1880,7 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, int eType, Rectangle *pSiz ...@@ -1880,7 +1880,7 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, int eType, Rectangle *pSiz
if( eType == SET_FULLSCREEN ) if( eType == SET_FULLSCREEN )
{ {
maGeometry.nX = aNewMonitor.x; maGeometry.nX = aNewMonitor.x;
maGeometry.nY = aNewMonitor.x; maGeometry.nY = aNewMonitor.y;
maGeometry.nWidth = aNewMonitor.width; maGeometry.nWidth = aNewMonitor.width;
maGeometry.nHeight = aNewMonitor.height; maGeometry.nHeight = aNewMonitor.height;
m_nStyle |= SAL_FRAME_STYLE_PARTIAL_FULLSCREEN; m_nStyle |= SAL_FRAME_STYLE_PARTIAL_FULLSCREEN;
......
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