Merge pull request #1 from swaywm/v1.7

V1.7
This commit is contained in:
William McKinnon 2022-04-26 21:44:51 -04:00 committed by GitHub
commit 4660771f6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
77 changed files with 703 additions and 306 deletions

View file

@ -112,6 +112,7 @@ sway_cmd cmd_border;
sway_cmd cmd_client_noop;
sway_cmd cmd_client_focused;
sway_cmd cmd_client_focused_inactive;
sway_cmd cmd_client_focused_tab_title;
sway_cmd cmd_client_unfocused;
sway_cmd cmd_client_urgent;
sway_cmd cmd_client_placeholder;
@ -284,6 +285,7 @@ sway_cmd output_cmd_max_render_time;
sway_cmd output_cmd_mode;
sway_cmd output_cmd_modeline;
sway_cmd output_cmd_position;
sway_cmd output_cmd_render_bit_depth;
sway_cmd output_cmd_scale;
sway_cmd output_cmd_scale_filter;
sway_cmd output_cmd_subpixel;

View file

@ -247,6 +247,12 @@ enum scale_filter_mode {
SCALE_FILTER_SMART,
};
enum render_bit_depth {
RENDER_BIT_DEPTH_DEFAULT, // the default is currently 8
RENDER_BIT_DEPTH_8,
RENDER_BIT_DEPTH_10,
};
/**
* Size and position configuration for a particular output.
*
@ -266,6 +272,7 @@ struct output_config {
enum wl_output_subpixel subpixel;
int max_render_time; // In milliseconds
int adaptive_sync;
enum render_bit_depth render_bit_depth;
char *background;
char *background_option;
@ -283,6 +290,12 @@ struct side_gaps {
int left;
};
enum smart_gaps_mode {
SMART_GAPS_OFF,
SMART_GAPS_ON,
SMART_GAPS_INVERSE_OUTER,
};
/**
* Stores configuration for a workspace, regardless of whether the workspace
* exists.
@ -512,7 +525,7 @@ struct sway_config {
bool tiling_drag;
int tiling_drag_threshold;
bool smart_gaps;
enum smart_gaps_mode smart_gaps;
int gaps_inner;
struct side_gaps gaps_outer;
@ -535,12 +548,15 @@ struct sway_config {
struct {
struct border_colors focused;
struct border_colors focused_inactive;
struct border_colors focused_tab_title;
struct border_colors unfocused;
struct border_colors urgent;
struct border_colors placeholder;
float background[4];
} border_colors;
bool has_focused_tab_title;
// floating view
int32_t floating_maximum_width;
int32_t floating_maximum_height;

View file

@ -25,6 +25,8 @@ struct sway_layer_surface {
bool mapped;
struct wlr_box extent;
enum zwlr_layer_shell_v1_layer layer;
struct wl_list subsurfaces;
};
struct sway_layer_popup {
@ -44,6 +46,7 @@ struct sway_layer_popup {
struct sway_layer_subsurface {
struct wlr_subsurface *wlr_subsurface;
struct sway_layer_surface *layer_surface;
struct wl_list link;
struct wl_listener map;
struct wl_listener unmap;

View file

@ -48,7 +48,7 @@ struct sway_output {
struct wl_listener damage_frame;
struct {
struct wl_signal destroy;
struct wl_signal disable;
} events;
struct timespec last_presentation;

View file

@ -4,6 +4,7 @@
#include <wayland-server-core.h>
#include <wlr/backend.h>
#include <wlr/backend/session.h>
#include <wlr/render/allocator.h>
#include <wlr/render/wlr_renderer.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_data_device.h>
@ -32,13 +33,16 @@ struct sway_server {
const char *socket;
struct wlr_backend *backend;
struct wlr_backend *noop_backend;
// secondary headless backend used for creating virtual outputs on-the-fly
struct wlr_backend *headless_backend;
struct wlr_renderer *renderer;
struct wlr_allocator *allocator;
struct wlr_compositor *compositor;
struct wl_listener compositor_new_surface;
struct wlr_linux_dmabuf_v1 *linux_dmabuf_v1;
struct wlr_data_device_manager *data_device_manager;
struct sway_input_manager *input;
@ -137,6 +141,8 @@ void server_fini(struct sway_server *server);
bool server_start(struct sway_server *server);
void server_run(struct sway_server *server);
void restore_nofile_limit(void);
void handle_compositor_new_surface(struct wl_listener *listener, void *data);
void handle_new_output(struct wl_listener *listener, void *data);

View file

@ -117,12 +117,14 @@ struct sway_container {
struct wlr_texture *title_focused;
struct wlr_texture *title_focused_inactive;
struct wlr_texture *title_focused_tab_title;
struct wlr_texture *title_unfocused;
struct wlr_texture *title_urgent;
list_t *marks; // char *
struct wlr_texture *marks_focused;
struct wlr_texture *marks_focused_inactive;
struct wlr_texture *marks_focused_tab_title;
struct wlr_texture *marks_unfocused;
struct wlr_texture *marks_urgent;

View file

@ -31,7 +31,7 @@ struct sway_root {
list_t *scratchpad; // struct sway_container
// For when there's no connected outputs
struct sway_output *noop_output;
struct sway_output *fallback_output;
struct sway_container *fullscreen_global;