Fix GCC build

This commit is contained in:
emersion 2017-10-07 19:30:00 +02:00
parent c9909a45ab
commit e4a8831bf1
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48

View file

@ -37,8 +37,8 @@
#include <screenshooter-client-protocol.h> #include <screenshooter-client-protocol.h>
#include "../backend/wayland/os-compatibility.c" #include "../backend/wayland/os-compatibility.c"
static struct wl_shm *shm; static struct wl_shm *shm = NULL;
static struct orbital_screenshooter *screenshooter; static struct orbital_screenshooter *screenshooter = NULL;
static struct wl_list output_list; static struct wl_list output_list;
int min_x, min_y, max_x, max_y; int min_x, min_y, max_x, max_y;
int buffer_copy_done; int buffer_copy_done;
@ -51,7 +51,7 @@ struct screenshooter_output {
struct wl_list link; struct wl_list link;
}; };
static void display_handle_geometry(void *data, struct wl_output *wl_output, static void output_handle_geometry(void *data, struct wl_output *wl_output,
int x, int y, int physical_width, int physical_height, int subpixel, int x, int y, int physical_width, int physical_height, int subpixel,
const char *make, const char *model, int transform) { const char *make, const char *model, int transform) {
struct screenshooter_output *output = wl_output_get_user_data(wl_output); struct screenshooter_output *output = wl_output_get_user_data(wl_output);
@ -62,7 +62,7 @@ static void display_handle_geometry(void *data, struct wl_output *wl_output,
} }
} }
static void display_handle_mode(void *data, struct wl_output *wl_output, static void output_handle_mode(void *data, struct wl_output *wl_output,
uint32_t flags, int width, int height, int refresh) { uint32_t flags, int width, int height, int refresh) {
struct screenshooter_output *output = wl_output_get_user_data(wl_output); struct screenshooter_output *output = wl_output_get_user_data(wl_output);
@ -72,9 +72,14 @@ static void display_handle_mode(void *data, struct wl_output *wl_output,
} }
} }
static void output_handle_done(void *data, struct wl_output *wl_output) {
}
static const struct wl_output_listener output_listener = { static const struct wl_output_listener output_listener = {
display_handle_geometry, .geometry = output_handle_geometry,
display_handle_mode .mode = output_handle_mode,
.done = output_handle_done,
}; };
static void screenshot_done(void *data, struct orbital_screenshot *screenshot) { static void screenshot_done(void *data, struct orbital_screenshot *screenshot) {
@ -82,7 +87,7 @@ static void screenshot_done(void *data, struct orbital_screenshot *screenshot) {
} }
static const struct orbital_screenshot_listener screenshot_listener = { static const struct orbital_screenshot_listener screenshot_listener = {
screenshot_done .done = screenshot_done,
}; };
static void handle_global(void *data, struct wl_registry *registry, static void handle_global(void *data, struct wl_registry *registry,
@ -109,8 +114,8 @@ static void handle_global_remove(void *data, struct wl_registry *registry,
} }
static const struct wl_registry_listener registry_listener = { static const struct wl_registry_listener registry_listener = {
handle_global, .global = handle_global,
handle_global_remove .global_remove = handle_global_remove,
}; };
static struct wl_buffer *create_shm_buffer(int width, int height, static struct wl_buffer *create_shm_buffer(int width, int height,