include/vcl/dialog.hxx | 1 + vcl/source/window/dialog.cxx | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-)
New commits: commit f561531b69ae4870eaa9648f7c104cabcd0a7fa0 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Oct 4 21:14:06 2017 +0100 Related: tdf#112063 validation dialog legitimally changes modality so to keep tdf#112063 working as with... commit e66c9aa362c1e8729d76090023960610321b14f3 Author: Caolán McNamara <caol...@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 <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx index 6cea3b193ec2..1ff5136fb41a 100644 --- a/include/vcl/dialog.hxx +++ b/include/vcl/dialog.hxx @@ -157,6 +157,7 @@ public: private: bool ImplStartExecuteModal(); static void ImplEndExecuteModal(); + void ImplSetModalInputMode(bool bModal); public: // Dialog::Execute replacement API 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 ); } } }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits