bitsdojo_window icon indicating copy to clipboard operation
bitsdojo_window copied to clipboard

[Feature] Add better CSD for Linux

Open prateekmedia opened this issue 4 years ago • 14 comments

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.

prateekmedia avatar Aug 05 '21 13:08 prateekmedia

Sorry, accidentally replied this instead of the NativeShell issue. Can you reply there?

knopp avatar Aug 06 '21 09:08 knopp

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

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

linux-rounded-shadow

bitsdojo avatar Aug 06 '21 09:08 bitsdojo

@bitsdojo awesome!

prateekmedia avatar Aug 06 '21 09:08 prateekmedia

@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: https://github.com/bitsdojo/bitsdojo_window/issues/77#issuecomment-857954105

prateekmedia avatar Sep 19 '21 11:09 prateekmedia

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

Sure, it is on my list.

bitsdojo avatar Sep 19 '21 11:09 bitsdojo

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

ikeofkc avatar Dec 01 '21 04:12 ikeofkc

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

12people avatar Jan 02 '22 19:01 12people

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.

blemelin avatar Apr 17 '22 12:04 blemelin

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.

diasnrg avatar Dec 07 '22 11:12 diasnrg

Do you happen to have any news here?

TaylorHo avatar Jul 24 '23 03:07 TaylorHo

@TaylorHo this package is almost dead, so either switch to window_manager plugin or wait for eternity.

[EDIT] The package seems to be revived.

prateekmedia avatar Jul 24 '23 08:07 prateekmedia

Do you happen to have any news here?

@TaylorHo Looking to release a new version in August.

bitsdojo avatar Jul 24 '23 08:07 bitsdojo

september now :(

annd22 avatar Sep 02 '23 15:09 annd22

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

TaylorHo avatar Sep 04 '23 13:09 TaylorHo