Review header includes

This commit is contained in:
project-repo 2020-09-01 16:57:22 +02:00
commit 8778ace0ce
20 changed files with 14 additions and 65 deletions

View file

@ -10,17 +10,14 @@
#include "config.h"
#include <fcntl.h>
#include <fontconfig/fontconfig.h>
#include <getopt.h>
#include <unistd.h>
#include <pango.h>
#include <pango/pangocairo.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/wait.h>
#include <unistd.h>
#include <wayland-server-core.h>
#include <wlr/backend.h>
#include <wlr/render/wlr_renderer.h>
@ -31,7 +28,6 @@
#include <wlr/types/wlr_gamma_control_v1.h>
#include <wlr/types/wlr_idle.h>
#include <wlr/types/wlr_idle_inhibit_v1.h>
#include <wlr/types/wlr_output_damage.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_screencopy_v1.h>
#include <wlr/types/wlr_server_decoration.h>
@ -54,7 +50,6 @@
#include "parse.h"
#include "seat.h"
#include "server.h"
#include "view.h"
#include "xdg_shell.h"
#if CG_HAS_XWAYLAND
#include "xwayland.h"

View file

@ -7,7 +7,6 @@
* See the LICENSE file accompanying this file.
*/
#include <stdlib.h>
#include <wayland-server-core.h>
#include <wlr/types/wlr_idle.h>
#include <wlr/types/wlr_idle_inhibit_v1.h>

View file

@ -1,7 +1,7 @@
#ifndef CG_IDLE_INHIBIT_H
#define CG_IDLE_INHIBIT_H
#include <wayland-server-core.h>
struct wl_listener;
void
handle_idle_inhibitor_v1_new(struct wl_listener *listener, void *data);

View file

@ -3,8 +3,8 @@
#include "config.h"
#include <inttypes.h>
#include <sys/types.h>
#include <stdint.h>
#include <stdlib.h>
#include <wayland-server-core.h>
struct cg_server;

View file

