[vlc-commits] [Git][videolan/vlc][master] 2 commits: qt, x11compositor: accept drops on mainwindows

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Aug 29 04:38:01 UTC 2022



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
262a15a5 by Prince Gupta at 2022-08-29T04:23:58+00:00
qt, x11compositor: accept drops on mainwindows

otherwise the interface never receives global drop events

ref #27190

- - - - -
012c7a93 by Prince Gupta at 2022-08-29T04:23:58+00:00
qt: fix variable name

- - - - -


2 changed files:

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


Changes:

=====================================
modules/gui/qt/maininterface/compositor_x11_renderwindow.cpp
=====================================
@@ -318,18 +318,19 @@ void X11DamageObserver::onEvent()
 
 //// CompositorX11RenderWindow
 
-CompositorX11RenderWindow::CompositorX11RenderWindow(qt_intf_t* p_intf, xcb_connection_t* conn, bool useCDS, QWidget* parent)
+CompositorX11RenderWindow::CompositorX11RenderWindow(qt_intf_t* p_intf, xcb_connection_t* conn, bool useCSD, QWidget* parent)
     : QMainWindow(parent)
     , m_intf(p_intf)
     , m_conn(conn)
 {
+    setAcceptDrops(true);
     setAttribute(Qt::WA_NativeWindow);
     setAttribute(Qt::WA_OpaquePaintEvent);
     setAttribute(Qt::WA_NoSystemBackground);
     setAttribute(Qt::WA_TranslucentBackground);
     setAttribute(Qt::WA_MouseTracking);
 
-    if (useCDS)
+    if (useCSD)
         setWindowFlag(Qt::FramelessWindowHint);
 
     m_stable = new DummyNativeWidget(this);


=====================================
modules/gui/qt/maininterface/compositor_x11_renderwindow.hpp
=====================================
@@ -148,7 +148,7 @@ class CompositorX11RenderWindow : public QMainWindow
 {
     Q_OBJECT
 public:
-    explicit CompositorX11RenderWindow(qt_intf_t* p_intf, xcb_connection_t* conn, bool useCDS, QWidget* parent = nullptr);
+    explicit CompositorX11RenderWindow(qt_intf_t* p_intf, xcb_connection_t* conn, bool useCSD, QWidget* parent = nullptr);
     ~CompositorX11RenderWindow();
 
     bool init();



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/390d51af9c6ea4a648c1c701bc9191d953ea3d72...012c7a930fa3824ce50c11c3906aad8cac30104d

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/390d51af9c6ea4a648c1c701bc9191d953ea3d72...012c7a930fa3824ce50c11c3906aad8cac30104d
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