waybox/include/waybox/seat.h
Keith Bowes 579a2d2084 Some bug fixes
1. The "crash when exiting an application while moving it" bug. See https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3372
2. The crash when there's no previous view to focus. This wasn't a problem before the migration to the scene graph API due to a logic error on my part.
3. The crash if <margins> is missing from rc.xml.
4. I'm now reusing code from focus_view() in seat_focus_surface().
5. I'm now using the dimensions of the output layout box instead of the current view (which was clearly wrong) for unconstraining layer-shell popups.
6. I fixed setting the background color, so that it won't interfere with the layer_shell helper.
2022-03-01 22:16:20 -05:00

36 lines
887 B
C

#ifndef _WB_SEAT_H
#define _WB_SEAT_H
#include <wlr/types/wlr_keyboard.h>
#include <wlr/types/wlr_primary_selection.h>
#include <wlr/types/wlr_primary_selection_v1.h>
#include <wlr/types/wlr_seat.h>
struct wb_server;
struct wb_seat {
struct wlr_seat *seat;
struct wlr_layer_surface_v1 *focused_layer;
struct wl_list keyboards;
struct wl_listener request_set_primary_selection;
struct wl_listener request_set_selection;
};
struct wb_keyboard {
struct wl_list link;
struct wb_server *server;
struct wlr_input_device *device;
struct wl_listener modifiers;
struct wl_listener key;
};
struct wb_server;
struct wb_seat *wb_seat_create(struct wb_server *server);
void seat_focus_surface(struct wb_seat *seat, struct wlr_surface *surface);
void seat_set_focus_layer(struct wb_seat *seat, struct wlr_layer_surface_v1 *layer);
void wb_seat_destroy(struct wb_seat *seat);
#endif