[vlc-commits] [Git][videolan/vlc][master] qt: do not try to restore window geometry after exiting full-screen

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat Nov 2 07:25:28 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
04efc4c9 by Fatih Uzunoglu at 2024-11-02T07:10:55+00:00
qt: do not try to restore window geometry after exiting full-screen

On X11, Wayland, Windows the window itself restores the old geometry
when it is no longer fullscreen. There is no need to manually restore
the geometry, and it causes issues on certain platforms such as Wayland
where clients do not have authority on window placement with xdg-shell.

- - - - -


2 changed files:

- modules/gui/qt/maininterface/video_window_handler.cpp
- modules/gui/qt/maininterface/video_window_handler.hpp


Changes:

=====================================
modules/gui/qt/maininterface/video_window_handler.cpp
=====================================
@@ -119,8 +119,6 @@ void VideoWindowHandler::setVideoFullScreen( bool fs )
     m_videoFullScreen = fs;
     if( fs )
     {
-        m_lastWinGeometry = m_window->geometry();
-
         int numscreen = var_InheritInteger( m_intf, "qt-fullscreen-screennumber" );
 
         auto screenList = QApplication::screens();
@@ -141,15 +139,10 @@ void VideoWindowHandler::setVideoFullScreen( bool fs )
     }
     else
     {
-        bool hold = WindowStateHolder::holdFullscreen(m_window,  WindowStateHolder::VIDEO, false);
+        WindowStateHolder::holdFullscreen(m_window,  WindowStateHolder::VIDEO, false);
 
         if( m_lastWinScreen != NULL && !m_hasWayland )
             m_window->setScreen(m_lastWinScreen);
-        if( !hold && m_lastWinGeometry.isNull() == false )
-        {
-            m_window->setGeometry( m_lastWinGeometry );
-            m_lastWinGeometry = QRect();
-        }
     }
 }
 


=====================================
modules/gui/qt/maininterface/video_window_handler.hpp
=====================================
@@ -65,7 +65,6 @@ private:
     bool m_videoFullScreen = false;
     bool m_autoresize = false;
 
-    QRect   m_lastWinGeometry;
     QScreen* m_lastWinScreen = nullptr;
 
     bool m_hasWayland = false;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/04efc4c90632cbef6b06e7b60ece7cc81a2c90e6

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/04efc4c90632cbef6b06e7b60ece7cc81a2c90e6
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