cage/xdg_shell.h
Jonathan GUILLOT 560e9ff3ef view: unconditionally center views in output layout
Whatever type or dimensions of a view, position it at center of the
output layout. Then, if it is a primary view or if it extends the output
layout, send request to maximize it.
The client may or may not change the view dimensions after that.
If not, e.g. weston-flower, the view will be kept displayed at center
instead of to left.
If so, the view will expand from center to fill the whole output layout.

In order to update the view position, XDG shell surface commit is now
handled to check for dimension change.
2024-03-12 10:44:32 +01:00

32 lines
767 B
C

#ifndef CG_XDG_SHELL_H
#define CG_XDG_SHELL_H
#include <wayland-server-core.h>
#include <wlr/types/wlr_xdg_decoration_v1.h>
#include <wlr/types/wlr_xdg_shell.h>
#include "view.h"
struct cg_xdg_shell_view {
struct cg_view view;
struct wlr_xdg_toplevel *xdg_toplevel;
struct wl_listener destroy;
struct wl_listener unmap;
struct wl_listener map;
struct wl_listener request_fullscreen;
struct wl_listener commit;
};
struct cg_xdg_decoration {
struct wlr_xdg_toplevel_decoration_v1 *wlr_decoration;
struct cg_server *server;
struct wl_listener destroy;
struct wl_listener request_mode;
};
void handle_xdg_shell_surface_new(struct wl_listener *listener, void *data);
void handle_xdg_toplevel_decoration(struct wl_listener *listener, void *data);
#endif