-
-
Notifications
You must be signed in to change notification settings - Fork 723
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
Decos: Window decoration flags, shadow improvements #3739
Conversation
Could we perhaps plop another 2D sampler to a fragment shader... and use that as a mask? hm. |
I think we should try to get a more robust decoration placement system We could have a decoration manager to help manage, place and handle the decorations Some decorations like groupbars/hyprbars could also benefit from a opening/closing slide animation, which would be another possible flag I'll see if I can think of other possible use cases |
That's a great idea and something I've also thought about, but it would be for another MR. The current deco placement system is... bad. |
if this has been fixed, should the shadows start from the end of the border instead of the end of the window? also, seem like there is some delay with resizing the window and the border and shadows following the same size. Not sure it comes from here |
IMO yes. The previous behavior (no borders) sucked.
huh, can't see any. |
video link: https://filebin.net/xwfcnj6fhrrv26pc |
ah, that's normal. Not this mr's fault. |
regarding flags, I am talking about general flags. WD positioner MR will have a separate flag enum for positioning-related ones most likely |
possibly one for animating like I said
|
elaborate? How would that work?
No, this is only a rendering hint. |
I kinda attempted this on the original groupbars PR with 6013a3c on a closer look the resizing issue definitely seems worse on this pr |
hm. For that I'd just add custom onChange callbacks for damage control (which I've been planning to do anyways...) and that would be solved. Changing extents all the time is a bad idea.
idk how |
the damage issues were when the total extents were changed but for some reason the border would not get damaged |
bad idea. That would necessitate a layout recalc. No No No. |
I don't think so, layout already gets recalc'd if the extents change, just render the decoration increasing at the right rate to match the window size decreasing rate animation. This way the total window outer box size would change only once, since window_height(t) + decoration_height(t) = initial_window_height but since that wouldn't require external control, since the deco could calculate current size from the initial window size and the current window size, maybe there is no point in adding a flag for that |
damage tracking should be fixed |
does there is a way to write decorations with GTK+? |
yes |
though worth mentioning you'd have to write your own gdk backend most likely. IIRC gtk can work with cairo as a backend. If that's the case, you can use cairo surfaces easily to draw stuff in hyprland. Hyprbars use cairo extensively. Would be an interesting plugin. |
Since no further comments have arisen, I'll merge. Flags can always be added in le future |
Motivation
Mostly code cleanup + this:
Notice how the shadow includes the top bar
Breaking Stuff
IHyprWindowDecoration::allowsInput
yeetenRFC
@MightyPlaza (deco MRs)
Numero uno
Is this enough? Do we want any other flags? We have space for 64.
Numero dos
Another thing is how we stencil the shadow.
Hyprland/src/render/decorations/CHyprDropShadowDecoration.cpp
Lines 71 to 74 in 66b8b80
Currently, I have to do this, because the stencil is very 0/1. Even if we do a != 1, there still will be an issue if the top bar is transparent:
There is no way to avoid this with the current stencil solution. Are we able to make some sort of an alpha blending mask here? Any opengl wizards with some khronos docs / ideas?