Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wayland: Remove hack ignoring configure events #17317

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions gfx/common/wayland_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,9 +880,6 @@ bool gfx_ctx_wl_init_common(
}
}

// Ignore configure events until splash screen has been replaced
wl->ignore_configuration = true;

wl->input.fd = wl_display_get_fd(wl->input.dpy);

wl->input.keyboard_focus = true;
Expand Down Expand Up @@ -946,6 +943,8 @@ bool gfx_ctx_wl_set_video_mode_common_size(gfx_ctx_wayland_data_t *wl,
}
#endif

wl_surface_commit(wl->surface);

return true;
}

Expand Down
5 changes: 0 additions & 5 deletions gfx/drivers_context/wayland_ctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ 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)
return;
xdg_toplevel_handle_configure_common(wl, toplevel, width, height, states);
#ifdef HAVE_EGL
if (wl->win)
Expand Down Expand Up @@ -106,7 +104,6 @@ static bool gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height)
if (!wl->fractional_scale)
wl_surface_set_buffer_scale(wl->surface, wl->buffer_scale);

wl->ignore_configuration = false;
#ifdef HAVE_EGL
wl_egl_window_resize(wl->win, width, height, 0, 0);
#endif
Expand All @@ -120,8 +117,6 @@ 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)
return;
libdecor_frame_handle_configure_common(frame, configuration, wl);

#ifdef HAVE_EGL
Expand Down
5 changes: 0 additions & 5 deletions gfx/drivers_context/wayland_vk_ctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ 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)
return;
xdg_toplevel_handle_configure_common(wl, toplevel, width, height, states);
wl->configured = false;
}
Expand Down Expand Up @@ -85,7 +83,6 @@ static bool gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height)

if (vulkan_create_swapchain(&wl->vk, width, height, wl->swap_interval))
{
wl->ignore_configuration = false;
wl->vk.context.flags |= VK_CTX_FLAG_INVALID_SWAPCHAIN;
if (wl->vk.flags & VK_DATA_FLAG_CREATED_NEW_SWAPCHAIN)
vulkan_acquire_next_image(&wl->vk);
Expand All @@ -105,8 +102,6 @@ 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)
return;
libdecor_frame_handle_configure_common(frame, configuration, wl);

wl->configured = false;
Expand Down
1 change: 0 additions & 1 deletion input/common/wayland_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ typedef struct gfx_ctx_wayland_data
bool maximized;
bool resize;
bool configured;
bool ignore_configuration;
bool activated;
bool reported_display_size;
bool swap_complete;
Expand Down
Loading