8000 [GTK] Cleanup SWT snapshot mechanism on Linux systems by ptziegler · Pull Request #610 · eclipse-windowbuilder/windowbuilder · GitHub
[go: up one dir, main page]

Skip to content

[GTK] Cleanup SWT snapshot mechanism on Linux systems#610

Merged
ptziegler merged 1 commit intoeclipse-windowbuilder:masterfrom
ptziegler:issue-608-swt-snapshot
Nov 14, 2023
Merged

[GTK] Cleanup SWT snapshot mechanism on Linux systems#610
ptziegler merged 1 commit intoeclipse-windowbuilder:masterfrom
ptziegler:issue-608-swt-snapshot

Conversation

@ptziegler
Copy link
Contributor

This change consists of the following part:

  • The unused methods have been removed from the native C code. They were still called by the 32bit implementation. But given that this mode is no longer supported by SWT, there is no point in keeping it.

  • The snapshot mechanism exclusively uses the native implementation (how it used to be). This should hopefully avoid issues where a snapshot is taken before the widget has been rendered.

  • We no longer attempt to capture the decorations. Those are part of the window manager and not the shell itself. On X11, it is still possible (yet unreliable) but on Wayland it seems to be prohibited to access anything outside the widget.
    Doing so also causes several issues where the figures are cut off or offset by the insets of the window.

@ptziegler ptziegler added this to the 1.14.0 milestone Oct 25, 2023
@ptziegler ptziegler force-pushed the issue-608-swt-snapshot branch from 4a6db82 to f7c70a7 Compare October 25, 2023 19:02
@ptziegler
Copy link
Contributor Author

#609

@ptziegler ptziegler force-pushed the issue-608-swt-snapshot branch from f7c70a7 to 869c9a3 Compare October 25, 2023 19:04
@github-actions
Copy link
github-actions bot commented Oct 25, 2023

Unit Test Results

         4 files           4 suites   1h 45m 40s ⏱️
  7 645 tests   7 442 ✔️ 203 💤 0
30 580 runs  29 764 ✔️ 816 💤 0

Results for commit 1b75dd7.

♻️ This comment has been updated with latest results.

@ptziegler ptziegler force-pushed the issue-608-swt-snapshot branch from 869c9a3 to 1431a2e Compare October 25, 2023 19:11
@ptziegler ptziegler force-pushed the issue-608-swt-snapshot branch 7 times, most recently from e7e1d4e to 48021cd Compare November 4, 2023 12:31
@ptziegler ptziegler force-pushed the issue-608-swt-snapshot branch 4 times, most recently from 337ae35 to f01d3b0 Compare November 12, 2023 20:20
@ptziegler
Copy link
Contributor Author

Finally got around to setting up an isolated Wayland test environment and unsurprisingly, this change would re-introduce the segmentation fault if one doesn't use X11 😞

After a lot of trial & error, I think the solution is to clip the widget bounds with its visible area, something that I already did on a Java level and now moved to the C level instead.

…uilder#609

This change consists of the following part:
- The unused methods have been removed from the native C code. They were
still called by the 32bit implementation. But given that this mode is no
longer supported by SWT, there is no point in keeping it.

- The snapshot mechanism exclusively uses the native implementation (how
it used to be). This should hopefully avoid issues where a snapshot is
taken before the widget has been rendered.

- We no longer attempt to capture the decorations. Those are part of the
window manager and not the shell itself. On X11, it is still possible
(yet unreliable) but on Wayland it seems to be prohibited to access
anything outside the widget.
Doing so also causes several issues where the figures are cut off or
offset by the insets of the window.

Should resolve eclipse-windowbuilder#609
@ptziegler ptziegler force-pushed the issue-608-swt-snapshot branch from f01d3b0 to 1b75dd7 Compare November 13, 2023 05:23
@ptziegler ptziegler merged commit 5cb095e into eclipse-windowbuilder:master Nov 14, 2023
@ptziegler ptziegler deleted the issue-608-swt-snapshot branch December 9, 2023 08:28
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

0