[vlc-commits] [Git][videolan/vlc][master] 2 commits: qt: save window position before adjusting states in InterfaceWindowHandler

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Sun Jan 5 15:08:32 UTC 2025



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
b796d24c by Fatih Uzunoglu at 2025-01-05T14:46:24+00:00
qt: save window position before adjusting states in InterfaceWindowHandler

Otherwise the states (fullscreen for now) is not saved.

- - - - -
5af36667 by Fatih Uzunoglu at 2025-01-05T14:46:24+00:00
qt: do not reset interface window states if the app is dying in InterfaceWindowHandler

This is really not necessary.

- - - - -


2 changed files:

- modules/gui/qt/dialogs/dialogs_provider.cpp
- modules/gui/qt/maininterface/interface_window_handler.cpp


Changes:

=====================================
modules/gui/qt/dialogs/dialogs_provider.cpp
=====================================
@@ -127,6 +127,8 @@ QVariant DialogsProvider::getTextDialog(QWidget *parent,
 void DialogsProvider::quit()
 {
     b_isDying = true;
+    assert(qApp);
+    qApp->setProperty("isDying", true);
     libvlc_Quit( vlc_object_instance(p_intf) );
 }
 


=====================================
modules/gui/qt/maininterface/interface_window_handler.cpp
=====================================
@@ -138,10 +138,15 @@ InterfaceWindowHandler::InterfaceWindowHandler(qt_intf_t *_p_intf, MainCtx* main
 InterfaceWindowHandler::~InterfaceWindowHandler()
 {
     m_window->removeEventFilter(this);
-    WindowStateHolder::holdOnTop( m_window,  WindowStateHolder::INTERFACE, false );
-    WindowStateHolder::holdFullscreen( m_window,  WindowStateHolder::INTERFACE, false );
     /* Save this size */
     QVLCTools::saveWindowPosition(getSettings(), m_window);
+    assert(qApp);
+    if (!qApp->property("isDying").toBool())
+    {
+        // If application is dying, we don't need to adjust the state
+        WindowStateHolder::holdOnTop( m_window,  WindowStateHolder::INTERFACE, false );
+        WindowStateHolder::holdFullscreen( m_window,  WindowStateHolder::INTERFACE, false );
+    }
 }
 
 void InterfaceWindowHandler::updateCSDWindowSettings()



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9f451c0596d24f94dca55f309a7b53f920d905df...5af36667946f5bd2da3bd4633b650e6b9cb59f05

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9f451c0596d24f94dca55f309a7b53f920d905df...5af36667946f5bd2da3bd4633b650e6b9cb59f05
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list