I wrote a simple c++ source file that toggles the window decorations on and off for the specified window. The goal is to make sure it works in virtually all (or at the very least, most) popular Linux window managers out there. I noticed that some Window Managers, specifically KWin and Budgie WM, both react differently to my code than most WM's do,. The window gets re-positioned, so the 0,0 (x/y) position of the window's client area doesn't stay at the same place like i want it to. I was able to fix this problem with KWin fortunately, it required going on the KDE forums and getting help there on how to check whether KWin is running in X11 code. Turns out it was as simple as checking the existence of the "KWIN_RUNNING" atom, and reposition the window back to the original place it was after toggling window decorations. I didn't know until just recently Budgie's WM has a similar problem, I found out about an hour or two ago. So anyway, how do i check for whether the Budgie WM is running in X11? Here's my window decoration toggle code for reference: https://gist.github.com/time-killer-games/98c2ba273aa9eb87c73bbe9bebe88ee4#file-borderless_toggle-cpp
Animated GIF Screenshots of the desired behavior:
(KDE neon 5.16.4)
(Lubuntu 18.04.2 LTS)
(Xubuntu 18.04.2 LTS)
(Ubuntu 18.04.2 LTS)