mirror of
https://github.com/libretro/RetroArch
synced 2025-02-16 03:40:12 +00:00
wayland: Ignore splash sized events during splash (#16412)
This commit is contained in:
parent
9749940c67
commit
0212d8e770
@ -44,10 +44,6 @@
|
||||
#define DEFAULT_WINDOWED_WIDTH 640
|
||||
#define DEFAULT_WINDOWED_HEIGHT 480
|
||||
|
||||
/* Icon is 16x15 scaled by 16 */
|
||||
#define SPLASH_WINDOW_WIDTH 240
|
||||
#define SPLASH_WINDOW_HEIGHT 256
|
||||
|
||||
#ifndef MFD_CLOEXEC
|
||||
#define MFD_CLOEXEC 0x0001U
|
||||
#endif
|
||||
|
@ -21,6 +21,10 @@
|
||||
|
||||
#include "../../input/common/wayland_common.h"
|
||||
|
||||
/* Icon is 16x15 scaled by 16 */
|
||||
#define SPLASH_WINDOW_WIDTH 240
|
||||
#define SPLASH_WINDOW_HEIGHT 256
|
||||
|
||||
typedef struct toplevel_listener
|
||||
{
|
||||
#ifdef HAVE_LIBDECOR_H
|
||||
|
@ -63,7 +63,9 @@ static void xdg_toplevel_handle_configure(void *data,
|
||||
int32_t width, int32_t height, struct wl_array *states)
|
||||
{
|
||||
gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data;
|
||||
if (wl->ignore_configuration)
|
||||
if (wl->ignore_configuration &&
|
||||
width == SPLASH_WINDOW_WIDTH &&
|
||||
height == SPLASH_WINDOW_HEIGHT)
|
||||
return;
|
||||
xdg_toplevel_handle_configure_common(wl, toplevel, width, height, states);
|
||||
#ifdef HAVE_EGL
|
||||
@ -124,12 +126,17 @@ static bool gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height)
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBDECOR_H
|
||||
#include <libdecor.h>
|
||||
static void
|
||||
libdecor_frame_handle_configure(struct libdecor_frame *frame,
|
||||
struct libdecor_configuration *configuration, void *data)
|
||||
{
|
||||
gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data;
|
||||
if (wl->ignore_configuration)
|
||||
int width, height;
|
||||
if (wl->ignore_configuration &&
|
||||
wl->libdecor_configuration_get_content_size(configuration, frame, &width, &height) &&
|
||||
width == SPLASH_WINDOW_WIDTH &&
|
||||
height == SPLASH_WINDOW_HEIGHT)
|
||||
return;
|
||||
libdecor_frame_handle_configure_common(frame, configuration, wl);
|
||||
|
||||
|
@ -55,7 +55,9 @@ static void xdg_toplevel_handle_configure(void *data,
|
||||
int32_t width, int32_t height, struct wl_array *states)
|
||||
{
|
||||
gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data;
|
||||
if (wl->ignore_configuration)
|
||||
if (wl->ignore_configuration &&
|
||||
width == SPLASH_WINDOW_WIDTH &&
|
||||
height == SPLASH_WINDOW_HEIGHT)
|
||||
return;
|
||||
xdg_toplevel_handle_configure_common(wl, toplevel, width, height, states);
|
||||
wl->configured = false;
|
||||
@ -109,12 +111,17 @@ static bool gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height)
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBDECOR_H
|
||||
#include <libdecor.h>
|
||||
static void
|
||||
libdecor_frame_handle_configure(struct libdecor_frame *frame,
|
||||
struct libdecor_configuration *configuration, void *data)
|
||||
{
|
||||
gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data;
|
||||
if (wl->ignore_configuration)
|
||||
int width, height;
|
||||
if (wl->ignore_configuration &&
|
||||
wl->libdecor_configuration_get_content_size(configuration, frame, &width, &height) &&
|
||||
width == SPLASH_WINDOW_WIDTH &&
|
||||
height == SPLASH_WINDOW_HEIGHT)
|
||||
return;
|
||||
libdecor_frame_handle_configure_common(frame, configuration, wl);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user