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

[Feature] Add better CSD for Linux #97

Open
prateekmedia opened this issue Aug 5, 2021 · 14 comments
Open

[Feature] Add better CSD for Linux #97

prateekmedia opened this issue Aug 5, 2021 · 14 comments
Labels
work in progress This is currently being implemented

Comments

@prateekmedia
Copy link

Currently the window doesn't have any shadows and since flutter uses gtk decoration so you can render own shadows and by setting _GTK_FRAME_EXTENTS.

@knopp

This comment has been minimized.

@bitsdojo
Copy link
Owner

bitsdojo commented Aug 6, 2021

Shadows and rounded corners are coming soon. Check this for a demo:

https://twitter.com/callmebit/status/1408040439609970703

linux-rounded-shadow

@prateekmedia
Copy link
Author

@bitsdojo awesome!

@bitsdojo bitsdojo added the work in progress This is currently being implemented label Aug 17, 2021
@prateekmedia
Copy link
Author

prateekmedia commented Sep 19, 2021

@bitsdojo I was wondering if you can implement something like WindowFrame.noTitle which nativeshell has btw.

It helps you to get what your package does without removing the shadows and borders of original window.

What it basically does is removes only the headerbar and doesn't overwrite any other settings(Like shadows or borders).

Something also told in this comment: #77 (comment)

@bitsdojo
Copy link
Owner

I was wondering if you can implement something like WindowFrame.noTitle

Sure, it is on my list.

@ikeofkc
Copy link

ikeofkc commented Dec 1, 2021

this just got you a donation. thanks for all the work.

@12people
Copy link

12people commented Jan 2, 2022

In the meantime, is there an interim fix that one could apply to get window shadows back?

@blemelin
Copy link

In the meantime, is there an interim fix that one could apply to get window shadows back?

Yes. In my_application.cc, add this after gtk_widget_show(GTK_WIDGET(window)); (around line 54).

auto gdk_window = gtk_widget_get_window(GTK_WIDGET(window));
gdk_window_set_decorations(gdk_window, GdkWMDecoration::GDK_DECOR_BORDER);

Not perfect, but it helps.

@diasnrg
Copy link

diasnrg commented Dec 7, 2022

In the meantime, is there an interim fix that one could apply to get window shadows back?

Yes. In my_application.cc, add this after gtk_widget_show(GTK_WIDGET(window)); (around line 54).

auto gdk_window = gtk_widget_get_window(GTK_WIDGET(window));
gdk_window_set_decorations(gdk_window, GdkWMDecoration::GDK_DECOR_BORDER);

Not perfect, but it helps.

Does not work for Linux on Wayland windowing system, only for X11. Probably because Flutter supports X11.

@TaylorHo
Copy link

Do you happen to have any news here?

@prateekmedia

This comment was marked as outdated.

@bitsdojo
Copy link
Owner

Do you happen to have any news here?

@TaylorHo Looking to release a new version in August.

@annd22
Copy link

annd22 commented Sep 2, 2023

september now :(

@TaylorHo
Copy link

TaylorHo commented Sep 4, 2023

Hey @bitsdojo, is there something that we can help do to launch this new version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work in progress This is currently being implemented
Projects
None yet
Development

No branches or pull requests

9 participants