@ -1,13 +1,7 @@
#define _POSIX_C_SOURCE 200809L
#include <signal.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/sysmacros.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <string.h>
#include <wayland-server-core.h>
#include <wlr/backend/multi.h>
#include <wlr/backend/session.h>
@ -22,7 +16,6 @@
#include "server.h"
#include "view.h"
#include "workspace.h"
#include "xdg_shell.h"
int
keybinding_resize(struct keybinding_list *list) {

View file

@ -4,8 +4,8 @@
#include "config.h"
#include <sys/types.h>
#include <wlr/types/wlr_keyboard.h>
#include <stdint.h>
#include <xkbcommon/xkbcommon.h>
struct cg_server;

View file

@ -1,7 +1,5 @@
#include "pango.h"
#include <cairo/cairo.h>
#include <pango/pangocairo.h>
#include <stdlib.h>
#include <unistd.h>
#include <wlr/backend.h>
#include <wlr/render/wlr_renderer.h>
@ -9,7 +7,7 @@
#include <wlr/types/wlr_output_layout.h>
#include <wlr/util/log.h>
#include "cairo.h"
#include "pango.h"
#include "message.h"
#include "output.h"
#include "server.h"

View file

@ -13,25 +13,23 @@
#include "config.h"
#include <wlr/config.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <wayland-server-core.h>
#include <wlr/backend.h>
#include <wlr/backend/wayland.h>
#if WLR_HAS_X11_BACKEND
#include <wlr/backend/x11.h>
#endif
#include <wlr/render/wlr_renderer.h>
#include <wlr/types/wlr_data_device.h>
#include <wlr/types/wlr_matrix.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_output_damage.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_surface.h>
#include <wlr/types/wlr_xcursor_manager.h>
#include <wlr/types/wlr_xdg_shell.h>
#include <wlr/util/log.h>
#include <wlr/util/region.h>
#include <wlr/xwayland.h>
#include "keybinding.h"
#include "message.h"
@ -40,7 +38,6 @@
#include "seat.h"
#include "server.h"
#include "util.h"
#include "view.h"
#include "workspace.h"
#if CG_HAS_XWAYLAND
#include "xwayland.h"

View file

@ -2,11 +2,7 @@
#include <cairo/cairo.h>
#include <pango/pangocairo.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wlr/util/log.h>
char *

View file

@ -1,7 +1,6 @@
#ifndef _SWAY_PANGO_H
#define _SWAY_PANGO_H
#include <cairo/cairo.h>
#include <stdbool.h>
void
get_text_size(cairo_t *cairo, const char *font, int *width, int *height,

View file

@ -1,15 +1,13 @@
#define _POSIX_C_SOURCE 200812L
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <wlr/util/log.h>
#include "keybinding.h"
#include "output.h"
#include "parse.h"
#include "server.h"
#include "workspace.h"
char *
malloc_vsprintf(const char *fmt, va_list ap) {

View file

@ -16,7 +16,6 @@
#include <wlr/types/wlr_matrix.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_output_damage.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_surface.h>
#include <wlr/util/log.h>
#include <wlr/util/region.h>

7
seat.c
View file

@ -12,10 +12,8 @@
#include "config.h"
#include <linux/input-event-codes.h>
#include <stdlib.h>
#include <wayland-client-core.h>
#include <wayland-client-protocol.h>
#include <wayland-cursor.h>
#include <stdint.h>
#include <string.h>
#include <wayland-server-core.h>
#include <wayland-server-protocol.h>
#include <wlr/backend.h>
@ -28,7 +26,6 @@
#include <wlr/types/wlr_surface.h>
#include <wlr/types/wlr_xcursor_manager.h>
#include <wlr/util/log.h>
#include <xdg_shell.h>
#if CG_HAS_XWAYLAND
#include <wlr/xwayland.h>
#endif

View file

@ -9,23 +9,11 @@
#define _POSIX_C_SOURCE 200809L
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <wayland-server-core.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_surface.h>
#include "output.h"
#include "seat.h"
#include "server.h"
#include "view.h"
#include "workspace.h"
#include "xdg_shell.h"
#if CG_HAS_XWAYLAND
#include "xwayland.h"
#endif
void
display_terminate(struct cg_server *server) {

3
view.c
View file

@ -10,14 +10,12 @@
#define _POSIX_C_SOURCE 200809L
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <wayland-server-core.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_output_damage.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_surface.h>
#include "output.h"
@ -25,7 +23,6 @@
#include "server.h"
#include "view.h"
#include "workspace.h"
#include "xdg_shell.h"
#if CG_HAS_XWAYLAND
#include "xwayland.h"
#endif

3
view.h
View file

@ -4,12 +4,11 @@
#include "config.h"
#include <stdbool.h>
#include <wayland-server-core.h>
#include <wlr/types/wlr_surface.h>
#include <wayland-server-core.h>
struct cg_server;
struct wlr_box;
struct wlr_surface;
enum cg_view_type {
CG_XDG_SHELL_VIEW,

View file

@ -17,7 +17,6 @@
#include "message.h"
#include "output.h"
#include "server.h"
#include "view.h"
#include "workspace.h"
#if CG_HAS_FANALYZE

View file

@ -10,7 +10,6 @@
#define _POSIX_C_SOURCE 200809L
#include <stdbool.h>
#include <stdlib.h>
#include <wayland-server-core.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_output_layout.h>

View file

@ -9,14 +9,12 @@
#include <X11/Xutil.h>
#include <stdbool.h>
#include <stdlib.h>
#include <wayland-server-core.h>
#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_output_damage.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/util/log.h>
#include <wlr/xwayland.h>
#include <xcb/xproto.h>
#include "output.h"
#include "server.h"

View file

@ -2,8 +2,6 @@
#define CG_XWAYLAND_H
#include "view.h"
#include <wayland-server-core.h>
#include <wlr/xwayland.h>
struct cg_xwayland_view {
struct cg_view view;