Add support for wlr-foreign-toplevel-management

This commit is contained in:
GnSight 2025-10-01 11:53:09 +08:00 committed by Simon Ser
parent f9626f7951
commit af0a3cf8a6
6 changed files with 85 additions and 7 deletions

5
view.h
View file

@ -32,6 +32,10 @@ struct cg_view {
enum cg_view_type type;
const struct cg_view_impl *impl;
struct wlr_foreign_toplevel_handle_v1 *foreign_toplevel_handle;
struct wl_listener request_activate;
struct wl_listener request_close;
};
struct cg_view_impl {
@ -41,6 +45,7 @@ struct cg_view_impl {
bool (*is_transient_for)(struct cg_view *child, struct cg_view *parent);
void (*activate)(struct cg_view *view, bool activate);
void (*maximize)(struct cg_view *view, int output_width, int output_height);
void (*close)(struct cg_view *view);
void (*destroy)(struct cg_view *view);
};