I know how to make QWidget (in Qt4 or Qt5) / QWindow (with Qt5) borderless, draw a custom title bar and manually implement drag and drop to move the window to the screen, just tracking the mouse position with some mouseMoveEventand update the position of the window.
However, this movement behaves differently than its own, implemented by the window manager. For example, moving a window near the edge of the screen can be interpreted as “full screen” or “split screen”; or windows are tied to each other, depending on the system / window manager. These things do not work if you implement window movement as shown above.
Google Chrome / Chromium is just one example for an application that implements a custom window title bar and border, while adapting to the window manager’s own behavior. I wonder if Chrome implements on its own (and detects the window manager and its configuration), or if most window managers have some functionality (obviously, it still depends on the platform) to say “start your own window movement” and "stop your own window movement" or the like.
Is something similar possible in Qt? If not, maybe using some other libraries like Qxt?
FYI: I mainly focus on Windows and Linux, where I see the difficulties with which the user can install any window manager.
source