Skip to content

gtk4-prep: fix darkroom module header hover freeze and multi-instance clicks - #21726

Merged
TurboGit merged 4 commits into
darktable-org:masterfrom
Arecsu:gtk4/iop-header-events
Aug 6, 2026
Merged

gtk4-prep: fix darkroom module header hover freeze and multi-instance clicks#21726
TurboGit merged 4 commits into
darktable-org:masterfrom
Arecsu:gtk4/iop-header-events

Conversation

@Arecsu

@Arecsu Arecsu commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Two regressions from the event-controller conversion in #21659 are fixed:

  • the darkroom froze when hovering module header buttons and they are set to hide automatically (dt freezes #21723)
  • right/middle clicks on module headers silently did nothing

Along the way:

  • header buttons only hide once the pointer has really left the module (GTK3-only position check; GTK4 keeps the plain hide-on-leave) — in the non-always hide-header-buttons modes
  • hovering another module hides the previous module's buttons in those same modes
  • gestures now listen to all mouse buttons, and handlers read the pressed button via gtk_gesture_single_get_current_button()
  • menus open on button release (no stuck-pressed button) without the cancel bridge that double-opened menus

Separately: middle-click duplication was intentionally replaced by right-click in 2021 (be9d783). Right-click is restored; middle-click does nothing.

Some of these are GTK3-specific fixes that should be cleaned up once a full GTK4 move happens. A few visual bugs seem native to GTK3 and have no clean fix — for instance, moving the cursor slowly out of the sidebar (with buttons set to hide on hover-out) sometimes leaves them shown, and moving to the histogram can do the same. GTK3 just isn't reliably able to assess lack of hover in these scenarios, and tracking it properly would take a lot of verbose code that GTK4 should make unnecessary and cleaner.

These are purely visual quirks, nothing functional — annoying to my visual-obsessive side, but I expect the GTK4 move will smooth out a lot of these UI/UX rough edges anyway.

Related: #15920 #20433
Fixes #21723

CC: @piratenpanda @dtrtuser

@AxelG-DE AxelG-DE mentioned this pull request Aug 5, 2026
1 task
@TurboGit TurboGit added this to the 5.8 milestone Aug 5, 2026
@TurboGit TurboGit added bugfix pull request fixing a bug gtk4 labels Aug 5, 2026

@TurboGit TurboGit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tha

Comment thread src/develop/imageop.c Outdated
Replace the file-static _header_buttons_module with a dt_develop_t field so
the state lives in the global darktable struct (avoids static variables,
per review feedback on darktable-org#21726).

@TurboGit TurboGit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, thanks!

@TurboGit
TurboGit merged commit c1ee4ec into darktable-org:master Aug 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix pull request fixing a bug gtk4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dt freezes

2 participants