Drop server.h include from input/input-manager.h

The only reason it's included there is for a declaration of
struct sway_server, but we can just forward-declare it.

This avoids rebuilding almost all of Sway when touching server.h.
All other server.h includes are from source files, not headers.
This commit is contained in:
Simon Ser 2024-05-25 00:02:48 +02:00 committed by Simon Zeni
parent df69367d92
commit d0bd591ee7
24 changed files with 29 additions and 1 deletions

View File

@ -7,6 +7,10 @@
#include "list.h"
#include "tree/view.h"
#if WLR_HAS_XWAYLAND
#include "sway/xwayland.h"
#endif
enum criteria_type {
CT_COMMAND = 1 << 0,
CT_ASSIGN_OUTPUT = 1 << 1,

View File

@ -5,10 +5,11 @@
#include <wlr/types/wlr_virtual_keyboard_v1.h>
#include <wlr/types/wlr_virtual_pointer_v1.h>
#include <wlr/types/wlr_transient_seat_v1.h>
#include "sway/server.h"
#include "sway/config.h"
#include "list.h"
struct sway_server;
struct sway_input_device {
char *identifier;
struct wlr_input_device *wlr_device;

View File

@ -5,6 +5,7 @@
#include "sway/config.h"
#include "sway/commands.h"
#include "sway/input/input-manager.h"
#include "sway/server.h"
#include "log.h"
#if WLR_HAS_LIBINPUT_BACKEND

View File

@ -3,6 +3,7 @@
#include "sway/config.h"
#include "sway/commands.h"
#include "sway/input/input-manager.h"
#include "sway/server.h"
#include "log.h"
struct xkb_switch_layout_action {

View File

@ -11,6 +11,7 @@
#include "sway/input/seat.h"
#include "sway/ipc-server.h"
#include "sway/output.h"
#include "sway/server.h"
#include "sway/tree/arrange.h"
#include "sway/tree/container.h"
#include "sway/tree/root.h"

View File

@ -5,6 +5,7 @@
#include <wlr/types/wlr_pointer.h>
#include "sway/commands.h"
#include "sway/input/cursor.h"
#include "sway/server.h"
static struct cmd_results *press_or_release(struct sway_cursor *cursor,
char *action, char *button_str);

View File

@ -4,6 +4,7 @@
#include "sway/config.h"
#include "sway/input/cursor.h"
#include "sway/input/seat.h"
#include "sway/server.h"
enum operation {
OP_ENABLE,

View File

@ -2,6 +2,7 @@
#include "sway/commands.h"
#include "sway/input/seat.h"
#include "sway/input/input-manager.h"
#include "sway/server.h"
#include "util.h"
static struct cmd_results *handle_action(struct seat_config *sc,

View File

@ -3,6 +3,7 @@
#include "sway/commands.h"
#include "sway/config.h"
#include "sway/input/seat.h"
#include "sway/server.h"
#include "sway/tree/container.h"
#include "sway/tree/view.h"

View File

@ -23,6 +23,7 @@
#include "sway/config.h"
#include "sway/criteria.h"
#include "sway/desktop/transaction.h"
#include "sway/server.h"
#include "sway/swaynag.h"
#include "sway/tree/arrange.h"
#include "sway/tree/root.h"

View File

@ -12,6 +12,7 @@
#include "sway/config.h"
#include "sway/input/keyboard.h"
#include "sway/output.h"
#include "sway/server.h"
#include "config.h"
#include "list.h"
#include "log.h"

View File

@ -3,6 +3,7 @@
#include <float.h>
#include "sway/config.h"
#include "sway/input/keyboard.h"
#include "sway/server.h"
#include "log.h"
struct input_config *new_input_config(const char* identifier) {

View File

@ -13,6 +13,7 @@
#include "sway/config.h"
#include "sway/input/cursor.h"
#include "sway/output.h"
#include "sway/server.h"
#include "sway/tree/root.h"
#include "log.h"
#include "util.h"

View File

@ -7,6 +7,7 @@
#include "sway/criteria.h"
#include "sway/tree/container.h"
#include "sway/config.h"
#include "sway/server.h"
#include "sway/tree/root.h"
#include "sway/tree/view.h"
#include "sway/tree/workspace.h"

View File

@ -4,6 +4,7 @@
#include "sway/input/seat.h"
#include "sway/output.h"
#include "sway/desktop/launcher.h"
#include "sway/server.h"
#include "sway/tree/node.h"
#include "sway/tree/container.h"
#include "sway/tree/workspace.h"

View File

@ -10,6 +10,7 @@
#include "sway/input/cursor.h"
#include "sway/input/input-manager.h"
#include "sway/output.h"
#include "sway/server.h"
#include "sway/tree/container.h"
#include "sway/tree/node.h"
#include "sway/tree/view.h"

View File

@ -25,6 +25,7 @@
#include "sway/layers.h"
#include "sway/output.h"
#include "sway/scene_descriptor.h"
#include "sway/server.h"
#include "sway/tree/container.h"
#include "sway/tree/root.h"
#include "sway/tree/view.h"

View File

@ -13,6 +13,7 @@
#include "sway/input/seat.h"
#include "sway/input/cursor.h"
#include "sway/ipc-server.h"
#include "sway/server.h"
#include "log.h"
#if WLR_HAS_SESSION

View File

@ -11,6 +11,7 @@
#include "sway/input/tablet.h"
#include "sway/layers.h"
#include "sway/output.h"
#include "sway/server.h"
#include "sway/scene_descriptor.h"
#include "sway/tree/view.h"
#include "sway/tree/workspace.h"

View File

@ -1,5 +1,6 @@
#include "sway/config.h"
#include "sway/input/switch.h"
#include "sway/server.h"
#include "log.h"
struct sway_switch *sway_switch_create(struct sway_seat *seat,

View File

@ -7,6 +7,7 @@
#include "sway/input/cursor.h"
#include "sway/input/seat.h"
#include "sway/input/tablet.h"
#include "sway/server.h"
#if WLR_HAS_LIBINPUT_BACKEND
#include <wlr/backend/libinput.h>

View File

@ -9,6 +9,8 @@
#include "sway/input/text_input.h"
#include "sway/input/text_input_popup.h"
#include "sway/layers.h"
#include "sway/server.h"
static void input_popup_update(struct sway_input_popup *popup);
static struct sway_text_input *relay_get_focusable_text_input(

View File

@ -11,6 +11,7 @@
#include "log.h"
#include "sway/config.h"
#include "sway/ipc-json.h"
#include "sway/server.h"
#include "sway/tree/container.h"
#include "sway/tree/view.h"
#include "sway/tree/workspace.h"

View File

@ -10,6 +10,7 @@
#include "sway/input/seat.h"
#include "sway/ipc-server.h"
#include "sway/output.h"
#include "sway/server.h"
#include "sway/tree/arrange.h"
#include "sway/tree/container.h"
#include "sway/tree/node.h"