From 5fd43add1cbd286ff13489048c4809b6ad915b2b Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Tue, 15 Apr 2025 20:13:29 +0300 Subject: [PATCH] Fix/cleanup includes a bit --- backend/backend.c | 2 -- backend/drm/atomic.c | 2 -- backend/drm/backend.c | 2 -- backend/drm/drm.c | 4 ---- backend/libinput/tablet_tool.c | 1 + include/backend/drm/fb.h | 4 ++++ include/backend/libinput.h | 2 -- include/render/gles2.h | 1 - include/types/wlr_region.h | 2 ++ include/wlr/types/wlr_ext_image_copy_capture_v1.h | 3 +++ include/wlr/types/wlr_input_method_v2.h | 1 - include/wlr/types/wlr_output_swapchain_manager.h | 1 + include/wlr/types/wlr_presentation_time.h | 1 - render/gles2/texture.c | 1 - render/wlr_renderer.c | 1 - types/wlr_drm_lease_v1.c | 1 - types/wlr_ext_foreign_toplevel_list_v1.c | 1 - types/wlr_input_method_v2.c | 2 +- types/wlr_tearing_control_v1.c | 1 - types/wlr_xdg_foreign_v2.c | 1 - xwayland/xwayland.c | 3 --- 21 files changed, 12 insertions(+), 25 deletions(-) diff --git a/backend/backend.c b/backend/backend.c index b8a9d71cc..a130d9045 100644 --- a/backend/backend.c +++ b/backend/backend.c @@ -1,5 +1,4 @@ #include -#include #include #include #include @@ -12,7 +11,6 @@ #include #include #include -#include "backend/multi.h" #include "types/wlr_output.h" #include "util/env.h" #include "util/time.h" diff --git a/backend/drm/atomic.c b/backend/drm/atomic.c index 91cafea60..037c3c23a 100644 --- a/backend/drm/atomic.c +++ b/backend/drm/atomic.c @@ -5,13 +5,11 @@ #include #include #include -#include #include #include "backend/drm/drm.h" #include "backend/drm/fb.h" #include "backend/drm/iface.h" #include "backend/drm/util.h" -#include "types/wlr_output.h" static char *atomic_commit_flags_str(uint32_t flags) { const char *const l[] = { diff --git a/backend/drm/backend.c b/backend/drm/backend.c index 9d9d5c229..5a545b192 100644 --- a/backend/drm/backend.c +++ b/backend/drm/backend.c @@ -1,10 +1,8 @@ #include -#include #include #include #include #include -#include #include #include #include diff --git a/backend/drm/drm.c b/backend/drm/drm.c index d07d98afc..e106ea8c1 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -1,7 +1,6 @@ #include #include #include -#include #include #include #include @@ -25,9 +24,6 @@ #include "backend/drm/fb.h" #include "backend/drm/iface.h" #include "backend/drm/util.h" -#include "render/pixel_format.h" -#include "render/drm_format_set.h" -#include "render/wlr_renderer.h" #include "types/wlr_output.h" #include "util/env.h" #include "config.h" diff --git a/backend/libinput/tablet_tool.c b/backend/libinput/tablet_tool.c index cc9e60968..eec697c49 100644 --- a/backend/libinput/tablet_tool.c +++ b/backend/libinput/tablet_tool.c @@ -6,6 +6,7 @@ #include #include #include "backend/libinput.h" +#include "config.h" struct tablet_tool { struct wlr_tablet_tool wlr_tool; diff --git a/include/backend/drm/fb.h b/include/backend/drm/fb.h index 91d0fffcc..e8d328e97 100644 --- a/include/backend/drm/fb.h +++ b/include/backend/drm/fb.h @@ -2,6 +2,10 @@ #define BACKEND_DRM_FB_H #include +#include +#include + +struct wlr_drm_format_set; struct wlr_drm_fb { struct wlr_buffer *wlr_buf; diff --git a/include/backend/libinput.h b/include/backend/libinput.h index cf685f0ef..874e9aa1f 100644 --- a/include/backend/libinput.h +++ b/include/backend/libinput.h @@ -12,8 +12,6 @@ #include #include -#include "config.h" - struct wlr_libinput_backend { struct wlr_backend backend; diff --git a/include/render/gles2.h b/include/render/gles2.h index 0f24ae38e..6b852dcb7 100644 --- a/include/render/gles2.h +++ b/include/render/gles2.h @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include diff --git a/include/types/wlr_region.h b/include/types/wlr_region.h index 485632555..a44a9f09a 100644 --- a/include/types/wlr_region.h +++ b/include/types/wlr_region.h @@ -1,6 +1,8 @@ #ifndef TYPES_WLR_REGION_H #define TYPES_WLR_REGION_H +#include + struct wl_client; /* diff --git a/include/wlr/types/wlr_ext_image_copy_capture_v1.h b/include/wlr/types/wlr_ext_image_copy_capture_v1.h index 897005710..51c4af8c4 100644 --- a/include/wlr/types/wlr_ext_image_copy_capture_v1.h +++ b/include/wlr/types/wlr_ext_image_copy_capture_v1.h @@ -9,10 +9,13 @@ #ifndef WLR_TYPES_WLR_EXT_IMAGE_COPY_CAPTURE_V1_H #define WLR_TYPES_WLR_EXT_IMAGE_COPY_CAPTURE_V1_H +#include #include #include #include "ext-image-copy-capture-v1-protocol.h" +struct wlr_renderer; + struct wlr_ext_image_copy_capture_manager_v1 { struct wl_global *global; diff --git a/include/wlr/types/wlr_input_method_v2.h b/include/wlr/types/wlr_input_method_v2.h index 02216ddad..77460b571 100644 --- a/include/wlr/types/wlr_input_method_v2.h +++ b/include/wlr/types/wlr_input_method_v2.h @@ -9,7 +9,6 @@ #ifndef WLR_TYPES_WLR_INPUT_METHOD_V2_H #define WLR_TYPES_WLR_INPUT_METHOD_V2_H #include -#include #include #include #include diff --git a/include/wlr/types/wlr_output_swapchain_manager.h b/include/wlr/types/wlr_output_swapchain_manager.h index 3ea9c49b9..26b3e5636 100644 --- a/include/wlr/types/wlr_output_swapchain_manager.h +++ b/include/wlr/types/wlr_output_swapchain_manager.h @@ -13,6 +13,7 @@ struct wlr_backend; struct wlr_backend_output_state; +struct wlr_output; /** * Helper to allocate swapchains for mode-setting. diff --git a/include/wlr/types/wlr_presentation_time.h b/include/wlr/types/wlr_presentation_time.h index 9becffeee..22d538ed7 100644 --- a/include/wlr/types/wlr_presentation_time.h +++ b/include/wlr/types/wlr_presentation_time.h @@ -11,7 +11,6 @@ #include #include -#include #include struct wlr_surface; diff --git a/render/gles2/texture.c b/render/gles2/texture.c index f9ad4cc56..9a967ebdb 100644 --- a/render/gles2/texture.c +++ b/render/gles2/texture.c @@ -13,7 +13,6 @@ #include "render/egl.h" #include "render/gles2.h" #include "render/pixel_format.h" -#include "types/wlr_buffer.h" static const struct wlr_texture_impl texture_impl; diff --git a/render/wlr_renderer.c b/render/wlr_renderer.c index eb6b9e97f..e65314ccc 100644 --- a/render/wlr_renderer.c +++ b/render/wlr_renderer.c @@ -25,7 +25,6 @@ #include #endif // WLR_HAS_VULKAN_RENDERER -#include "render/pixel_format.h" #include "render/wlr_renderer.h" #include "util/env.h" diff --git a/types/wlr_drm_lease_v1.c b/types/wlr_drm_lease_v1.c index 50097ae75..c64bb0896 100644 --- a/types/wlr_drm_lease_v1.c +++ b/types/wlr_drm_lease_v1.c @@ -1,5 +1,4 @@ #include -#include #include #include #include diff --git a/types/wlr_ext_foreign_toplevel_list_v1.c b/types/wlr_ext_foreign_toplevel_list_v1.c index 432b27fc2..f20ddc877 100644 --- a/types/wlr_ext_foreign_toplevel_list_v1.c +++ b/types/wlr_ext_foreign_toplevel_list_v1.c @@ -1,4 +1,3 @@ - #include #include #include diff --git a/types/wlr_input_method_v2.c b/types/wlr_input_method_v2.c index 3804a113a..ae50d784c 100644 --- a/types/wlr_input_method_v2.c +++ b/types/wlr_input_method_v2.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -9,7 +10,6 @@ #include #include #include "input-method-unstable-v2-protocol.h" -#include "util/shm.h" // Note: zwp_input_popup_surface_v2 and zwp_input_method_keyboard_grab_v2 objects // become inert when the corresponding zwp_input_method_v2 is destroyed diff --git a/types/wlr_tearing_control_v1.c b/types/wlr_tearing_control_v1.c index 6ba0b2740..826cf5471 100644 --- a/types/wlr_tearing_control_v1.c +++ b/types/wlr_tearing_control_v1.c @@ -1,4 +1,3 @@ - #include #include #include diff --git a/types/wlr_xdg_foreign_v2.c b/types/wlr_xdg_foreign_v2.c index 8ea2af2a8..58071f4a1 100644 --- a/types/wlr_xdg_foreign_v2.c +++ b/types/wlr_xdg_foreign_v2.c @@ -1,4 +1,3 @@ - #include #include #include diff --git a/xwayland/xwayland.c b/xwayland/xwayland.c index 7cef4cc8f..d3b2a6c84 100644 --- a/xwayland/xwayland.c +++ b/xwayland/xwayland.c @@ -1,7 +1,5 @@ #include -#include #include -#include #include #include #include @@ -14,7 +12,6 @@ #include #include #include -#include "sockets.h" #include "xwayland/xwm.h" struct wlr_xwayland_cursor {