mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
rootston: add per-seat views
This commit is contained in:
parent
10f3be7384
commit
bb6d34e7a5
12 changed files with 161 additions and 123 deletions
|
|
@ -23,7 +23,7 @@ struct roots_output {
|
|||
};
|
||||
|
||||
struct roots_desktop {
|
||||
struct wlr_list *views;
|
||||
struct wl_list views; // roots_view::link
|
||||
|
||||
struct wl_list outputs;
|
||||
struct timespec last_frame;
|
||||
|
|
@ -59,6 +59,7 @@ struct roots_desktop *desktop_create(struct roots_server *server,
|
|||
struct roots_config *config);
|
||||
void desktop_destroy(struct roots_desktop *desktop);
|
||||
|
||||
void view_init(struct roots_view *view, struct roots_desktop *desktop);
|
||||
void view_destroy(struct roots_view *view);
|
||||
struct roots_view *view_at(struct roots_desktop *desktop, double lx, double ly,
|
||||
struct wlr_surface **surface, double *sx, double *sy);
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@ struct roots_drag_icon {
|
|||
struct wl_list link; // roots_seat::drag_icons
|
||||
bool mapped;
|
||||
|
||||
int32_t sx;
|
||||
int32_t sy;
|
||||
int32_t sx, sy;
|
||||
|
||||
struct wl_listener surface_destroy;
|
||||
struct wl_listener surface_commit;
|
||||
|
|
@ -20,10 +19,11 @@ struct roots_seat {
|
|||
struct roots_input *input;
|
||||
struct wlr_seat *seat;
|
||||
struct roots_cursor *cursor;
|
||||
struct wl_list link;
|
||||
struct wl_list drag_icons;
|
||||
struct wl_list link;
|
||||
|
||||
struct roots_view *focus;
|
||||
struct wl_list views; // roots_seat_view::link
|
||||
struct roots_seat_view *focus;
|
||||
|
||||
struct wl_list keyboards;
|
||||
struct wl_list pointers;
|
||||
|
|
@ -31,6 +31,14 @@ struct roots_seat {
|
|||
struct wl_list tablet_tools;
|
||||
};
|
||||
|
||||
struct roots_seat_view {
|
||||
struct roots_seat *seat;
|
||||
struct roots_view *view;
|
||||
struct wl_list link; // roots_seat::views
|
||||
|
||||
struct wl_listener destroy;
|
||||
};
|
||||
|
||||
struct roots_pointer {
|
||||
struct roots_seat *seat;
|
||||
struct wlr_input_device *device;
|
||||
|
|
@ -70,6 +78,10 @@ void roots_seat_add_device(struct roots_seat *seat,
|
|||
void roots_seat_remove_device(struct roots_seat *seat,
|
||||
struct wlr_input_device *device);
|
||||
|
||||
void roots_seat_add_view(struct roots_seat *seat, struct roots_view *view);
|
||||
|
||||
void roots_seat_remove_view(struct roots_seat *seat, struct roots_view *view);
|
||||
|
||||
void roots_seat_configure_cursor(struct roots_seat *seat);
|
||||
|
||||
void roots_seat_configure_xcursor(struct roots_seat *seat);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
struct roots_wl_shell_surface {
|
||||
struct roots_view *view;
|
||||
|
||||
// TODO: Maybe destroy listener should go in roots_view
|
||||
struct wl_listener destroy;
|
||||
struct wl_listener request_move;
|
||||
struct wl_listener request_resize;
|
||||
|
|
@ -22,7 +21,6 @@ struct roots_wl_shell_surface {
|
|||
struct roots_xdg_surface_v6 {
|
||||
struct roots_view *view;
|
||||
|
||||
// TODO: Maybe destroy listener should go in roots_view
|
||||
struct wl_listener commit;
|
||||
struct wl_listener destroy;
|
||||
struct wl_listener request_move;
|
||||
|
|
@ -33,7 +31,6 @@ struct roots_xdg_surface_v6 {
|
|||
struct roots_xwayland_surface {
|
||||
struct roots_view *view;
|
||||
|
||||
// TODO: Maybe destroy listener should go in roots_view
|
||||
struct wl_listener destroy;
|
||||
struct wl_listener request_configure;
|
||||
struct wl_listener request_move;
|
||||
|
|
@ -51,6 +48,7 @@ enum roots_view_type {
|
|||
|
||||
struct roots_view {
|
||||
struct roots_desktop *desktop;
|
||||
struct wl_list link; // roots_desktop::views
|
||||
|
||||
double x, y;
|
||||
float rotation;
|
||||
|
|
@ -80,6 +78,10 @@ struct roots_view {
|
|||
};
|
||||
struct wlr_surface *wlr_surface;
|
||||
|
||||
struct {
|
||||
struct wl_signal destroy;
|
||||
} events;
|
||||
|
||||
// TODO: This would probably be better as a field that's updated on a
|
||||
// configure event from the xdg_shell
|
||||
// If not then this should follow the typical type/impl pattern we use
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue