Skip to content
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

Add drop shadow to floating windows #2028

Merged
merged 8 commits into from Nov 7, 2023
Merged

Add drop shadow to floating windows #2028

merged 8 commits into from Nov 7, 2023

Conversation

Kethku
Copy link
Member

@Kethku Kethku commented Sep 16, 2023

Adds drop shadows to floating windows to help differentiate them from the background.

image

Remaining Tasks:

  • Rebase on improved render branch
  • Update skia to newest release that obviates the need for the fork
  • Add configuration to turn it off
  • Add documentation

What kind of change does this PR introduce?

  • Feature

Did this PR introduce a breaking change?

  • No

@Kethku
Copy link
Member Author

Kethku commented Sep 29, 2023

This PR is still waiting on a release from skia and agreement on the way to configure this behavior. Neovim does have a shadow border in it's list of existing borders, but in my opinion this effect works best when there aren't any added border characters. I'm personally inclined to merge this with a setting of some sort (even just a global setting for now to see how people like it) and then think about integrating with neovim directly after it settles, but its an open question.

@MultisampledNight
Copy link
Contributor

Fwiw skia-safe 0.67.0 is out, including the previously missing shadow flags. Only thing open now is the neovim integration.

Copy link

github-actions bot commented Nov 3, 2023

Test Results

    3 files  ±0      3 suites  ±0   6s ⏱️ ±0s
  98 tests ±0    98 ✔️ ±0  0 💤 ±0  0 ±0 
294 runs  ±0  294 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 24ebdaf. ± Comparison against base commit 5743356.

♻️ This comment has been updated with latest results.

@last-partizan
Copy link
Collaborator

Btw, maybe we can use the same draw_shadow function to add shadow to the main window under wayland?

We're using sctk-adwaita, but it uses tiny-skia, which doesn't have draw_shadow as far as i can tell, so i cannot add that directly. There was some attempts to draw shadows using other technics, but so far none is ready.

@Kethku
Copy link
Member Author

Kethku commented Nov 6, 2023

Btw, maybe we can use the same draw_shadow function to add shadow to the main window under wayland?

We're using sctk-adwaita, but it uses tiny-skia, which doesn't have draw_shadow as far as i can tell, so i cannot add that directly. There was some attempts to draw shadows using other technics, but so far none is ready.

Honestly I have no idea. I dont understand linux window compositing and dont use linux personally, so somebody would have to give it a try. My gut is that it wouldn't work as skia needs a canvas to draw onto, but thats only a guess

@Kethku
Copy link
Member Author

Kethku commented Nov 6, 2023

This is about ready to merge. Only remaining issues are documentation of the new configuration settings and a fix for the failing macos build. I'm not sure whats up with the mac ci pipeline and am too tired to figure it out myself rn

@fredizzimo
Copy link
Member

I think need to figure out the mac CI issues first, it seems like there's some problems with the ARM toolchain, even if the logs says that it's installed properly.

As for the window shadows, I don't think we should give in on Gnome's agenda to refuse to implement the server side window decorations - https://wayland.app/protocols/xdg-decoration-unstable-v1 protocol and force every application to draw their own client-side decorations. At least not without using a common library, like sctk-adwaita, which we already use.

I don't see any technical reason's why it can't be done there, it's just that none one have had the motivation to do the work until now, but just yesterday, there's a new draft PR up PolyMeilex/sctk-adwaita#43

Furthermore, the more complete adwaita library has moved under the Gnome organization here https://gitlab.gnome.org/World/Rust/libadwaita-rs. So maybe someone could convince winit to support that.

@Kethku Kethku merged commit f9756ef into main Nov 7, 2023
7 checks passed
@Kethku Kethku deleted the floating-window-shadows branch May 11, 2024 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants