mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-09 15:19:11 +02:00
This is a major release and includes BREAKING changes! Breaking Changes: * More intuitive switch of focus, next, prev and exchange (#20, 40 in Bugs.md) Cagebreak will probably still feel broadly the same though. * Remove -r flag - This is replaced by output configuration. * Socket disabled by default - The socket is enabled by invoking Cagebreak with the -e flag. * Socket permissions restricted to the user of the Cagebreak process (700) This may require modification of scripts interacting with the socket with different UIDs than the UID of the Cagebreak process. * Rename "Current frame" indicator to "Current tile" Changelog: * Move to wlr_scene * Add events displaying change over the socket * this enables scripting tools * Add support for scaling outputs (thanks to Oliver Friedmann) * Remove -r flag * Add rotation to output configuration * Add cursor enable|disable flag * Add input keyboard configuration * Custom path flag for configuration file * Restrict socket permissions to the user running cagebreak (700) * Fix Issue #31 (resolve some terminology) 38 in Bugs.md * Fix Issue #30 - 39 in Bugs.md * Fix Issue #20 - 40 in Bugs.md * Fix Issue #12 - 41 in Bugs.md (dump + events over socket) * Fix Bugs found via scan-build static analysis (42 - 45 in Bugs.md) * Fix Issue #33 - 46 in Bugs.md * Fix Issue #32 - 47 in Bugs.md * Fix Issue #16 - 48 in Bugs.md * Fix Issue #3 - 49 in Bugs.md (disabling keybinding interpretation for specific keyboards is now possible) * Fix Issue #26 - 50 in Bugs.md * Fix Issue #7 - 51 in Bugs.md (Change cursor to square while Cagebreak is waiting for a key) * Fix config bug for some commands - 52 in Bugs.md * Fix Issue #35 - 53 in Bugs.md (update to wlroots 0.16.1) * Improve FAQ.md (related to some Issues) * Disable outputs when unable to set any mode (crashed previously) * Add Code of Conduct * Print version number on startup
73 lines
1.6 KiB
C
73 lines
1.6 KiB
C
#ifndef CG_SERVER_H
|
|
#define CG_SERVER_H
|
|
|
|
#include "config.h"
|
|
#include "ipc_server.h"
|
|
#include "message.h"
|
|
|
|
#include <wayland-server-core.h>
|
|
#include <wlr/types/wlr_xdg_decoration_v1.h>
|
|
|
|
struct cg_seat;
|
|
struct cg_output;
|
|
struct keybinding_list;
|
|
struct wlr_output_layout;
|
|
struct wlr_idle_inhibit_manager_v1;
|
|
struct cg_output_config;
|
|
struct cg_input_manager;
|
|
|
|
struct cg_server {
|
|
struct wl_display *wl_display;
|
|
struct wl_event_loop *event_loop;
|
|
|
|
struct cg_seat *seat;
|
|
struct cg_input_manager *input;
|
|
struct wlr_backend *backend;
|
|
struct wlr_idle *idle;
|
|
struct wlr_idle_inhibit_manager_v1 *idle_inhibit_v1;
|
|
struct wl_listener new_idle_inhibitor_v1;
|
|
struct wl_list inhibitors;
|
|
|
|
struct wlr_output_layout *output_layout;
|
|
struct wl_list disabled_outputs;
|
|
struct wl_list outputs;
|
|
struct cg_output *curr_output;
|
|
struct wl_listener new_output;
|
|
struct wl_list output_priorities;
|
|
|
|
struct wlr_renderer *renderer;
|
|
struct wlr_allocator *allocator;
|
|
struct wlr_scene *scene;
|
|
|
|
struct wl_listener xdg_toplevel_decoration;
|
|
struct wl_listener new_xdg_shell_surface;
|
|
#if CG_HAS_XWAYLAND
|
|
struct wl_listener new_xwayland_surface;
|
|
struct wlr_xwayland *xwayland;
|
|
#endif
|
|
|
|
struct keybinding_list *keybindings;
|
|
struct wl_list output_config;
|
|
struct wl_list input_config;
|
|
struct cg_message_config message_config;
|
|
|
|
struct cg_ipc_handle ipc;
|
|
|
|
bool enable_socket;
|
|
bool running;
|
|
char **modes;
|
|
uint16_t nws;
|
|
float *bg_color;
|
|
uint32_t views_curr_id;
|
|
uint32_t tiles_curr_id;
|
|
uint32_t xcursor_size;
|
|
};
|
|
|
|
void
|
|
display_terminate(struct cg_server *server);
|
|
int
|
|
get_mode_index_from_name(char *const *modes, const char *mode_name);
|
|
char *
|
|
server_show_info(struct cg_server *server);
|
|
|
|
#endif
|