Skip to content

[Gtk4] Fix PaintListener paint ordering for all widget types#3308

Merged
jonahgraham merged 1 commit into
eclipse-platform:masterfrom
akurtakov:master
May 15, 2026
Merged

[Gtk4] Fix PaintListener paint ordering for all widget types#3308
jonahgraham merged 1 commit into
eclipse-platform:masterfrom
akurtakov:master

Conversation

@akurtakov
Copy link
Copy Markdown
Member

On Gtk 4, PaintListener on leaf controls (Button, Label, etc.) drew custom content under the native widget appearance instead of over it (issue #2819). Fixing this by simply moving snapshotToDraw after the children loop regressed JFace Forms rendering (PR #3299).

New paint-ordering scheme that mirrors Gtk 3's
signal split (EXPOSE_EVENT_INVERSE for containers, DRAW/EXPOSE_EVENT for leaf controls).

On Gtk 4, PaintListener on leaf controls (Button, Label, etc.) drew
custom content under the native widget appearance instead of over it
(issue eclipse-platform#2819). Fixing this by simply moving snapshotToDraw after the
children loop regressed JFace Forms rendering (PR eclipse-platform#3299).

New paint-ordering scheme that mirrors Gtk 3's
signal split (EXPOSE_EVENT_INVERSE for containers, DRAW/EXPOSE_EVENT
for leaf controls).
@akurtakov
Copy link
Copy Markdown
Member Author

Fixes #2819

@github-actions
Copy link
Copy Markdown
Contributor

Test Results (linux)

   94 files  ±0     94 suites  ±0   14m 30s ⏱️ -28s
4 597 tests ±0  4 373 ✅ ±0  224 💤 ±0  0 ❌ ±0 
3 383 runs  ±0  3 308 ✅ ±0   75 💤 ±0  0 ❌ ±0 

Results for commit 425c7b6. ± Comparison against base commit f33b79e.

Copy link
Copy Markdown
Contributor

@jonahgraham jonahgraham left a comment

Choose a reason for hiding this comment

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

This change fixes the top comment case in #2819, but #2819 (comment) shows that we are calling paint listener twice still on GTK4 even with this change.

image

Snippet for the above is the one from #2819 (comment) but I changed the color to red to make it easier to see.

I am approving this as it does move forward, but I am not going to let it close the issue until we discuss further.

@jonahgraham jonahgraham merged commit 7f9089e into eclipse-platform:master May 15, 2026
20 checks passed
@akurtakov akurtakov self-assigned this May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants