You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[GTK3] Issue 371 - Fix crash when taking a snapshot on Wayland
In short, our implementation doesn't seem to support taking snapshots of
partially unmapped widgets when running Wayland instead of X11.
Instead of trying to implement a workaround in native code, I think it's
more efficient (for both the sake of complexity and maintainability) to
elevate our snapshot mechanism from C to Java code. Where necessary, we
call the native GTK methods either by the GTK/GDK class or via wrapper
methods implemented by WindowBuilder.
The snapshot is taken by creating a new image using the bounds of the
widget and by painting the area it's occupying on the screen via GC.
Note that this approach assumes that the widget isn't obstructed. But a
similar restriction already exists on the native implementation.
Shells represent a special edge-case. Instead of only taking a snapshot
of the client area, the whole shell is considered. This way the title
bar is included as well, rendering the explicit painting of its
decorations obsolete.
0 commit comments