-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Help wanted] Default window decorations color #37
Comments
when I use JetBrains IDEs, I find that there is no full screen model in view tool. Can you use the full screen model? |
no, but it wasn't there in 'old' xserver mode as well, im not sure if its linux versions of Jetbrains apps or particular problem with WSL... |
so sad .i hope jetbrains or microsoft can solve this. |
Thanks for the suggestion. Who paints the window decoration depends on the application. If the app let the window manager paint it, than it's the window manager inside of Weston that paints it (the right side window). We're currently just using the default theme, was was good enough for the preview :-)... we would like to eventually add a theme that more closely resemble Windows itself and to synchronize it with your Windows themes, but that is some ways out. Other application can decide to paint those area themselves instead (the left case)... in that case any system level themes will have no effect and instead this is controlled entirely by the application itself (or the framework it uses). |
This will be also not ideal solution. Vcxsrv/x410/gWsl using Windows native decorations in such cases without CSD and it results to same white window headers if you using light windows theme. @spronovo is it theoretically possible to ssh somehow to running distro and install-switch theme? Or it not worth trying and need only to make own build from sources? |
The system distro is mounted as read-only... so any changes you make it to are discarded when WSL is restarted. The servicing model we have for the system distro is a simple throwaway and replace with the new one... if we allowed you to persist data in it you would be loosing it on update. If you want a truly custom experience, building your own system distro is one way to go... but you'll need to keep rebuilding as we provide updates if you want to benefit from those fixes and improvement. |
Apart from theming, which would be super nice, the window decoration does not integrate well into windows. Would it be possible to render the window decoration (unless the application renders its own) in windows, maybe through the RDP client? Wouldn't we get theming & better windows integration for "free" then? |
No, because #37 (comment) It will be same as now on all existing xservers - or dark or light, without respect for application content at all |
How did you get your gtk apps to use a different gtk theme at all? I couldn't make a difference even though I set GTK_THEME in /etc/profile... |
Via gnome tweaks, maybe. $ Then you can download a custom theme from Gnome Look and select it on tweaks window. |
but i can not select the theme in gnome-tweaks after installed gnome-tweaks,can you tell me how did you do that |
Microsoft-Edge-Dev for Linux now is another one of the apps that no longer displays its window decorations like previous builds of the app once did. Now, Edge for Linux no longer displays its own window decorations in Wayland in WSLg since its last build. |
I was wondering the same with fresh Win11 install. Thanks @spronovo explaining what the issue is and regards to the team, keep up the good work! JetBrains users, I suggest you go and vote for this one: https://youtrack.jetbrains.com/issue/JBR-3206 |
@alpfilho how did you get Gitkraken to open like that and be able to move it? Mine is stuck at 0,0 without the titlebar so I'm unable to move it with AltDrag ( see #324 ). I know WSLg is using Wayland but isn't it possible to make it work such as the rendered window is the window itself without the WM (just like when you install X with no WM and then start xterm - i.e. no window borders) and then apply Windows's decorations? If WMs can do that in X I'd assume it could be possible in Wayland too, although I've never used a distro with it but I would assume it's fairly possible. Edit: After installing xfce4-terminal and mousepad, it appeared somewhere else I could move it afterwards. Crazy. I think WSLg should also respect the display order so apps appear in the primary monitor instead. |
I'm not seeing a way to change the default Weston theme? Maintaining a custom build sounds like more work than squinting at the light theme. User input:
If someone knows a way to do either of these in dot files, short of building things from source, please do let me know. |
please upvote this on youtrack |
Anyone was able to find a workaround this? Or at least a way to use fullscreen for those applications (Jetbrains IDEs especially) |
For Chrome you can set 'Preferred Ozone platform' to 'Wayland' in chrome://flags |
Edge in Linux does not appear to have the option available. But it works for Chrome. Edited to add: The flags are not available to the user to set them in Edge-Dev in edge://flags but I can run the browser from the command line, as below, and it will work similarly.
|
It seems like the long-term solution is for apps/environments to support Wayland directly. Nautilus, gedit, etc. look great! Here's the latest re: Jetbrains IDEs: https://youtrack.jetbrains.com/issue/JBR-3206 |
FWIW, the problem is applications that don't have a CSD option rather than no wayland support. I assume VSCode wouldn't do this with CSD enabled even without ozone wayland. |
How hard is it for WSLg to just match the (Windows) system theme? There are going to be non-CSD apps for a long, long time. |
I was researching about this issue a bit and found this article: Explains the situation really well. https://news.itsfoss.com/wayland-core-protocol-issue/ Technically WSLg-weston is doing Server Side Decorations (for non-gnome applications) right? Otherwise we wouldn't have any titlebar. Where that code comes from? Because from google it seems like weston doesn't have SSD. So WSLg's weston fork adds that functionality? Guidance about which file to look at for SSD Drawing code would be very helpful :3 |
You can change this by building your own version of the WSLg System Distro. Instructions here: https://github.com/microsoft/wslg/blob/main/CONTRIBUTING.md Once everything is downloaded, before compiling, you'll need to change a few files in wslg/vendors/weston/shared (cairo-util.c and frame.c) The patch is below (first chunk is frame color, second chunk is frame text color, third chunk is button color). Also edit the pngs for the titlebar buttons in wslg/vendors/weston/data (I just inverted them). Whole thing can be seen at MamiyaOtaru/weston-mirror@248f088 Compile your new System Distro and use it per the instructions at the first link above I launched kwrite with XDG_SESSION_TYPE=X11 QT_QPA_PLATFORM=xcb kwrite to show the SSD since I already have Qt and GTK apps configured to use CSD. Solution in this post is for apps where that isn't possible, like xeyes :D
|
Thank you, @MamiyaOtaru! I had hoped the solution was something as simple as that. Next step is for someone [smarter than me] to make it configurable, or even automatic. |
This should be a built-in. Do you accept PRs? |
I confirm this should be configuration (or should use windows color scheme automatically to detect) |
any update on this? |
Any guys who keep eyes on this issue, should found the problem comes from weston which is part of wayland but not wslg itself |
any update, pls? |
I'm confused by this, because the windows that force white borders are X11 windows, not Wayland windows. |
@pkkid technically XWayland, not the actual X11. as wslg is a wayland system. So at the end its weston that ends up drawing the window. |
I've just recently found out about WSLg. The description in the documentation seemed very promising. And indeed, not having to install an X11 server like VcXsrv is really neat. Snapping the window to corners also works for me on Win10. Thanks for making all of this possible! When I first heard about WSLg, I was hoping for a more integrated experience into Windows also with regards to the look and feel. My dream scenario would be that apps that don't render their own title bar get assigned the default Windows title bar, e.g. the one we have at the top of the Windows Explorer in the color that you choose in the Windows system settings. This would feel much better than the WSL title bar we get right now that seems to come from the last century (just my personal opinion). The one right now is also smaller in terms of its height (compared to the Windows title bar) making it harder to grab if you're used to the Windows title bar. (Another thing is the mouse cursor that is too small inside the WSL-rendered GUIs. But that's something for another issue.) I'm not at all familiar with all of these protocols involved in making the WSLg magic happen. From a naïve point of view, I expect that some layer in Windows will draw the window in the end, so I hope it's possible that it can "simply" stick the default Windows title bar to it. But of course, things might be way more complex. I haven't used X410 before but from the screenshots showcased on their website, this feels like a better integration also with regards to the title bar (window manager). Collection of links that ask for more native look and feel in WSLg or are related to it |
X410 works fine. I then ended up VcXsrv which had less quirks with my software (PHPStorm from Jetbrains). |
On latest IntelliJ you can just use this VM Option to use Wayland instead:
|
@motabass How did you make it to work with weston? I've got:
|
Please fill issue in JBR YouTrack project that is a bug. |
Hi, I had the same problem with Ubuntu 24.04. This was the solution for me:
|
Are there any updates on the issue? I use dark theme in both W11 and Linux GUI applications (emacs primarily) and the bright window borders look very out of place. Thanks! |
Big chance its not WSLg issue, but maybe somebody will able to tell where to look:
Most apps respect current GTK_THEME and use window decorations from it. But some, most important JetBrains IDEs won't and for example xcalc.
What part of this magic system is responsible to choose what window decoration theme to use? Can i force it to use some dark theme by default?
The text was updated successfully, but these errors were encountered: