[vlc-commits] [Git][videolan/vlc][master] 4 commits: qml: correctly check Window visibility

Rémi Denis-Courmont (@Courmisch) gitlab at videolan.org
Sun Mar 20 09:05:32 UTC 2022



Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC


Commits:
43bcb730 by Prince Gupta at 2022-03-20T08:40:48+00:00
qml: correctly check Window visibility

QWindows::visibility is not bitwise

- - - - -
cc74697f by Prince Gupta at 2022-03-20T08:40:48+00:00
qml: check window fullscreen directly

- - - - -
f1fe1d31 by Prince Gupta at 2022-03-20T08:40:48+00:00
qt: make csd setting independent of window visibility at MainCtx level

1. The mechanism implemented to keep these two in-sync is broken
2. Interface changes some CSD controls based on window visibility, this
   causes conflicts (ref #26668)

- - - - -
4fde969c by Prince Gupta at 2022-03-20T08:40:48+00:00
qt: remove MainCtx.interfaceFullScreen

property is not used and broken

- - - - -


3 changed files:

- modules/gui/qt/maininterface/mainctx.cpp
- modules/gui/qt/maininterface/mainctx.hpp
- modules/gui/qt/maininterface/qml/MainInterface.qml


Changes:

=====================================
modules/gui/qt/maininterface/mainctx.cpp
=====================================
@@ -154,8 +154,6 @@ MainCtx::MainCtx(qt_intf_t *_p_intf)
     /* VideoWidget connects for asynchronous calls */
     connect( this, &MainCtx::askToQuit, THEDP, &DialogsProvider::quit, Qt::QueuedConnection  );
 
-    connect(this, &MainCtx::interfaceFullScreenChanged, this, &MainCtx::useClientSideDecorationChanged);
-
     QMetaObject::invokeMethod(this, [this]()
     {
         // *** HACKY ***
@@ -239,7 +237,7 @@ bool MainCtx::hasVLM() const {
 bool MainCtx::useClientSideDecoration() const
 {
     //don't show CSD when interface is fullscreen
-    return !m_windowTitlebar && m_windowVisibility != QWindow::FullScreen;
+    return !m_windowTitlebar;
 }
 
 bool MainCtx::hasFirstrun() const {


=====================================
modules/gui/qt/maininterface/mainctx.hpp
=====================================
@@ -150,7 +150,6 @@ class MainCtx : public QObject
     Q_PROPERTY(bool playlistVisible READ isPlaylistVisible WRITE setPlaylistVisible NOTIFY playlistVisibleChanged FINAL)
     Q_PROPERTY(double playlistWidthFactor READ getPlaylistWidthFactor WRITE setPlaylistWidthFactor NOTIFY playlistWidthFactorChanged FINAL)
     Q_PROPERTY(bool interfaceAlwaysOnTop READ isInterfaceAlwaysOnTop WRITE setInterfaceAlwaysOnTop NOTIFY interfaceAlwaysOnTopChanged FINAL)
-    Q_PROPERTY(bool interfaceFullScreen READ isInterfaceFullScreen WRITE setInterfaceFullScreen NOTIFY interfaceFullScreenChanged FINAL)
     Q_PROPERTY(bool hasEmbededVideo READ hasEmbededVideo NOTIFY hasEmbededVideoChanged FINAL)
     Q_PROPERTY(bool showRemainingTime READ isShowRemainingTime WRITE setShowRemainingTime NOTIFY showRemainingTimeChanged FINAL)
     Q_PROPERTY(VLCVarChoiceModel* extraInterfaces READ getExtraInterfaces CONSTANT FINAL)
@@ -402,7 +401,6 @@ signals:
     void playlistVisibleChanged(bool);
     void playlistWidthFactorChanged(double);
     void interfaceAlwaysOnTopChanged(bool);
-    void interfaceFullScreenChanged(bool);
     void hasEmbededVideoChanged(bool);
     void showRemainingTimeChanged(bool);
     void gridViewChanged( bool );


=====================================
modules/gui/qt/maininterface/qml/MainInterface.qml
=====================================
@@ -188,10 +188,13 @@ Rectangle {
     }
 
     Loader {
-        active: (MainCtx.clientSideDecoration
-                 &&
-                 // NOTE: We don't want to steal the mouse when we are maximized or in fullscreen
-                 !((MainCtx.intfMainWindow.visibility & Window.Maximized) || MainCtx.interfaceFullScreen))
+        active: {
+            var windowVisibility = MainCtx.intfMainWindow.visibility
+            return MainCtx.clientSideDecoration
+                    && (windowVisibility !== Window.Maximized)
+                    && (windowVisibility !== Window.FullScreen)
+
+        }
 
         source: "qrc:///widgets/CSDMouseStealer.qml"
     }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1171147b0ba16836364b4805a60a63e7b6d45e73...4fde969c22d3299bfec53d539c2e07a79df8f6e0

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1171147b0ba16836364b4805a60a63e7b6d45e73...4fde969c22d3299bfec53d539c2e07a79df8f6e0
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