mirror of
https://github.com/swaywm/sway.git
synced 2025-11-15 06:59:50 -05:00
basic focus overhaul
This commit is contained in:
parent
b28602aa74
commit
5151502298
12 changed files with 224 additions and 39 deletions
|
|
@ -162,4 +162,10 @@ void container_map(swayc_t *container,
|
|||
swayc_t *swayc_at(swayc_t *parent, double lx, double ly,
|
||||
struct wlr_surface **surface, double *sx, double *sy);
|
||||
|
||||
/**
|
||||
* Get a list of containers that are descendents of the container in rendering
|
||||
* order
|
||||
*/
|
||||
list_t *container_list_children(swayc_t *con);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -12,14 +12,26 @@ struct sway_seat_device {
|
|||
struct wl_list link; // sway_seat::devices
|
||||
};
|
||||
|
||||
struct sway_seat_container {
|
||||
struct sway_seat *seat;
|
||||
swayc_t *container;
|
||||
|
||||
struct wl_list link; // sway_seat::focus_stack
|
||||
|
||||
struct wl_listener destroy;
|
||||
};
|
||||
|
||||
struct sway_seat {
|
||||
struct wlr_seat *wlr_seat;
|
||||
struct seat_config *config;
|
||||
struct sway_cursor *cursor;
|
||||
struct sway_input_manager *input;
|
||||
swayc_t *focus;
|
||||
|
||||
bool has_focus;
|
||||
struct wl_list focus_stack; // list of containers in focus order
|
||||
|
||||
struct wl_listener focus_destroy;
|
||||
struct wl_listener new_container;
|
||||
|
||||
struct wl_list devices; // sway_seat_device::link
|
||||
|
||||
|
|
@ -44,6 +56,8 @@ void sway_seat_configure_xcursor(struct sway_seat *seat);
|
|||
|
||||
void sway_seat_set_focus(struct sway_seat *seat, swayc_t *container);
|
||||
|
||||
swayc_t *sway_seat_get_focus(struct sway_seat *seat, swayc_t *container);
|
||||
|
||||
void sway_seat_set_config(struct sway_seat *seat, struct seat_config *seat_config);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#define _SWAY_LAYOUT_H
|
||||
|
||||
#include <wlr/types/wlr_output_layout.h>
|
||||
#include "sway/container.h"
|
||||
|
||||
struct sway_container;
|
||||
|
||||
|
|
@ -11,10 +12,15 @@ struct sway_root {
|
|||
struct wl_listener output_layout_change;
|
||||
|
||||
struct wl_list unmanaged_views; // sway_view::unmanaged_view_link
|
||||
|
||||
struct {
|
||||
struct wl_signal new_container;
|
||||
} events;
|
||||
};
|
||||
|
||||
void init_layout(void);
|
||||
void add_child(struct sway_container *parent, struct sway_container *child);
|
||||
swayc_t *add_sibling(swayc_t *parent, swayc_t *child);
|
||||
struct sway_container *remove_child(struct sway_container *child);
|
||||
enum swayc_layouts default_layout(struct sway_container *output);
|
||||
void sort_workspaces(struct sway_container *output);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue