Skip to content

Initial prototype for taking screenshots with GTK4 #874#1532

Draft
ptziegler wants to merge 1 commit into
eclipse-windowbuilder:masterfrom
ptziegler:issue874
Draft

Initial prototype for taking screenshots with GTK4 #874#1532
ptziegler wants to merge 1 commit into
eclipse-windowbuilder:masterfrom
ptziegler:issue874

Conversation

@ptziegler

Copy link
Copy Markdown
Contributor

Based on the SWT implementation.

@ptziegler ptziegler added this to the 1.25.0 milestone Jun 17, 2026
@ptziegler

Copy link
Copy Markdown
Contributor Author

There are still several open topics. Most noticeably, taking a screenshot is only possible if the widget has been realized. Which is sadly not guaranteed and not something that can really be "forced".

image

@ptziegler

Copy link
Copy Markdown
Contributor Author

There are still several open topics. Most noticeably, taking a screenshot is only possible if the widget has been realized.

I think the most reliable option is to wait for the "Activate" event to fire. It mustn't block indefinitely in case something goes wrong, though. I might reuse this approach for GTK3 as well, as we have flaky test cases for a similar reason.

Another issue is that the widget will always be in the center of the screen. I'm not yet sure if this is a general problem on GTK4. But it's also in the category of "inconvenient", rather than "critical".

Also the GTK4 port will be Java 24+, because I really have no desire to create the binaries for all Linux platforms.

@github-actions

Copy link
Copy Markdown

Test Results

     4 files  ±0       4 suites  ±0   2h 26m 13s ⏱️ + 4m 22s
 7 020 tests ±0   6 989 ✅ ±0  31 💤 ±0  0 ❌ ±0 
23 684 runs  ±0  23 586 ✅ ±0  98 💤 ±0  0 ❌ ±0 

Results for commit ceff6d3. ± Comparison against base commit f5637f2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant