diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/brdwin.hxx | 13 | ||||
-rw-r--r-- | vcl/inc/strings.hrc | 2 | ||||
-rw-r--r-- | vcl/inc/unx/salframe.h | 1 | ||||
-rw-r--r-- | vcl/inc/unx/wmadaptor.hxx | 6 | ||||
-rw-r--r-- | vcl/source/window/brdwin.cxx | 194 | ||||
-rw-r--r-- | vcl/source/window/decoview.cxx | 13 | ||||
-rw-r--r-- | vcl/source/window/dockmgr.cxx | 8 | ||||
-rw-r--r-- | vcl/source/window/dockwin.cxx | 22 | ||||
-rw-r--r-- | vcl/source/window/floatwin.cxx | 3 | ||||
-rw-r--r-- | vcl/source/window/syswin.cxx | 48 | ||||
-rw-r--r-- | vcl/unx/generic/app/wmadaptor.cxx | 94 | ||||
-rw-r--r-- | vcl/unx/generic/window/salframe.cxx | 5 |
12 files changed, 59 insertions, 350 deletions
diff --git a/vcl/inc/brdwin.hxx b/vcl/inc/brdwin.hxx index deb2cdd182a8..a1be28112799 100644 --- a/vcl/inc/brdwin.hxx +++ b/vcl/inc/brdwin.hxx @@ -54,13 +54,12 @@ enum class BorderWindowHitTest { BottomLeft = 0x0100, BottomRight = 0x0200, Close = 0x0400, - Roll = 0x0800, - Dock = 0x1000, - Hide = 0x2000, - Help = 0x4000, + Dock = 0x0800, + Hide = 0x1000, + Help = 0x2000, }; namespace o3tl { - template<> struct typed_flags<BorderWindowHitTest> : is_typed_flags<BorderWindowHitTest, 0x7fff> {}; + template<> struct typed_flags<BorderWindowHitTest> : is_typed_flags<BorderWindowHitTest, 0x3fff> {}; }; enum class BorderWindowTitleType { @@ -95,7 +94,6 @@ private: bool mbFloatWindow; bool mbSmallOutBorder; bool mbFrameBorder; - bool mbRollUp; bool mbMenuHide; bool mbDockBtn; bool mbHideBtn; @@ -143,7 +141,6 @@ public: void SetTitleType( BorderWindowTitleType nTitleType, const Size& rSize ); void SetBorderStyle( WindowBorderStyle nStyle ); WindowBorderStyle GetBorderStyle() const { return mnBorderStyle; } - void SetRollUp( bool bRollUp, const Size& rSize ); void SetCloseButton(); void SetDockButton( bool bDockButton ); void SetHideButton( bool bHideButton ); @@ -179,7 +176,6 @@ struct ImplBorderFrameData VclPtr<OutputDevice> mpOutDev; tools::Rectangle maTitleRect; tools::Rectangle maCloseRect; - tools::Rectangle maRollRect; tools::Rectangle maDockRect; tools::Rectangle maMenuRect; tools::Rectangle maHideRect; @@ -200,7 +196,6 @@ struct ImplBorderFrameData tools::Long mnTitleHeight; BorderWindowHitTest mnHitTest; DrawButtonFlags mnCloseState; - DrawButtonFlags mnRollState; DrawButtonFlags mnDockState; DrawButtonFlags mnMenuState; DrawButtonFlags mnHideState; diff --git a/vcl/inc/strings.hrc b/vcl/inc/strings.hrc index 11ba428d5798..11b9268f2e1f 100644 --- a/vcl/inc/strings.hrc +++ b/vcl/inc/strings.hrc @@ -34,8 +34,6 @@ #define SV_HELPTEXT_MINIMIZE NC_("SV_HELPTEXT_MINIMIZE", "Minimize") #define SV_HELPTEXT_MAXIMIZE NC_("SV_HELPTEXT_MAXIMIZE", "Maximize") #define SV_HELPTEXT_RESTORE NC_("SV_HELPTEXT_RESTORE", "Restore") -#define SV_HELPTEXT_ROLLDOWN NC_("SV_HELPTEXT_ROLLDOWN", "Drop down") -#define SV_HELPTEXT_ROLLUP NC_("SV_HELPTEXT_ROLLUP", "Roll up") #define SV_HELPTEXT_HELP NC_("SV_HELPTEXT_HELP", "Help") #define SV_HELPTEXT_SCREENSHOT NC_("SV_HELPTEXT_SCREENSHOT", "Take and annotate a screenshot") #define SV_HELPTEXT_FADEIN NC_("SV_HELPTEXT_FADEIN", "Show") diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h index 35f41e687229..7bc7b8bc3167 100644 --- a/vcl/inc/unx/salframe.h +++ b/vcl/inc/unx/salframe.h @@ -110,7 +110,6 @@ class X11SalFrame final : public SalFrame WMWindowType meWindowType; bool mbMaximizedVert; bool mbMaximizedHorz; - bool mbShaded; bool mbFullScreen; // icon id diff --git a/vcl/inc/unx/wmadaptor.hxx b/vcl/inc/unx/wmadaptor.hxx index 99420b3066c9..e76ba4d36938 100644 --- a/vcl/inc/unx/wmadaptor.hxx +++ b/vcl/inc/unx/wmadaptor.hxx @@ -54,7 +54,6 @@ public: NET_WM_STATE_MAXIMIZED_HORZ, NET_WM_STATE_MAXIMIZED_VERT, NET_WM_STATE_MODAL, - NET_WM_STATE_SHADED, NET_WM_STATE_SKIP_PAGER, NET_WM_STATE_SKIP_TASKBAR, NET_WM_STATE_STAYS_ON_TOP, @@ -235,11 +234,6 @@ public: bool supportsFullScreen() const { return m_aWMAtoms[ NET_WM_STATE_FULLSCREEN ] != 0; } /* - * shade/unshade frame - */ - virtual void shade( X11SalFrame* pFrame, bool bToShaded ) const; - - /* * set hints what decoration is needed; * must be called before showing the frame */ diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 976ee9b4fedc..d01e1e0eecb0 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -179,8 +179,6 @@ BorderWindowHitTest ImplBorderWindowView::ImplHitTest( ImplBorderFrameData const { if ( pData->maCloseRect.IsInside( rPos ) ) return BorderWindowHitTest::Close; - else if ( pData->maRollRect.IsInside( rPos ) ) - return BorderWindowHitTest::Roll; else if ( pData->maMenuRect.IsInside( rPos ) ) return BorderWindowHitTest::Menu; else if ( pData->maDockRect.IsInside( rPos ) ) @@ -193,8 +191,7 @@ BorderWindowHitTest ImplBorderWindowView::ImplHitTest( ImplBorderFrameData const return BorderWindowHitTest::Title; } - if ( (pBorderWindow->GetStyle() & WB_SIZEABLE) && - !pBorderWindow->mbRollUp ) + if (pBorderWindow->GetStyle() & WB_SIZEABLE) { tools::Long nSizeWidth = pData->mnNoTitleTop+pData->mnTitleHeight; if ( nSizeWidth < 16 ) @@ -301,14 +298,6 @@ OUString ImplBorderWindowView::ImplRequestHelp( ImplBorderFrameData const * pDat pHelpId = SV_HELPTEXT_CLOSE; rHelpRect = pData->maCloseRect; } - else if ( nHitTest & BorderWindowHitTest::Roll ) - { - if ( pData->mpBorderWindow->mbRollUp ) - pHelpId = SV_HELPTEXT_ROLLDOWN; - else - pHelpId = SV_HELPTEXT_ROLLUP; - rHelpRect = pData->maRollRect; - } else if ( nHitTest & BorderWindowHitTest::Dock ) { pHelpId = SV_HELPTEXT_MAXIMIZE; @@ -354,7 +343,6 @@ tools::Long ImplBorderWindowView::ImplCalcTitleWidth( const ImplBorderFrameData* ImplBorderWindow* pBorderWindow = pData->mpBorderWindow; tools::Long nTitleWidth = pBorderWindow->GetTextWidth( pBorderWindow->GetText() )+6; nTitleWidth += pData->maCloseRect.GetWidth(); - nTitleWidth += pData->maRollRect.GetWidth(); nTitleWidth += pData->maDockRect.GetWidth(); nTitleWidth += pData->maMenuRect.GetWidth(); nTitleWidth += pData->maHideRect.GetWidth(); @@ -747,7 +735,6 @@ ImplStdBorderWindowView::ImplStdBorderWindowView( ImplBorderWindow* pBorderWindo maFrameData.mbDragFull = false; maFrameData.mnHitTest = BorderWindowHitTest::NONE; maFrameData.mnCloseState = DrawButtonFlags::NONE; - maFrameData.mnRollState = DrawButtonFlags::NONE; maFrameData.mnDockState = DrawButtonFlags::NONE; maFrameData.mnMenuState = DrawButtonFlags::NONE; maFrameData.mnHideState = DrawButtonFlags::NONE; @@ -784,11 +771,6 @@ bool ImplStdBorderWindowView::MouseButtonDown( const MouseEvent& rMEvt ) maFrameData.mnCloseState |= DrawButtonFlags::Pressed; pBorderWindow->InvalidateBorder(); } - else if ( maFrameData.mnHitTest & BorderWindowHitTest::Roll ) - { - maFrameData.mnRollState |= DrawButtonFlags::Pressed; - pBorderWindow->InvalidateBorder(); - } else if ( maFrameData.mnHitTest & BorderWindowHitTest::Dock ) { maFrameData.mnDockState |= DrawButtonFlags::Pressed; @@ -903,27 +885,6 @@ bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt ) } } } - else if ( nHitTest & BorderWindowHitTest::Roll ) - { - if ( maFrameData.mnRollState & DrawButtonFlags::Pressed ) - { - maFrameData.mnRollState &= ~DrawButtonFlags::Pressed; - pBorderWindow->InvalidateBorder(); - - // do not call a Click-Handler when aborting - if ( !rTEvt.IsTrackingCanceled() ) - { - if ( pBorderWindow->ImplGetClientWindow()->IsSystemWindow() ) - { - SystemWindow* pClientWindow = static_cast<SystemWindow*>(pBorderWindow->ImplGetClientWindow()); - if ( pClientWindow->IsRollUp() ) - pClientWindow->RollDown(); - else - pClientWindow->RollUp(); - } - } - } - } else if ( nHitTest & BorderWindowHitTest::Dock ) { if ( maFrameData.mnDockState & DrawButtonFlags::Pressed ) @@ -1026,25 +987,6 @@ bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt ) } } } - else if ( maFrameData.mnHitTest & BorderWindowHitTest::Roll ) - { - if ( maFrameData.maRollRect.IsInside( aMousePos ) ) - { - if ( !(maFrameData.mnRollState & DrawButtonFlags::Pressed) ) - { - maFrameData.mnRollState |= DrawButtonFlags::Pressed; - pBorderWindow->InvalidateBorder(); - } - } - else - { - if ( maFrameData.mnRollState & DrawButtonFlags::Pressed ) - { - maFrameData.mnRollState &= ~DrawButtonFlags::Pressed; - pBorderWindow->InvalidateBorder(); - } - } - } else if ( maFrameData.mnHitTest & BorderWindowHitTest::Dock ) { if ( maFrameData.maDockRect.IsInside( aMousePos ) ) @@ -1363,7 +1305,6 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, tools::Long nWidth, tool pData->maDockRect.SetEmpty(); pData->maMenuRect.SetEmpty(); pData->maHideRect.SetEmpty(); - pData->maRollRect.SetEmpty(); pData->maHelpRect.SetEmpty(); } @@ -1376,7 +1317,6 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, tools::Long nWidth, tool pData->maDockRect.SetEmpty(); pData->maMenuRect.SetEmpty(); pData->maHideRect.SetEmpty(); - pData->maRollRect.SetEmpty(); pData->maHelpRect.SetEmpty(); } } @@ -1482,8 +1422,6 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con if (!pData->maHelpRect.IsEmpty()) aInRect.SetRight( pData->maHelpRect.Left() - 2 ); - else if (!pData->maRollRect.IsEmpty()) - aInRect.SetRight( pData->maRollRect.Left() - 2 ); else if (!pData->maHideRect.IsEmpty()) aInRect.SetRight( pData->maHideRect.Left() - 2 ); else if (!pData->maDockRect.IsEmpty()) @@ -1540,18 +1478,6 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, con aSymbolRect.Move(pOffset->X(), pOffset->Y()); ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, SymbolType::HIDE, pData->mnHideState); } - if (!pData->maRollRect.IsEmpty()) - { - SymbolType eType; - if (pBorderWindow->mbRollUp) - eType = SymbolType::ROLLDOWN; - else - eType = SymbolType::ROLLUP; - tools::Rectangle aSymbolRect(pData->maRollRect); - if (pOffset) - aSymbolRect.Move(pOffset->X(), pOffset->Y()); - ImplDrawBrdWinSymbolButton(&rRenderContext, aSymbolRect, eType, pData->mnRollState); - } if (!pData->maHelpRect.IsEmpty()) { @@ -1623,7 +1549,6 @@ void ImplBorderWindow::ImplInit( vcl::Window* pParent, mnMaxWidth = SHRT_MAX; mnMaxHeight = SHRT_MAX; mnOrgMenuHeight = 0; - mbRollUp = false; mbMenuHide = false; mbDockBtn = false; mbMenuBtn = false; @@ -1739,73 +1664,70 @@ void ImplBorderWindow::Resize() { Size aSize = GetOutputSizePixel(); - if ( !mbRollUp ) - { - vcl::Window* pClientWindow = ImplGetClientWindow(); + vcl::Window* pClientWindow = ImplGetClientWindow(); - sal_Int32 nLeftBorder; - sal_Int32 nTopBorder; - sal_Int32 nRightBorder; - sal_Int32 nBottomBorder; - mpBorderView->GetBorder( nLeftBorder, nTopBorder, nRightBorder, nBottomBorder ); + sal_Int32 nLeftBorder; + sal_Int32 nTopBorder; + sal_Int32 nRightBorder; + sal_Int32 nBottomBorder; + mpBorderView->GetBorder( nLeftBorder, nTopBorder, nRightBorder, nBottomBorder ); - if (mpMenuBarWindow) + if (mpMenuBarWindow) + { + tools::Long nMenuHeight = mpMenuBarWindow->GetSizePixel().Height(); + if ( mbMenuHide ) { - tools::Long nMenuHeight = mpMenuBarWindow->GetSizePixel().Height(); - if ( mbMenuHide ) - { - if ( nMenuHeight ) - mnOrgMenuHeight = nMenuHeight; - nMenuHeight = 0; - } - else - { - if ( !nMenuHeight ) - nMenuHeight = mnOrgMenuHeight; - } - mpMenuBarWindow->setPosSizePixel( - nLeftBorder, nTopBorder, - aSize.Width()-nLeftBorder-nRightBorder, - nMenuHeight); - - // shift the notebookbar down accordingly - nTopBorder += nMenuHeight; + if ( nMenuHeight ) + mnOrgMenuHeight = nMenuHeight; + nMenuHeight = 0; } - - if (mpNotebookBar) + else { - tools::Long nNotebookBarHeight = mpNotebookBar->GetSizePixel().Height(); + if ( !nMenuHeight ) + nMenuHeight = mnOrgMenuHeight; + } + mpMenuBarWindow->setPosSizePixel( + nLeftBorder, nTopBorder, + aSize.Width()-nLeftBorder-nRightBorder, + nMenuHeight); - const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - const BitmapEx& aPersona = rStyleSettings.GetPersonaHeader(); - // since size of notebookbar changes, to make common persona for menubar - // and notebookbar persona should be set again with changed coordinates - if (!aPersona.IsEmpty()) - { - Wallpaper aWallpaper(aPersona); - aWallpaper.SetStyle(WallpaperStyle::TopRight); - aWallpaper.SetRect(tools::Rectangle(Point(0, -nTopBorder), - Size(aSize.Width() - nLeftBorder - nRightBorder, - nNotebookBarHeight + nTopBorder))); - mpNotebookBar->SetBackground(aWallpaper); - } + // shift the notebookbar down accordingly + nTopBorder += nMenuHeight; + } - mpNotebookBar->setPosSizePixel( - nLeftBorder, nTopBorder, - aSize.Width() - nLeftBorder - nRightBorder, - nNotebookBarHeight); - } + if (mpNotebookBar) + { + tools::Long nNotebookBarHeight = mpNotebookBar->GetSizePixel().Height(); - GetBorder( pClientWindow->mpWindowImpl->mnLeftBorder, pClientWindow->mpWindowImpl->mnTopBorder, - pClientWindow->mpWindowImpl->mnRightBorder, pClientWindow->mpWindowImpl->mnBottomBorder ); - pClientWindow->ImplPosSizeWindow( pClientWindow->mpWindowImpl->mnLeftBorder, - pClientWindow->mpWindowImpl->mnTopBorder, - aSize.Width()-pClientWindow->mpWindowImpl->mnLeftBorder-pClientWindow->mpWindowImpl->mnRightBorder, - aSize.Height()-pClientWindow->mpWindowImpl->mnTopBorder-pClientWindow->mpWindowImpl->mnBottomBorder, - PosSizeFlags::X | PosSizeFlags::Y | - PosSizeFlags::Width | PosSizeFlags::Height ); + const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); + const BitmapEx& aPersona = rStyleSettings.GetPersonaHeader(); + // since size of notebookbar changes, to make common persona for menubar + // and notebookbar persona should be set again with changed coordinates + if (!aPersona.IsEmpty()) + { + Wallpaper aWallpaper(aPersona); + aWallpaper.SetStyle(WallpaperStyle::TopRight); + aWallpaper.SetRect(tools::Rectangle(Point(0, -nTopBorder), + Size(aSize.Width() - nLeftBorder - nRightBorder, + nNotebookBarHeight + nTopBorder))); + mpNotebookBar->SetBackground(aWallpaper); + } + + mpNotebookBar->setPosSizePixel( + nLeftBorder, nTopBorder, + aSize.Width() - nLeftBorder - nRightBorder, + nNotebookBarHeight); } + GetBorder( pClientWindow->mpWindowImpl->mnLeftBorder, pClientWindow->mpWindowImpl->mnTopBorder, + pClientWindow->mpWindowImpl->mnRightBorder, pClientWindow->mpWindowImpl->mnBottomBorder ); + pClientWindow->ImplPosSizeWindow( pClientWindow->mpWindowImpl->mnLeftBorder, + pClientWindow->mpWindowImpl->mnTopBorder, + aSize.Width()-pClientWindow->mpWindowImpl->mnLeftBorder-pClientWindow->mpWindowImpl->mnRightBorder, + aSize.Height()-pClientWindow->mpWindowImpl->mnTopBorder-pClientWindow->mpWindowImpl->mnBottomBorder, + PosSizeFlags::X | PosSizeFlags::Y | + PosSizeFlags::Width | PosSizeFlags::Height ); + // UpdateView mpBorderView->Init( this, aSize.Width(), aSize.Height() ); InvalidateBorder(); @@ -1955,12 +1877,6 @@ void ImplBorderWindow::SetBorderStyle( WindowBorderStyle nStyle ) } } -void ImplBorderWindow::SetRollUp( bool bRollUp, const Size& rSize ) -{ - mbRollUp = bRollUp; - UpdateView( false, rSize ); -} - void ImplBorderWindow::SetCloseButton() { SetStyle( GetStyle() | WB_CLOSEABLE ); diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx index 34c534e746ab..20529e4a1aa6 100644 --- a/vcl/source/window/decoview.cxx +++ b/vcl/source/window/decoview.cxx @@ -293,19 +293,6 @@ void ImplDrawSymbol( OutputDevice* pDev, tools::Rectangle nRect, const SymbolTyp } break; - case SymbolType::ROLLDOWN: - pDev->DrawLine( Point( nRect.Left(), nRect.Top() ), - Point( nRect.Left(), nRect.Bottom() ) ); - pDev->DrawLine( Point( nRect.Right(), nRect.Top() ), - Point( nRect.Right(), nRect.Bottom() ) ); - pDev->DrawLine( Point( nRect.Left(), nRect.Bottom() ), - Point( nRect.Right(), nRect.Bottom() ) ); - [[fallthrough]]; - case SymbolType::ROLLUP: - pDev->DrawRect( tools::Rectangle( nRect.Left(), nRect.Top(), - nRect.Right(), nRect.Top()+n8 ) ); - break; - case SymbolType::CHECKMARK: { tools::Long n3 = nSide/3; diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index a8a8aebcf70c..b5e31254ac94 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -477,7 +477,6 @@ ImplDockingWindowWrapper::ImplDockingWindowWrapper( const vcl::Window *pWindow ) , mbDockCanceled(false) , mbDocking(false) , mbLastFloatMode(false) - , mbRollUp(false) , mbDockBtn(false) , mbHideBtn(false) // must be enabled in Window::Notify to prevent permanent docking during mouse move @@ -939,11 +938,6 @@ void ImplDockingWindowWrapper::SetFloatingMode( bool bFloatMode ) // pass on DockingData to FloatingWindow pWin->ShowTitleButton( TitleButton::Docking, mbDockBtn ); pWin->ShowTitleButton( TitleButton::Hide, mbHideBtn ); - if ( mbRollUp ) - pWin->RollUp(); - else - pWin->RollDown(); - pWin->SetRollUpOutputSizePixel( maRollUpOutSize ); pWin->SetMinOutputSizePixel( maMinOutSize ); pWin->SetMaxOutputSizePixel( maMaxOutSize ); @@ -962,8 +956,6 @@ void ImplDockingWindowWrapper::SetFloatingMode( bool bFloatMode ) maFloatPos = mpFloatWin->GetPosPixel(); mbDockBtn = mpFloatWin->IsTitleButtonVisible( TitleButton::Docking ); mbHideBtn = mpFloatWin->IsTitleButtonVisible( TitleButton::Hide ); - mbRollUp = mpFloatWin->IsRollUp(); - maRollUpOutSize = mpFloatWin->GetRollUpOutputSizePixel(); maMinOutSize = mpFloatWin->GetMinOutputSizePixel(); maMaxOutSize = mpFloatWin->GetMaxOutputSizePixel(); diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index b95e29ab502f..4a5910da1c0f 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -296,7 +296,6 @@ void DockingWindow::ImplInitDockingWindowData() mbDragFull = false; mbLastFloatMode = false; mbStartFloat = false; - mbRollUp = false; mbDockBtn = false; mbHideBtn = false; mbIsDeferredInit = false; @@ -750,11 +749,6 @@ void DockingWindow::SetFloatingMode( bool bFloatMode ) // pass on DockingData to FloatingWindow pWin->ShowTitleButton( TitleButton::Docking, mbDockBtn ); pWin->ShowTitleButton( TitleButton::Hide, mbHideBtn ); - if ( mbRollUp ) - pWin->RollUp(); - else - pWin->RollDown(); - pWin->SetRollUpOutputSizePixel( maRollUpOutSize ); pWin->SetMinOutputSizePixel( maMinOutSize ); pWin->SetMaxOutputSizePixel( mpImplData->maMaxOutSize ); @@ -772,8 +766,6 @@ void DockingWindow::SetFloatingMode( bool bFloatMode ) maFloatPos = mpFloatWin->GetPosPixel(); mbDockBtn = mpFloatWin->IsTitleButtonVisible( TitleButton::Docking ); mbHideBtn = mpFloatWin->IsTitleButtonVisible( TitleButton::Hide ); - mbRollUp = mpFloatWin->IsRollUp(); - maRollUpOutSize = mpFloatWin->GetRollUpOutputSizePixel(); maMinOutSize = mpFloatWin->GetMinOutputSizePixel(); mpImplData->maMaxOutSize = mpFloatWin->GetMaxOutputSizePixel(); @@ -1058,20 +1050,6 @@ IMPL_LINK_NOARG(DockingWindow, ImplHandleLayoutTimerHdl, Timer*, void) setPosSizeOnContainee(); } -void DockingWindow::RollDown() -{ - if ( mpFloatWin ) - mpFloatWin->RollDown(); - mbRollUp = false; -} - -bool DockingWindow::IsRollUp() const -{ - if ( mpFloatWin ) - return mpFloatWin->IsRollUp(); - return mbRollUp; -} - void DockingWindow::SetMinOutputSizePixel( const Size& rSize ) { if ( mpFloatWin ) diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 221d34767ecf..8f8da5d577ed 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -775,9 +775,6 @@ void FloatingWindow::SetTitleType( FloatWinTitleType nTitle ) void FloatingWindow::StartPopupMode( const tools::Rectangle& rRect, FloatWinPopupFlags nFlags ) { - if ( IsRollUp() ) - RollDown(); - // remove title mnOldTitle = mnTitle; if ( ( mpWindowImpl->mnStyle & WB_POPUP ) && !GetText().isEmpty() ) diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 06e3482100e7..63727cce5359 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -66,7 +66,6 @@ SystemWindow::ImplData::ImplData() SystemWindow::SystemWindow(WindowType nType) : Window(nType) - , mbRollUp(false) , mbDockBtn(false) , mbHideBtn(false) , mbSysChild(false) @@ -367,34 +366,6 @@ bool SystemWindow::IsTitleButtonVisible( TitleButton nButton ) const return mbHideBtn; } -void SystemWindow::RollUp() -{ - if ( !mbRollUp ) - { - maOrgSize = GetOutputSizePixel(); - Size aSize = maRollUpOutSize; - if ( !aSize.Width() ) - aSize.setWidth( GetOutputSizePixel().Width() ); - mbRollUp = true; - if ( mpWindowImpl->mpBorderWindow ) - static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetRollUp( true, aSize ); - else - SetOutputSizePixel( aSize ); - } -} - -void SystemWindow::RollDown() -{ - if ( mbRollUp ) - { - mbRollUp = false; - if ( mpWindowImpl->mpBorderWindow ) - static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetRollUp( false, maOrgSize ); - else - SetOutputSizePixel( maOrgSize ); - } -} - void SystemWindow::SetMinOutputSizePixel( const Size& rSize ) { maMinOutSize = rSize; @@ -766,9 +737,6 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData ) if ( nValidMask & WindowStateMask::Height ) nPosSize |= PosSizeFlags::Height; - if( IsRollUp() ) - RollDown(); - tools::Long nX = rData.GetX(); tools::Long nY = rData.GetY(); tools::Long nWidth = rData.GetWidth(); @@ -784,16 +752,6 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData ) nY = rGeom.nHeight - nHeight; setPosSizePixel( nX, nY, nWidth, nHeight, nPosSize ); maOrgSize = Size( nWidth, nHeight ); - - // 91625 - ignore Minimize - if ( nValidMask & WindowStateMask::State ) - { - const WindowStateState nState = rData.GetState(); - if ( nState & WindowStateState::Rollup ) - RollUp(); - else - RollDown(); - } } } @@ -863,12 +821,6 @@ void SystemWindow::GetWindowStateData( WindowStateData& rData ) const Size aSize = GetSizePixel(); WindowStateState nState = WindowStateState::NONE; - if ( IsRollUp() ) - { - aSize.AdjustHeight(maOrgSize.Height() ); - nState = WindowStateState::Rollup; - } - if ( nValidMask & WindowStateMask::X ) rData.SetX( aPos.X() ); if ( nValidMask & WindowStateMask::Y ) diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx index 9a6142314328..41beceee1306 100644 --- a/vcl/unx/generic/app/wmadaptor.cxx +++ b/vcl/unx/generic/app/wmadaptor.cxx @@ -50,7 +50,6 @@ public: virtual void setWMName( X11SalFrame* pFrame, const OUString& rWMName ) const override; virtual void maximizeFrame( X11SalFrame* pFrame, bool bHorizontal = true, bool bVertical = true ) const override; - virtual void shade( X11SalFrame* pFrame, bool bToShaded ) const override; virtual void setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eType, int nDecorationFlags, X11SalFrame* pTransientFrame ) const override; virtual void enableAlwaysOnTop( X11SalFrame* pFrame, bool bEnable ) const override; virtual int handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEvent ) const override; @@ -70,7 +69,6 @@ public: explicit GnomeWMAdaptor( SalDisplay * ); virtual void maximizeFrame( X11SalFrame* pFrame, bool bHorizontal = true, bool bVertical = true ) const override; - virtual void shade( X11SalFrame* pFrame, bool bToShaded ) const override; virtual void enableAlwaysOnTop( X11SalFrame* pFrame, bool bEnable ) const override; virtual int handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEvent ) const override; }; @@ -110,7 +108,6 @@ const WMAdaptorProtocol aProtocolTab[] = { "_NET_WM_STATE_MAXIMIZED_HORZ", WMAdaptor::NET_WM_STATE_MAXIMIZED_HORZ }, { "_NET_WM_STATE_MAXIMIZED_VERT", WMAdaptor::NET_WM_STATE_MAXIMIZED_VERT }, { "_NET_WM_STATE_MODAL", WMAdaptor::NET_WM_STATE_MODAL }, - { "_NET_WM_STATE_SHADED", WMAdaptor::NET_WM_STATE_SHADED }, { "_NET_WM_STATE_SKIP_PAGER", WMAdaptor::NET_WM_STATE_SKIP_PAGER }, { "_NET_WM_STATE_SKIP_TASKBAR", WMAdaptor::NET_WM_STATE_SKIP_TASKBAR }, { "_NET_WM_STATE_STAYS_ON_TOP", WMAdaptor::NET_WM_STATE_STAYS_ON_TOP }, @@ -1079,8 +1076,6 @@ void NetWMAdaptor::setNetWMState( X11SalFrame* pFrame ) const aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_HORZ ]; if( pFrame->bAlwaysOnTop_ && m_aWMAtoms[ NET_WM_STATE_STAYS_ON_TOP ] ) aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_STAYS_ON_TOP ]; - if( pFrame->mbShaded && m_aWMAtoms[ NET_WM_STATE_SHADED ] ) - aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_SHADED ]; if( pFrame->mbFullScreen && m_aWMAtoms[ NET_WM_STATE_FULLSCREEN ] ) aStateAtoms[ nStateAtoms++ ] = m_aWMAtoms[ NET_WM_STATE_FULLSCREEN ]; if( pFrame->meWindowType == WMWindowType::Utility && m_aWMAtoms[ NET_WM_STATE_SKIP_TASKBAR ] ) @@ -1180,8 +1175,6 @@ void GnomeWMAdaptor::setGnomeWMState( X11SalFrame* pFrame ) const nWinWMState |= 1 << 2; if( pFrame->mbMaximizedHorz ) nWinWMState |= 1 << 3; - if( pFrame->mbShaded ) - nWinWMState |= 1 << 5; XChangeProperty( m_pDisplay, pFrame->GetShellWindow(), @@ -1771,7 +1764,6 @@ int NetWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEv if( pEvent->atom == m_aWMAtoms[ NET_WM_STATE ] ) { pFrame->mbMaximizedHorz = pFrame->mbMaximizedVert = false; - pFrame->mbShaded = false; if( pEvent->state == PropertyNewValue ) { @@ -1803,8 +1795,6 @@ int NetWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEv pFrame->mbMaximizedVert = true; else if( pStates[i] == m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_HORZ ] && m_aWMAtoms[ NET_WM_STATE_MAXIMIZED_HORZ ] ) pFrame->mbMaximizedHorz = true; - else if( pStates[i] == m_aWMAtoms[ NET_WM_STATE_SHADED ] && m_aWMAtoms[ NET_WM_STATE_SHADED ] ) - pFrame->mbShaded = true; } } XFree( pData ); @@ -1847,7 +1837,6 @@ int GnomeWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* p if( pEvent->atom == m_aWMAtoms[ WIN_STATE ] ) { pFrame->mbMaximizedHorz = pFrame->mbMaximizedVert = false; - pFrame->mbShaded = false; if( pEvent->state == PropertyNewValue ) { @@ -1875,8 +1864,6 @@ int GnomeWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* p pFrame->mbMaximizedVert = true; if( nWinState & (1<<3) ) pFrame->mbMaximizedHorz = true; - if( nWinState & (1<<5) ) - pFrame->mbShaded = true; } XFree( pData ); } @@ -1905,87 +1892,6 @@ int GnomeWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* p } /* - * WMAdaptor::shade - */ -void WMAdaptor::shade( X11SalFrame*, bool /*bToShaded*/ ) const -{ -} - -/* - * NetWMAdaptor::shade - */ -void NetWMAdaptor::shade( X11SalFrame* pFrame, bool bToShaded ) const -{ - if( !(m_aWMAtoms[ NET_WM_STATE ] - && m_aWMAtoms[ NET_WM_STATE_SHADED ] - && ( pFrame->nStyle_ & ~SalFrameStyleFlags::DEFAULT )) - ) - return; - - pFrame->mbShaded = bToShaded; - if( pFrame->bMapped_ ) - { - // window already mapped, send WM a message - XEvent aEvent; - aEvent.type = ClientMessage; - aEvent.xclient.display = m_pDisplay; - aEvent.xclient.window = pFrame->GetShellWindow(); - aEvent.xclient.message_type = m_aWMAtoms[ NET_WM_STATE ]; - aEvent.xclient.format = 32; - aEvent.xclient.data.l[0] = bToShaded ? 1 : 0; - aEvent.xclient.data.l[1] = m_aWMAtoms[ NET_WM_STATE_SHADED ]; - aEvent.xclient.data.l[2] = 0; - aEvent.xclient.data.l[3] = 0; - aEvent.xclient.data.l[4] = 0; - XSendEvent( m_pDisplay, - m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), - False, - SubstructureNotifyMask | SubstructureRedirectMask, - &aEvent - ); - } - else - { - // window not mapped yet, set _NET_WM_STATE directly - setNetWMState( pFrame ); - } -} - -/* - * GnomeWMAdaptor::shade - */ -void GnomeWMAdaptor::shade( X11SalFrame* pFrame, bool bToShaded ) const -{ - if( !(m_aWMAtoms[ WIN_STATE ]) ) - return; - - pFrame->mbShaded = bToShaded; - if( pFrame->bMapped_ ) - { - // window already mapped, send WM a message - XEvent aEvent; - aEvent.type = ClientMessage; - aEvent.xclient.display = m_pDisplay; - aEvent.xclient.window = pFrame->GetShellWindow(); - aEvent.xclient.message_type = m_aWMAtoms[ WIN_STATE ]; - aEvent.xclient.format = 32; - aEvent.xclient.data.l[0] = (1<<5); - aEvent.xclient.data.l[1] = bToShaded ? (1<<5) : 0; - aEvent.xclient.data.l[2] = 0; - aEvent.xclient.data.l[3] = 0; - aEvent.xclient.data.l[4] = 0; - XSendEvent( m_pDisplay, - m_pSalDisplay->GetRootWindow( pFrame->GetScreenNumber() ), - False, - SubstructureNotifyMask | SubstructureRedirectMask, - &aEvent - ); - } - else - setGnomeWMState( pFrame ); -} - -/* * WMAdaptor::showFullScreen */ void WMAdaptor::showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 8c9959dfaa4a..18f76cc48176 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -860,7 +860,6 @@ X11SalFrame::X11SalFrame( SalFrame *pParent, SalFrameStyleFlags nSalFrameStyle, meWindowType = WMWindowType::Normal; mbMaximizedVert = false; mbMaximizedHorz = false; - mbShaded = false; mbFullScreen = false; mnIconID = SV_ICON_ID_OFFICE; @@ -1787,8 +1786,6 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState ) if (nShowState_ != SHOWSTATE_NORMAL) Restore(); } - if (pState->mnState & WindowStateState::Rollup) - GetDisplay()->getWMAdaptor()->shade( this, true ); } bool X11SalFrame::GetWindowState( SalFrameState* pState ) @@ -1808,8 +1805,6 @@ bool X11SalFrame::GetWindowState( SalFrameState* pState ) pState->mnState |= WindowStateState::MaximizedHorz; if( mbMaximizedVert ) pState->mnState |= WindowStateState::MaximizedVert; - if( mbShaded ) - pState->mnState |= WindowStateState::Rollup; pState->mnX = aPosSize.Left(); pState->mnY = aPosSize.Top(); |