[vlc-commits] [Git][videolan/vlc][master] qt: do not hide the interface window when adjusting `Qt::FramelessWindowHint`

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Mon Mar 24 21:51:51 UTC 2025



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


Commits:
d1a0dc70 by Fatih Uzunoglu at 2025-03-24T21:28:05+00:00
qt: do not hide the interface window when adjusting `Qt::FramelessWindowHint`

- Since hiding the window destroys the wl_surface (before Qt 6.9), this causes
crash on Wayland (adjustments after video window setup is complete).
- With `CompositorX11`, adjusting a flag (such as always on top) and then
(immediately after) toggling the visibility of a window breaks the window. This
is a problem when, for example always on top and client side decorations change
together.

Although it is stated that "some window managers don't like to change frame
window hint on visible window", I have not observed an adverse behavior on X11
(Qt 6.2 and Qt 6.8), and Wayland (Qt 6.8) with KWin X11/Wayland 6.3.1. If this
is a problem of a certain window manager, the workaround should be only done
for that window manager and not in all cases.

At the same time, Qt does not seem to state that adjusting `Qt::FramelessWindowHint`
needs to be done when the window is hidden. So I believe that this should be
safe to proceed.

- - - - -


1 changed file:

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


Changes:

=====================================
modules/gui/qt/maininterface/interface_window_handler.cpp
=====================================
@@ -162,9 +162,7 @@ InterfaceWindowHandler::~InterfaceWindowHandler()
 
 void InterfaceWindowHandler::updateCSDWindowSettings()
 {
-    m_window->hide(); // some window managers don't like to change frame window hint on visible window
     m_window->setFlag(Qt::FramelessWindowHint, m_mainCtx->useClientSideDecoration());
-    m_window->setVisible(true);
 }
 
 bool InterfaceWindowHandler::eventFilter(QObject*, QEvent* event)



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

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