cage/xwayland.h
Matthew Bauer 5d7ff9e64d
Don’t terminate display when no view is found (#132)
* Don’t terminate display when no view is found

Some apps like RetroArch will quit and fork itself to switch
modes (like from the menu to a loaded core). This means that for a
very short period of time we have no view available for Wayland. Right
now, Cage doesn’t actually exit when it does this terminate, so you
get this kind of zombie child process that is running but not showing
anything on the screen because there is no compositor.

The solution I have here is to just keep Cage’s Wayland server running
to avoid this issue. I’m open to other idea, but this seems sane to
me. Perhaps an alternative is to check if the process is still alive
when this happens, if not then we can do the quitting behavior. In
addition, we could make this an option if some users don’t want this
behavior.

* Remove "ever_been_mapped" from cg_wayland_view
2020-03-16 20:32:24 +01:00

23 lines
585 B
C

#ifndef CG_XWAYLAND_H
#define CG_XWAYLAND_H
#include <wayland-server-core.h>
#include <wlr/xwayland.h>
#include "view.h"
struct cg_xwayland_view {
struct cg_view view;
struct wlr_xwayland_surface *xwayland_surface;
struct wl_listener destroy;
struct wl_listener unmap;
struct wl_listener map;
struct wl_listener commit;
struct wl_listener request_fullscreen;
};
struct cg_xwayland_view *xwayland_view_from_view(struct cg_view *view);
bool xwayland_view_should_manage(struct cg_view *view);
void handle_xwayland_surface_new(struct wl_listener *listener, void *data);
#endif