Kaydet (Commit) f561531b authored tarafından Caolán McNamara's avatar Caolán McNamara

Related: tdf#112063 validation dialog legitimally changes modality

so to keep tdf#112063 working as with...

commit e66c9aa3
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/43142Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst a2586823
...@@ -157,6 +157,7 @@ public: ...@@ -157,6 +157,7 @@ public:
private: private:
bool ImplStartExecuteModal(); bool ImplStartExecuteModal();
static void ImplEndExecuteModal(); static void ImplEndExecuteModal();
void ImplSetModalInputMode(bool bModal);
public: public:
// Dialog::Execute replacement API // Dialog::Execute replacement API
......
...@@ -629,8 +629,8 @@ bool Dialog::EventNotify( NotifyEvent& rNEvt ) ...@@ -629,8 +629,8 @@ bool Dialog::EventNotify( NotifyEvent& rNEvt )
// have re-enabled input for our parent // have re-enabled input for our parent
if( mbInExecute && mbModalMode ) if( mbInExecute && mbModalMode )
{ {
SetModalInputMode( false ); ImplSetModalInputMode( false );
SetModalInputMode( true ); ImplSetModalInputMode( true );
// #93022# def-button might have changed after show // #93022# def-button might have changed after show
if( !mnMousePositioned ) if( !mnMousePositioned )
...@@ -825,7 +825,6 @@ bool Dialog::ImplStartExecuteModal() ...@@ -825,7 +825,6 @@ bool Dialog::ImplStartExecuteModal()
GetParent()->CompatNotify( aNEvt ); GetParent()->CompatNotify( aNEvt );
} }
mbInExecute = true; mbInExecute = true;
ImplGetFrame()->SetModal(true);
SetModalInputMode(true); SetModalInputMode(true);
// FIXME: no layouting, workaround some clipping issues // FIXME: no layouting, workaround some clipping issues
...@@ -1097,7 +1096,6 @@ void Dialog::EndDialog( long nResult ) ...@@ -1097,7 +1096,6 @@ void Dialog::EndDialog( long nResult )
if ( mbInExecute ) if ( mbInExecute )
{ {
SetModalInputMode(false); SetModalInputMode(false);
ImplGetFrame()->SetModal(false);
// remove dialog from the list of dialogs which are being executed // remove dialog from the list of dialogs which are being executed
ImplSVData* pSVData = ImplGetSVData(); ImplSVData* pSVData = ImplGetSVData();
...@@ -1181,6 +1179,15 @@ bool Dialog::AreDialogsOpen() ...@@ -1181,6 +1179,15 @@ bool Dialog::AreDialogsOpen()
} }
void Dialog::SetModalInputMode( bool bModal ) void Dialog::SetModalInputMode( bool bModal )
{
if ( bModal == mbModalMode )
return;
ImplGetFrame()->SetModal(bModal);
ImplSetModalInputMode(bModal);
}
void Dialog::ImplSetModalInputMode( bool bModal )
{ {
if ( bModal == mbModalMode ) if ( bModal == mbModalMode )
return; return;
...@@ -1232,8 +1239,8 @@ void Dialog::SetModalInputMode( bool bModal ) ...@@ -1232,8 +1239,8 @@ void Dialog::SetModalInputMode( bool bModal )
( pPrevModalDlg == mpPrevExecuteDlg.get() ( pPrevModalDlg == mpPrevExecuteDlg.get()
|| !pPrevModalDlg->IsWindowOrChild( this, true ) ) ) || !pPrevModalDlg->IsWindowOrChild( this, true ) ) )
{ {
mpPrevExecuteDlg->SetModalInputMode( false ); mpPrevExecuteDlg->ImplSetModalInputMode( false );
mpPrevExecuteDlg->SetModalInputMode( true ); mpPrevExecuteDlg->ImplSetModalInputMode( true );
} }
} }
} }
......
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