mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 00:40:09 +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_WIDTH 640
|
||||||
#define DEFAULT_WINDOWED_HEIGHT 480
|
#define DEFAULT_WINDOWED_HEIGHT 480
|
||||||
|
|
||||||
/* Icon is 16x15 scaled by 16 */
|
|
||||||
#define SPLASH_WINDOW_WIDTH 240
|
|
||||||
#define SPLASH_WINDOW_HEIGHT 256
|
|
||||||
|
|
||||||
#ifndef MFD_CLOEXEC
|
#ifndef MFD_CLOEXEC
|
||||||
#define MFD_CLOEXEC 0x0001U
|
#define MFD_CLOEXEC 0x0001U
|
||||||
#endif
|
#endif
|
||||||
|
@ -21,6 +21,10 @@
|
|||||||
|
|
||||||
#include "../../input/common/wayland_common.h"
|
#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
|
typedef struct toplevel_listener
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LIBDECOR_H
|
#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)
|
int32_t width, int32_t height, struct wl_array *states)
|
||||||
{
|
{
|
||||||
gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data;
|
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;
|
return;
|
||||||
xdg_toplevel_handle_configure_common(wl, toplevel, width, height, states);
|
xdg_toplevel_handle_configure_common(wl, toplevel, width, height, states);
|
||||||
#ifdef HAVE_EGL
|
#ifdef HAVE_EGL
|
||||||
@ -124,12 +126,17 @@ static bool gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LIBDECOR_H
|
#ifdef HAVE_LIBDECOR_H
|
||||||
|
#include <libdecor.h>
|
||||||
static void
|
static void
|
||||||
libdecor_frame_handle_configure(struct libdecor_frame *frame,
|
libdecor_frame_handle_configure(struct libdecor_frame *frame,
|
||||||
struct libdecor_configuration *configuration, void *data)
|
struct libdecor_configuration *configuration, void *data)
|
||||||
{
|
{
|
||||||
gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)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;
|
return;
|
||||||
libdecor_frame_handle_configure_common(frame, configuration, wl);
|
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)
|
int32_t width, int32_t height, struct wl_array *states)
|
||||||
{
|
{
|
||||||
gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data;
|
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;
|
return;
|
||||||
xdg_toplevel_handle_configure_common(wl, toplevel, width, height, states);
|
xdg_toplevel_handle_configure_common(wl, toplevel, width, height, states);
|
||||||
wl->configured = false;
|
wl->configured = false;
|
||||||
@ -109,12 +111,17 @@ static bool gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LIBDECOR_H
|
#ifdef HAVE_LIBDECOR_H
|
||||||
|
#include <libdecor.h>
|
||||||
static void
|
static void
|
||||||
libdecor_frame_handle_configure(struct libdecor_frame *frame,
|
libdecor_frame_handle_configure(struct libdecor_frame *frame,
|
||||||
struct libdecor_configuration *configuration, void *data)
|
struct libdecor_configuration *configuration, void *data)
|
||||||
{
|
{
|
||||||
gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)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;
|
return;
|
||||||
libdecor_frame_handle_configure_common(frame, configuration, wl);
|
libdecor_frame_handle_configure_common(frame, configuration, wl);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user