mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
Declare struct wlr_surface in a less weird place
wlr_compositor.h contains references to `struct wlr_surface` in function arguments before it actually defines it. This generally works because wlr_compositor.h includes wlr_output.h which contains a forward-declaration for `struct wlr_surface` (despite not actually referencing it). This is all pretty weird, and gives very confusing errors if you manage to end up with wlr_output.h including wlr_compositor.h (eg. via an indirect route) so make it less weird.
This commit is contained in:
parent
dc7dba8b1f
commit
1380a48b4d
3 changed files with 3 additions and 2 deletions
|
|
@ -18,6 +18,8 @@
|
|||
#include <wlr/util/addon.h>
|
||||
#include <wlr/util/box.h>
|
||||
|
||||
struct wlr_surface;
|
||||
|
||||
enum wlr_surface_state_field {
|
||||
WLR_SURFACE_STATE_BUFFER = 1 << 0,
|
||||
WLR_SURFACE_STATE_SURFACE_DAMAGE = 1 << 1,
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
#include <wlr/types/wlr_output.h>
|
||||
|
||||
struct wlr_input_device;
|
||||
struct wlr_surface;
|
||||
struct wlr_xcursor_manager;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -296,8 +296,6 @@ struct wlr_output_event_request_state {
|
|||
const struct wlr_output_state *state;
|
||||
};
|
||||
|
||||
struct wlr_surface;
|
||||
|
||||
void wlr_output_create_global(struct wlr_output *output, struct wl_display *display);
|
||||
void wlr_output_destroy_global(struct wlr_output *output);
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue