2026-04-06 23:38:06 +07:00
|
|
|
#ifdef XWAYLAND
|
|
|
|
|
#include "types.h"
|
|
|
|
|
#include "absinthe-toplevel.h"
|
2026-04-06 23:50:12 +07:00
|
|
|
#include "xdg_toplevel.h"
|
2026-04-06 23:38:06 +07:00
|
|
|
#include "xwayland.h"
|
|
|
|
|
|
2026-04-06 23:50:12 +07:00
|
|
|
void xwayland_activate(struct wl_listener *listener, void *data)
|
|
|
|
|
{
|
|
|
|
|
struct absinthe_toplevel *toplevel = wl_container_of(listener, toplevel, xwayland_activate);
|
|
|
|
|
|
|
|
|
|
if (!absinthe_toplevel_is_unmanaged(toplevel))
|
|
|
|
|
wlr_xwayland_surface_activate(toplevel->toplevel.x11, 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void xwayland_associate(struct wl_listener *listener, void *data)
|
|
|
|
|
{
|
|
|
|
|
struct absinthe_toplevel *toplevel = wl_container_of(listener, toplevel, xwayland_activate);
|
|
|
|
|
|
|
|
|
|
toplevel->map.notify = xdg_toplevel_map;
|
|
|
|
|
wl_signal_add(&toplevel->toplevel.x11->events.map, &toplevel->map);
|
|
|
|
|
toplevel->unmap.notify = xdg_toplevel_unmap;
|
|
|
|
|
wl_signal_add(&toplevel->toplevel.x11->events.unmap, &toplevel->unmap);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void xwayland_dissociate(struct wl_listener *listener, void *data)
|
|
|
|
|
{
|
|
|
|
|
struct absinthe_toplevel *toplevel = wl_container_of(listener, toplevel, xwayland_activate);
|
|
|
|
|
|
|
|
|
|
wl_list_remove(&toplevel->map.link);
|
|
|
|
|
wl_list_remove(&toplevel->unmap.link);
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-06 23:38:06 +07:00
|
|
|
void xwayland_configure(struct wl_listener *listener, void *data) {}
|
2026-04-06 23:50:12 +07:00
|
|
|
|
2026-04-06 23:38:06 +07:00
|
|
|
void xwayland_set_hints(struct wl_listener *listener, void *data) {}
|
|
|
|
|
|
|
|
|
|
#endif
|