From a5cba02769bd826a665b796c0b59c639e1fe5824 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 14 May 2019 14:07:33 +0200 Subject: [PATCH] [calamares] Leave a note about changing close-window hint --- src/calamares/CalamaresWindow.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/calamares/CalamaresWindow.cpp b/src/calamares/CalamaresWindow.cpp index b2e09d961..b570a9c86 100644 --- a/src/calamares/CalamaresWindow.cpp +++ b/src/calamares/CalamaresWindow.cpp @@ -165,7 +165,15 @@ CalamaresWindow::CalamaresWindow( QWidget* parent ) m_viewManager = Calamares::ViewManager::instance( this ); if ( branding->windowExpands() ) connect( m_viewManager, &Calamares::ViewManager::enlarge, this, &CalamaresWindow::enlarge ); - + // NOTE: Although the ViewManager has a signal cancelEnabled() that + // signals when the state of the cancel button changes (in + // particular, to disable cancel during the exec phase), + // we don't connect to it here. Changing the window flag + // for the close button causes uncomfortable window flashing + // and requires an extra show() (at least with KWin/X11) which + // is too annoying. Instead, leave it up to ignoring-the-quit- + // event, which is also the ViewManager's responsibility. + mainLayout->addWidget( m_viewManager->centralWidget() ); setStyleSheet( Calamares::Branding::instance()->stylesheet() ); }