phillbush / shod

mouse-based window manager that can tile windows inside floating containers
MIT License
172 stars 5 forks source link

Transparency/compositing not working? #3

Closed cassafrass387 closed 2 years ago

cassafrass387 commented 2 years ago

Absolutely adoring shod, but I've noticed that none of the transparency affects I have set up (only in my terminal and some parts of browser) are not working. The compositor itself (I've tried picom and xcompmgr) seems to work fine (picom has fade-in and fade-out on some applications like dmenu) but there is no transparency. Any ideas? image

phillbush commented 2 years ago

That seems to be related to the fact that shod is a reparenting window manager.
In a reparenting window manager, windows do not float on the desktop; instead, they live inside dummy windows, called frames, which, in the case of shod, do not support transparency.
Transparency is easier in non-reparenting window managers: there's no "dummy window" below the actual window, so the transparency works as expected.
I will study how other reparenting window managers handle opacity on their frame windows and apply that to shod.

Can you share your compositor and terminal transparency configuration, for me to use it while testing the changes?

phillbush commented 2 years ago

While shod is not supporting transparency, you can run picom with --detect-client-opacity and --use-ewmh-active-win. I think that'll make picom try to fix the problem while shod does not handle the opacity property on windows.

cassafrass387 commented 2 years ago

In regards to my compositor config, I've figured out that I can set inactive and active opacity, but all I was aiming for is passive opacity (terminal background always being transparent regardless of focus, text being opaque) which is still not working, even with those flags. I'm using the ibhagwan fork of picom, but that shouldn't affect this, and those flags are still there in the --help. As for my terminal, it's just Luke Smith's st build, with transparency built-in and working on other window managers just fine.

Interestingly, all of picom's features, like frame opacity, inactive dimming/blurring, etc. work fine, and even without those flags. But the transparency in st doesn't work, and neither does the transparency in Firefox.

I've also tried kitty, and the transparency in it is also not working. picom.conf.txt All the kitty.conf has is background_opacity 0.75 St config is very similar if not the same as https://github.com/lukesmithxyz/st

cassafrass387 commented 2 years ago

I know this isn't the issue's topic, but setting various games to fullscreen doesn't work. I don't believe it is a Wine/Proton thing, since Minecraft (which uses SDL) does the same thing. Turning it on in the game's settings doesn't work (still remains windowed, though the size of the window does change), I have to use shodc to set the window to fullscreen. Borderless windowed fares slightly better, ex. when setting Teardown to borderless windowed, and making the window fullscreen with shodc, it is truely borderless, but in Fullscreen mode the corner borders are visible. I've tried using the -c flag, and while the example mentioned with XTerm does work (changing font size changes the window size) it doesn't affect the games. I appreciate the help, by the way!

phillbush commented 2 years ago

Can you make other applications fullscreen like Firefox (pressing F11) or XTerm (Alt+Enter)?

cassafrass387 commented 2 years ago

Yes, both of those work fine.

cassafrass387 commented 2 years ago

New update has caused additional issues with fullscreen- I think its anticipating that a dock should be there and thus compensating. This shifts the window upwards- meaning when I hover over an icon, it is not aligned with the on-screen indicator (eg. I have to move my mouse down more than normal to click it). Untitled

phillbush commented 2 years ago

Sorry about that. I was adding a feature for the ratio between the tiles be constant when resizing/maximizing containers and I forgot about the fullscreen case. It should be working now. Also sorry about taking too much time to answer, week has been crazy here.

And about the original issue (transparency), I'm working on solutions for that, but I'm afraid that could not be possible: Shod can maintain more than one client/application in a single window/container: it can tile in columns/rows and tab windows. Transparency could reveal the window below in another tab and will affect the color depth of the entire container.

phillbush commented 2 years ago

I managed to make client windows transparent.

But there is still some work:
• When there are more than one tab on a container, the transparency does not work (problem that I predicted in my last comment).
• Transparency does not work in kitty(1). It seems that this terminal needs some properties to be set, but I'm not sure which properties are those. However, transparency in Luke's build of st works smoothly, as you can see in this image:

transparent

phillbush commented 1 year ago

Sorry, the fix is actually to the bug reported at ctrlmenu/#3.