diff options
Diffstat (limited to 'include/rootston')
-rw-r--r-- | include/rootston/desktop.h | 12 | ||||
-rw-r--r-- | include/rootston/layers.h | 25 | ||||
-rw-r--r-- | include/rootston/output.h | 11 | ||||
-rw-r--r-- | include/rootston/view.h | 9 |
4 files changed, 50 insertions, 7 deletions
diff --git a/include/rootston/desktop.h b/include/rootston/desktop.h index 5986c96f..c1dcad56 100644 --- a/include/rootston/desktop.h +++ b/include/rootston/desktop.h @@ -1,12 +1,12 @@ #ifndef ROOTSTON_DESKTOP_H #define ROOTSTON_DESKTOP_H - #include <time.h> #include <wayland-server.h> #include <wlr/config.h> #include <wlr/types/wlr_compositor.h> #include <wlr/types/wlr_gamma_control.h> #include <wlr/types/wlr_idle.h> +#include <wlr/types/wlr_layer_shell.h> #include <wlr/types/wlr_linux_dmabuf.h> #include <wlr/types/wlr_list.h> #include <wlr/types/wlr_output_layout.h> @@ -48,12 +48,14 @@ struct roots_desktop { struct wlr_idle *idle; struct wlr_idle_inhibit_manager_v1 *idle_inhibit; struct wlr_linux_dmabuf *linux_dmabuf; + struct wlr_layer_shell *layer_shell; struct wl_listener new_output; struct wl_listener layout_change; struct wl_listener xdg_shell_v6_surface; struct wl_listener xdg_shell_surface; struct wl_listener wl_shell_surface; + struct wl_listener layer_shell_surface; struct wl_listener decoration_new; #ifdef WLR_HAS_XWAYLAND @@ -70,8 +72,10 @@ struct roots_desktop *desktop_create(struct roots_server *server, void desktop_destroy(struct roots_desktop *desktop); struct roots_output *desktop_output_from_wlr_output( struct roots_desktop *desktop, struct wlr_output *output); -struct roots_view *desktop_view_at(struct roots_desktop *desktop, double lx, - double ly, struct wlr_surface **surface, double *sx, double *sy); + +struct wlr_surface *desktop_surface_at(struct roots_desktop *desktop, + double lx, double ly, double *sx, double *sy, + struct roots_view **view); struct roots_view *view_create(struct roots_desktop *desktop); void view_destroy(struct roots_view *view); @@ -83,10 +87,12 @@ void view_update_size(struct roots_view *view, uint32_t width, uint32_t height); void view_initial_focus(struct roots_view *view); void view_map(struct roots_view *view, struct wlr_surface *surface); void view_unmap(struct roots_view *view); +void view_arrange_maximized(struct roots_view *view); void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data); void handle_xdg_shell_surface(struct wl_listener *listener, void *data); void handle_wl_shell_surface(struct wl_listener *listener, void *data); +void handle_layer_shell_surface(struct wl_listener *listener, void *data); void handle_xwayland_surface(struct wl_listener *listener, void *data); #endif diff --git a/include/rootston/layers.h b/include/rootston/layers.h new file mode 100644 index 00000000..0e5164bb --- /dev/null +++ b/include/rootston/layers.h @@ -0,0 +1,25 @@ +#ifndef ROOTSTON_LAYERS_H +#define ROOTSTON_LAYERS_H +#include <stdbool.h> +#include <wlr/types/wlr_box.h> +#include <wlr/types/wlr_surface.h> +#include <wlr/types/wlr_layer_shell.h> + +struct roots_layer_surface { + struct wlr_layer_surface *layer_surface; + struct wl_list link; + + struct wl_listener destroy; + struct wl_listener map; + struct wl_listener unmap; + struct wl_listener surface_commit; + struct wl_listener output_destroy; + + bool configured; + struct wlr_box geo; +}; + +struct roots_output; +void arrange_layers(struct roots_output *output); + +#endif diff --git a/include/rootston/output.h b/include/rootston/output.h index a852a204..f78ee81d 100644 --- a/include/rootston/output.h +++ b/include/rootston/output.h @@ -1,9 +1,9 @@ #ifndef ROOTSTON_OUTPUT_H #define ROOTSTON_OUTPUT_H - #include <pixman.h> #include <time.h> #include <wayland-server.h> +#include <wlr/types/wlr_box.h> #include <wlr/types/wlr_output_damage.h> struct roots_desktop; @@ -14,11 +14,16 @@ struct roots_output { struct wl_list link; // roots_desktop:outputs struct roots_view *fullscreen_view; + struct wl_list layers[4]; // layer_surface::link struct timespec last_frame; struct wlr_output_damage *damage; + struct wlr_box usable_area; + struct wl_listener destroy; + struct wl_listener mode; + struct wl_listener transform; struct wl_listener damage_frame; struct wl_listener damage_destroy; }; @@ -35,5 +40,9 @@ void output_damage_from_view(struct roots_output *output, struct roots_view *view); void output_damage_whole_drag_icon(struct roots_output *output, struct roots_drag_icon *icon); +void output_damage_from_local_surface(struct roots_output *output, + struct wlr_surface *surface, double ox, double oy, float rotation); +void output_damage_whole_local_surface(struct roots_output *output, + struct wlr_surface *surface, double ox, double oy, float rotation); #endif diff --git a/include/rootston/view.h b/include/rootston/view.h index 775f3d11..4e3859d5 100644 --- a/include/rootston/view.h +++ b/include/rootston/view.h @@ -1,6 +1,5 @@ #ifndef ROOTSTON_VIEW_H #define ROOTSTON_VIEW_H - #include <stdbool.h> #include <wlr/config.h> #include <wlr/types/wlr_box.h> @@ -65,8 +64,8 @@ struct roots_xwayland_surface { struct wl_listener request_resize; struct wl_listener request_maximize; struct wl_listener request_fullscreen; - struct wl_listener map_notify; - struct wl_listener unmap_notify; + struct wl_listener map; + struct wl_listener unmap; struct wl_listener surface_commit; }; @@ -177,6 +176,8 @@ struct roots_xdg_popup_v6 { struct roots_view_child view_child; struct wlr_xdg_popup_v6 *wlr_popup; struct wl_listener destroy; + struct wl_listener map; + struct wl_listener unmap; struct wl_listener new_popup; }; @@ -184,6 +185,8 @@ struct roots_xdg_popup { struct roots_view_child view_child; struct wlr_xdg_popup *wlr_popup; struct wl_listener destroy; + struct wl_listener map; + struct wl_listener unmap; struct wl_listener new_popup; }; |