mirror of
https://github.com/swaywm/sway.git
synced 2026-04-22 06:46:27 -04:00
commit
4660771f6a
77 changed files with 703 additions and 306 deletions
|
|
@ -1,6 +1,9 @@
|
|||
#ifndef _SWAY_IPC_CLIENT_H
|
||||
#define _SWAY_IPC_CLIENT_H
|
||||
|
||||
// arbitrary number, it's probably sufficient, higher number = more memory usage
|
||||
#define JSON_MAX_DEPTH 512
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/time.h>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
#include "list.h"
|
||||
#include "pool-buffer.h"
|
||||
#include "swaynag/types.h"
|
||||
#include "xdg-output-unstable-v1-client-protocol.h"
|
||||
|
||||
#define SWAYNAG_MAX_HEIGHT 500
|
||||
|
||||
|
|
@ -75,13 +74,11 @@ struct swaynag_details {
|
|||
|
||||
struct swaynag {
|
||||
bool run_display;
|
||||
int querying_outputs;
|
||||
|
||||
struct wl_display *display;
|
||||
struct wl_compositor *compositor;
|
||||
struct wl_seat *seat;
|
||||
struct wl_shm *shm;
|
||||
struct zxdg_output_manager_v1 *xdg_output_manager;
|
||||
struct wl_list outputs; // swaynag_output::link
|
||||
struct wl_list seats; // swaynag_seat::link
|
||||
struct swaynag_output *output;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue