mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-04-01 07:15:59 -04:00
xwayland: reintroduce XWayland workaround
This was temporarily removed when introducing proper view abstractions.
Now that we have the cg_xwayland_view struct, we reintroduce this
workaround in its proper place.
This also fixes the previous workaround, which checked whether a view
was *currently* mapped and not if it *has ever* been mapped.
See #18, #19 and 443d955dfd.
This commit is contained in:
parent
7175100d0d
commit
41d4ccfe44
3 changed files with 27 additions and 1 deletions
14
xwayland.h
14
xwayland.h
|
|
@ -10,6 +10,20 @@ struct cg_xwayland_view {
|
|||
struct cg_view view;
|
||||
struct wlr_xwayland_surface *xwayland_surface;
|
||||
|
||||
/* Some applications that aren't yet Wayland-native or
|
||||
otherwise "special" (e.g. Firefox Nightly and Google
|
||||
Chrome/Chromium) spawn an XWayland surface upon startup
|
||||
that is almost immediately closed again. This makes Cage
|
||||
think there are no views left, which results in it
|
||||
exiting. However, after this initial (unmapped) surface,
|
||||
the "real" application surface is opened. This leads to
|
||||
these applications' startup sequences being interrupted by
|
||||
Cage exiting. Hence, to work around this issue, Cage checks
|
||||
whether an XWayland surface has ever been mapped and exits
|
||||
only if 1) the XWayland surface has ever been mapped and 2)
|
||||
this was the last surface Cage manages. */
|
||||
bool ever_been_mapped;
|
||||
|
||||
struct wl_listener destroy;
|
||||
struct wl_listener unmap;
|
||||
struct wl_listener map;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue