Skip to content

Conversation

@dtorop
Copy link
Contributor

@dtorop dtorop commented Dec 19, 2025

On Plasma, use server-side decoration to give a themed titlebar, a window shadow, and a wide area for window resizing. Leave existing Gnome behavior: client-side decoration with a custom titlebar, which may allow for hiding titlebar when it is maximized, as per #3315.

Fixes #19947 for Wayland/Plasma. Unfortunately, there still needs to be a fix for a wider area for window resizing for Gnome.

On Gnome, client-side decoration with a custom titlebar allows for
hiding titlebar when it is maximized, as per darktable-org#3315. But on
Plasma, use SSD to give a themed titlebar, a window shadow, and a wide
resize area.

Fixes #darktable-org#19947 for Wayland/Plasma. Window resize area will require a
different fix for Gnome, due to its use of CSD.
@dtorop
Copy link
Contributor Author

dtorop commented Dec 19, 2025

Note that this PR returns the titlebar of the main window to being consistent with other windows in Plasma.

Before PR:

image

With this PR:

image

@TurboGit
Copy link
Member

Why only for KDE/Plasma?

@TurboGit TurboGit added priority: low core features work as expected, only secondary/optional features don't scope: UI user interface and interactions labels Dec 21, 2025
@TurboGit TurboGit added this to the 5.6 milestone Dec 21, 2025
@dtorop
Copy link
Contributor Author

dtorop commented Dec 21, 2025

Why only for KDE/Plasma?

Good question. As I understand it, Wayland gives window compositors two models:

  • Client-side decoration (CSD): The application is responsible for the titlebar, window resize region, etc. This gives the most control, and is the preferred Wayland way to do things. It requires creating a custom GtkHeaderBar. Gnome, prefers (or requires?) CSD.
  • Server-side decoration (SSD): the desktop environment takes care of decorations. SSE the classic X11 model, is the easiest to implement (all you have to do is just set gtk_window_set_title()), and provides a unified look across the desktop. KWin defaults to SSD unless the application explicitly creates a GtkHeaderBar, in which case it switches to CSD.

32764b0 effectively switched darktable to using CSD on both Gnome and KDE. But it wasn't a complete CSD implementation. It didn't allow for a >1px window resize zone. It replaced the standard KDE theming from the titlebar with a chunky unstyled titlebar. My understanding is that this wasn't even to fix things under standard Gnome, but for particular Gnome extensions such as Unite.

So this PR at least brings dt under KDE back to its prior SSD state, which gives workable decorations. The ideal fix could be to fully implement CSD for both Gnome and KDE. This means providing a resize drag area, potentially other niceties (shadows), and thinking carefully about what should actually be in the darktable titlebar.

@dtorop
Copy link
Contributor Author

dtorop commented Dec 22, 2025

Reading more about this. The CSD/SSD paradigm seems to be a bit of a rift between Gnome and KDE, with no clear resolution. It would be possible to go all in on CSD (preferred by Gnome, allowed by KDE). The title bar could be customized to contain what is currently the top panel (darktable logo on left, view chooser on right) as well as (potentially) a close button. The title bar would then be hidden when needed by the panels/top and panels/all hide/show shortcuts.

This would be a more GNOME-ish behavior, and would lose the unified look which KDE gives to applications via SSD. Problems would be:

  • Still need to use (CSS?) to make a wider drag region for window resizing.
  • For non-Wayland setups would still need to keep the extant top panel code (unless they allow CSD).

@dtorop dtorop mentioned this pull request Dec 23, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: low core features work as expected, only secondary/optional features don't scope: UI user interface and interactions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

window drag edge area is small

2 participants