Run X11 windows without windows manager decoration
davidhunter22 opened this issue · 44 comments
Is it possible to run an X11 windows without the window manager decoration, I believe this is sometimes called frameless or borderless.
What do you mean by "window manager decoration"? Any screenshot would be helpful.
@davidhunter22, thanks for trying out WSLg. Unfortunately that's not possible for now, unless application supports "fullscreen" (such as Firefox) then application takes entire screen and no window decoration. May I ask why this helps? Thanks!
It was more out of interest, I was just seeing what features were supported versus a native X11 Windows manager.
The architecture diagram does show an X Window Manager running.
On a related topic can you, or will you be able to, choose what X Window Manager you are running?
Ah just found this, #67 which seems to answer my question on window managers
Single biggest show stopper for me before switching from VcXsrv
-> wslg
.
Second biggest show stopper is wslg windows not seemingly supporting windows tiling/snapping/windows+LR hotkeys
@GiGurra, thanks for feedback, we are aware that the "second one" is asked various occasions.
Regarding to no window decorations, @AntonSmolkov @sweetwong and @GiGurra, do you want only when window is at fullscreen? and without those frame, how do you expect you can put back window to non-fullscreen? Or even no frame at windowed (non-fullscreen), how it's expected to be moved? Do know have any model scenario we can refer to? thanks!
@hideyukn88 Thanks for the answer.
No definitely not only full screen. In fact full screen is something I am less interested in.
I am mostly working in split screen mode with 2/3 of the screen being my IDE and 1/3 as a terminal.
The best example is the IDE intellij idea. You can download the free community version to see what it currently looks like inside wslg, and compare with how it behaves with a native windows installation.
Basically it always runs without decoration (it renders its own menus and minimize/maximize buttons etc in its own format)
Native windows/native linux/native mac:
wslg:
ideal result:
@GiGurra, thanks for info.
By looking at native Linux case, particularly running on Ubuntu desktop, the window frame (and title bar) seems still rendered by their Window manager, but it has more consistent visuals with rest of the desktop. So, to clarify the request here would be, it is not removing the window decorations, but do have window decorations with match to the rest of desktop and themes.
Regarding to fullscreen case, it looks on JetBrains IDE, "enter fullscreen mode" option (from View->Appearance) is not available on WSLg, but it is available on Ubuntu desktop. I will need to investigate why.
Also, once JetBrains completed the Wayland native support, then the current Window frame won't be used.
Thanks!
Ah, yes you are right. I had completely forgotten that ubuntu does keep some decoration at the top (but not these thick lines all around). When I last used native ubuntu for my dev machine I was actually running some decoration removal thing, dont remember exactly what :)
For reference, here is what wsl + VcXsrv (wsl rendering through x server implementation running on windows) looks like right now:
Can we at least change the color to make it less obtrusive on a dark themed screen?
TBH that would be a really cool feature
Any update on this? WSL has gone out of preview and yet this issue is still present.
Most of third party softwares that emulates X Servers managed to use native windows. Yet WSLg still has this ugly window manager decoration (let's be honest for a second, it looks like it wasn't updated for at least 15 years), and it doesn't even support basic window snapping, even less the more advanced features that we have with a native window.
This is a huge deal breaker for WSLg. I was excited for the GUI apps support on Windows 10, but this alone makes me switch back to X410.
+1 for This Issue. VcXsrv is still better in Window Management than WSLg.
@theonlyfoxy, thanks for checking, we are making progress. if you are on the latest WSLg and Windows 11 (all update applied), please create below file with below contents, then window can be snapped by Win+Left or Right key, thanks!
C:\Users\[Your User Name]\.wslgconfig
[system-distro-env]
WSLG_USE_MSTSC=true
WESTON_RDP_WINDOW_SNAP_ARRANGE=true
WESTON_RDPRAIL_SHELL_LOCAL_MOVE=true
@theonlyfoxy, thanks for checking, we are making progress. if you are on the latest WSLg and Windows 11 (all update applied), please create below file with below contents, then window can be snapped by Win+Left or Right key, thanks!
C:\Users\[Your User Name]\.wslgconfig
[system-distro-env] WSLG_USE_MSTSC=true WESTON_RDP_WINDOW_SNAP_ARRANGE=true WESTON_RDPRAIL_SHELL_LOCAL_MOVE=true
What about the borders around the window and style of buttons?
Wouldn't it be possible to integrate vcxsrv into WSLg and fallback X11 apps to it?
Without borders, the window is offset from the top left. I've noticed this in my own development as well. Having a maximized borderless window results in:
Everything you click on will be offset as well.
Meanwhile having borders on, maximize will be correct:
Just wanted to add, you guys are doing an awesome job! This helps my graphical linux development too!! Thank you for all the hard work you're doing! @hideyukn88 and everyone!
@cyraid how did you manage to remove the window borders? I think it's the whole point of this issue and it seems you've found some kind of magic to achieve it 😅
@zodiia Oh, that's just a borderless window. You have to specify the XInternAtom(d, "_MOTIF_WM_HINTS", False);
for xlib when creating the window (or glfwWindowHint(GLFW_DECORATED, GLFW_FALSE);
for GLFW, etc.)
For programs that you haven't written, there's not much you can do other than ask Microsoft to include Decoration options with WSLG (or at least environment variables to disable decorations on windows) as they're the current window manager, unless you can use a custom window manager with WSLG which I'm not sure you can currently? (based off of what I've been reading)
But for those screenshots: With Chrome in Linux, you can set the window to use no titlebar (so I'm guessing they're just setting the decorator hints to false). Btw, to fix that Chrome issue, you can set the Preferred Ozone platform
in chrome://flags
to Wayland
for a better experience.
Hi, is there a solution to this problem, now idea still has a big box wrapped around it
Hi, is there a solution to this problem, now idea still has a big box wrapped around it
No solution yet, however we might be getting closer to it with Jetbrains products specifically, as they have recently released features for integrating the top bar with the window, just like it is on windows. We might get something better for IntelliJ, CLion, ... soon