danirod/cartero

Create a Rust feature to disable client side decorations

Closed this issue · 1 comments

They currently cause issues on Windows and macOS.

  • On Windows, they cause weird shadows to appear, and the alternative to shadows is even worse (see #19).
  • Also on Windows, they are not fully compatible with features like window snapping
  • On macOS, window controls are not native and are in the opposite side of the Window

A way to disable CSD during compile-time should be added to Cartero. I believe that it should be implemented as a feature, to make it easier to test it even on GNU/Linux, or even to facilitate the integration with desktop environments that do not follow the GNOME HIG, such as KDE.

  • If CSD is enabled, CarteroWindow will extend Adw.ApplicationWindow, and the Blueprint shall reflect it. This is the current behaviour.
  • If CSD is disabled, CarteroWindow will extend Gtk.ApplicationWindow instead, and should use a different Blueprint that adapts to the Gtk.ApplicationWindow limitations.

Also, on Windows disabling the CSDs shall set the GTK_CSD env-var to "0", because it seems that on Windows, Gtk.ApplicationWindow will try to be non-native unless the environment variable is set.

Implemented in c631f8e, waiting to verify this on Windows and macOS.