diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-10-04 21:14:06 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-10-05 09:51:21 +0200 |
commit | f561531b69ae4870eaa9648f7c104cabcd0a7fa0 (patch) | |
tree | 336fd76a96dd13a18918498b50d80046e0f9e69b /vcl | |
parent | a25868231adba6a3be30f9aedb71315de0c79acd (diff) |
Related: tdf#112063 validation dialog legitimally changes modality
so to keep tdf#112063 working as with...
commit e66c9aa362c1e8729d76090023960610321b14f3
Author: Caolán McNamara <caolanm@redhat.com>
Date: Fri Sep 1 16:23:20 2017 +0100
Related: tdf#112063 unsetting and resetting gtk modality is a problem
for gtk3, so just set it on execute and no need to unset and reset it
for whatever vcl nuttiness the existing code is doing
then let the proper calls to SetModalInputMode call the frame modality switch
and the hackery vcl calls the underlying vcl-specific body as ImplSetModalInputMode
Change-Id: I853ca50e0d9830ca7ba3077e243ccdee6e84e696
Reviewed-on: https://gerrit.libreoffice.org/43142
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/dialog.cxx | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 85abcd4c5238..c6d54e3de38a 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -629,8 +629,8 @@ bool Dialog::EventNotify( NotifyEvent& rNEvt ) // have re-enabled input for our parent if( mbInExecute && mbModalMode ) { - SetModalInputMode( false ); - SetModalInputMode( true ); + ImplSetModalInputMode( false ); + ImplSetModalInputMode( true ); // #93022# def-button might have changed after show if( !mnMousePositioned ) @@ -825,7 +825,6 @@ bool Dialog::ImplStartExecuteModal() GetParent()->CompatNotify( aNEvt ); } mbInExecute = true; - ImplGetFrame()->SetModal(true); SetModalInputMode(true); // FIXME: no layouting, workaround some clipping issues @@ -1097,7 +1096,6 @@ void Dialog::EndDialog( long nResult ) if ( mbInExecute ) { SetModalInputMode(false); - ImplGetFrame()->SetModal(false); // remove dialog from the list of dialogs which are being executed ImplSVData* pSVData = ImplGetSVData(); @@ -1185,6 +1183,15 @@ void Dialog::SetModalInputMode( bool bModal ) if ( bModal == mbModalMode ) return; + ImplGetFrame()->SetModal(bModal); + ImplSetModalInputMode(bModal); +} + +void Dialog::ImplSetModalInputMode( bool bModal ) +{ + if ( bModal == mbModalMode ) + return; + mbModalMode = bModal; if ( bModal ) { @@ -1232,8 +1239,8 @@ void Dialog::SetModalInputMode( bool bModal ) ( pPrevModalDlg == mpPrevExecuteDlg.get() || !pPrevModalDlg->IsWindowOrChild( this, true ) ) ) { - mpPrevExecuteDlg->SetModalInputMode( false ); - mpPrevExecuteDlg->SetModalInputMode( true ); + mpPrevExecuteDlg->ImplSetModalInputMode( false ); + mpPrevExecuteDlg->ImplSetModalInputMode( true ); } } } |