Add a toy-display object that caches state.
This will be GdkDisplay for GTK+ on Wayland etc. This restores
the terminal fullscreen mode.
diff --git a/window.h b/window.h
index 9ec34f0..a8f5853 100644
--- a/window.h
+++ b/window.h
@@ -32,6 +32,13 @@
int32_t height;
};
+struct display;
+
+struct display *
+display_create(struct wl_display *display, int fd);
+struct wl_compositor *
+display_get_compositor(struct display *display);
+
typedef void (*window_resize_handler_t)(struct window *window, void *data);
typedef void (*window_frame_handler_t)(struct window *window, uint32_t frame, uint32_t timestamp, void *data);
typedef void (*window_acknowledge_handler_t)(struct window *window, uint32_t key, void *data);
@@ -39,8 +46,7 @@
struct window *
-window_create(struct wl_display *display, int fd,
- const char *title,
+window_create(struct display *display, const char *title,
int32_t x, int32_t y, int32_t width, int32_t height);
void