early-access version 2847

This commit is contained in:
pineappleEA
2022-07-19 05:48:31 +02:00
parent ba74a2373c
commit 05e3c38e7f
498 changed files with 16027 additions and 27028 deletions

View File

@@ -32,61 +32,44 @@
struct SDL_WaylandInput;
/* TODO: Remove these helpers, they're from before we had shell_surface_type */
#define WINDOW_IS_XDG_POPUP(window) \
(((SDL_WindowData*) window->driverdata)->shell_surface_type == WAYLAND_SURFACE_XDG_POPUP)
#define WINDOW_IS_LIBDECOR(ignoreme, window) \
(((SDL_WindowData*) window->driverdata)->shell_surface_type == WAYLAND_SURFACE_LIBDECOR)
typedef struct {
struct xdg_surface *surface;
union {
struct xdg_toplevel *toplevel;
struct xdg_popup *popup;
} roleobj;
SDL_bool initial_configure_seen;
} SDL_xdg_shell_surface;
#ifdef HAVE_LIBDECOR_H
typedef struct {
struct libdecor_frame *frame;
SDL_bool initial_configure_seen;
} SDL_libdecor_surface;
#endif
typedef struct {
SDL_Window *sdlwindow;
SDL_VideoData *waylandData;
struct wl_surface *surface;
struct wl_callback *gles_swap_frame_callback;
struct wl_event_queue *gles_swap_frame_event_queue;
struct wl_surface *gles_swap_frame_surface_wrapper;
struct wl_callback *surface_damage_frame_callback;
struct wl_callback *frame_callback;
struct wl_event_queue *frame_event_queue;
struct wl_surface *frame_surface_wrapper;
union {
#ifdef HAVE_LIBDECOR_H
struct {
struct libdecor_frame *frame;
SDL_bool initial_configure_seen;
} libdecor;
SDL_libdecor_surface libdecor;
#endif
struct {
struct xdg_surface *surface;
union {
struct xdg_toplevel *toplevel;
struct {
struct xdg_popup *popup;
struct xdg_positioner *positioner;
Uint32 parentID;
SDL_Window *child;
} popup;
} roleobj;
SDL_bool initial_configure_seen;
} xdg;
SDL_xdg_shell_surface xdg;
} shell_surface;
enum {
WAYLAND_SURFACE_UNKNOWN = 0,
WAYLAND_SURFACE_XDG_TOPLEVEL,
WAYLAND_SURFACE_XDG_POPUP,
WAYLAND_SURFACE_LIBDECOR
} shell_surface_type;
struct wl_egl_window *egl_window;
struct SDL_WaylandInput *keyboard_device;
#if SDL_VIDEO_OPENGL_EGL
EGLSurface egl_surface;
#endif
struct zwp_locked_pointer_v1 *locked_pointer;
struct zwp_confined_pointer_v1 *confined_pointer;
struct zxdg_toplevel_decoration_v1 *server_decoration;
struct zwp_keyboard_shortcuts_inhibitor_v1 *key_inhibitor;
struct zwp_idle_inhibitor_v1 *idle_inhibitor;
struct xdg_activation_token_v1 *activation_token;
struct wp_viewport *draw_viewport;
/* floating dimensions for restoring from maximized and fullscreen */
int floating_width, floating_height;
@@ -101,12 +84,6 @@ typedef struct {
int num_outputs;
float scale_factor;
float pointer_scale_x;
float pointer_scale_y;
int drawable_width, drawable_height;
SDL_Rect viewport_rect;
SDL_bool needs_resize_event;
SDL_bool floating_resize_pending;
} SDL_WindowData;
extern void Wayland_ShowWindow(_THIS, SDL_Window *window);