Skip to content

WindowSwitcher: blur background #2330

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

lenemter
Copy link
Member

@lenemter lenemter commented Mar 24, 2025

New clean branch that should be easier to review

Window switcher is used as an example of how this effect can be used because Danielle showed some interest in blurring it: elementary/granite#747 (comment)

Can be rebase merged

@lenemter lenemter requested a review from a team March 24, 2025 21:20
@lenemter lenemter force-pushed the lenemter/background-blur-effect branch 3 times, most recently from 50d77bd to 8061863 Compare March 24, 2025 21:27
@lenemter lenemter requested a review from a team March 24, 2025 21:46
Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve for UX, but still needs code review :)

@danirabbit danirabbit requested a review from a team March 24, 2025 22:03
@lenemter lenemter force-pushed the lenemter/background-blur-effect branch 9 times, most recently from 6f4a0ed to f942cd9 Compare March 29, 2025 10:27
@@ -475,7 +475,7 @@ namespace Cogl {
#endif
public void set_uniform_1f (int uniform_location, float value);
public void set_uniform_1i (int uniform_location, int value);
public void set_uniform_float (int uniform_location, int n_components, int count, float value);
public void set_uniform_float (int uniform_location, int n_components, int count, float *value);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason this is a pointer? According to the vapi docs if possible you should use the vala provided syntax to make the semantics clearer: https://docs.vala.dev/developer-guides/bindings/writing-a-vapi-manually/07-00-binding-a-c-function-s-parameter-and-return-types/07-07-pointers.html

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a pointer to the start of array of float values in C header. I don't know if there's other way to pass it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well I guess you could pass it as an array? IIUC the array length would be n_components * count? In that case you'd probably have to do array_length = false in the vapi. On the other hand the deprecated Cogl.Program has a method with the same name and annotates the count as array length.
But i don't know enough about shaders and that stuff to say which it is 😅
Also the vapi seems to be generated by vapigen (at least that's what it says in the header) so ig we should probably put the change in the metadata file? https://docs.vala.dev/developer-guides/bindings/generating-a-vapi-with-gobject-introspection.html#fixing-vapi-generation-with-metadata

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put it in the vapi file for now. I always assumed our vapi files were written by hand since the meson script in the vapi folder never worked for me. I guess we should ask @tintou about where should this change be

@lenemter lenemter force-pushed the lenemter/background-blur-effect branch from f942cd9 to a686740 Compare April 17, 2025 19:30
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.

3 participants