diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-09-01 14:49:17 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-09-02 09:36:19 +0200 |
commit | 8ce0c756e64242431361059566d41495e3550d99 (patch) | |
tree | 407cd3de4964d3f5049bf418bfdbda0e63ca3daa | |
parent | eac937de4267637d22d4c418a87e675c780e59a3 (diff) |
AlwaysDisableInput newly unused
Change-Id: I0cdb7b74487f2338d16eca85616f840d921dad5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101874
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | include/vcl/window.hxx | 19 | ||||
-rw-r--r-- | vcl/source/window/window.cxx | 29 |
2 files changed, 2 insertions, 46 deletions
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index f64a419b92af..4723c1d69921 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -952,9 +952,6 @@ public: /** Override <code>EnableInput</code>. This can be necessary due to other people using EnableInput for whole window hierarchies. - - <code>AlwaysEnableInput</code> and <code>AlwaysDisableInput</code> are - mutually exclusive; the last setter wins. @param bAlways sets always enabled flag @@ -962,26 +959,12 @@ public: if true children are recursively set to AlwaysEnableInput */ void AlwaysEnableInput( bool bAlways, bool bChild = true ); + /** returns the current AlwaysEnableInput state @return true if window is in AlwaysEnableInput state */ bool IsAlwaysEnableInput() const; - /** Override <code>EnableInput</code>, counterpart to AlwaysEnableInput. - Windows with AlwaysDisableInput will not get key events even if enabled - and input enabled.This can be necessary due to other people using EnableInput - for whole window hierarchies. - - <code>AlwaysEnableInput</code> and <code>AlwaysDisableInput</code> are - mutually exclusive; the last setter wins. - - @param bAlways - sets always disable flag - - @param bChild - if true children are recursively set to AlwaysDisableInput - */ - void AlwaysDisableInput( bool bAlways, bool bChild = true ); /** A window is in modal mode if one of its children or subchildren is a running modal window (a modal dialog) diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index f581ce0850b4..a9fe21d0a7a3 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -645,7 +645,7 @@ WindowImpl::WindowImpl( WindowType nType ) mnParentClipMode = ParentClipMode::NONE; // Flags for Parent-ClipChildren-Mode mnActivateMode = ActivateModeFlags::NONE; // Will be converted in System/Overlap-Windows mnDlgCtrlFlags = DialogControlFlags::NONE; // DialogControl-Flags - meAlwaysInputMode = AlwaysInputNone; // neither AlwaysEnableInput nor AlwaysDisableInput called + meAlwaysInputMode = AlwaysInputNone; // AlwaysEnableInput not called meHalign = VclAlign::Fill; meValign = VclAlign::Fill; mePackType = VclPackType::Start; @@ -2634,33 +2634,6 @@ void Window::AlwaysEnableInput( bool bAlways, bool bChild ) } } -void Window::AlwaysDisableInput( bool bAlways, bool bChild ) -{ - - if ( mpWindowImpl->mpBorderWindow ) - mpWindowImpl->mpBorderWindow->AlwaysDisableInput( bAlways, false ); - - if( bAlways && mpWindowImpl->meAlwaysInputMode != AlwaysInputDisabled ) - { - mpWindowImpl->meAlwaysInputMode = AlwaysInputDisabled; - EnableInput(false, false); - } - else if( ! bAlways && mpWindowImpl->meAlwaysInputMode == AlwaysInputDisabled ) - { - mpWindowImpl->meAlwaysInputMode = AlwaysInputNone; - } - - if ( bChild ) - { - VclPtr< vcl::Window > pChild = mpWindowImpl->mpFirstChild; - while ( pChild ) - { - pChild->AlwaysDisableInput( bAlways, bChild ); - pChild = pChild->mpWindowImpl->mpNext; - } - } -} - void Window::SetActivateMode( ActivateModeFlags nMode ) { |