From 16bbbcba65c4700b286f9c45d91bb49f2dd3e67c Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 31 Aug 2024 14:02:08 +0200 Subject: [PATCH] wayland: send 1280x720 if w/h is 0 in configure --- src/backend/Wayland.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/backend/Wayland.cpp b/src/backend/Wayland.cpp index fe2a11b..863e2f2 100644 --- a/src/backend/Wayland.cpp +++ b/src/backend/Wayland.cpp @@ -473,6 +473,11 @@ Aquamarine::CWaylandOutput::CWaylandOutput(const std::string& name_, Hyprutils:: waylandState.xdgToplevel->setConfigure([this](CCXdgToplevel* r, int32_t w, int32_t h, wl_array* arr) { backend->backend->log(AQ_LOG_DEBUG, std::format("Output {}: configure toplevel with {}x{}", name, w, h)); + if (w == 0 || h == 0) { + backend->backend->log(AQ_LOG_DEBUG, std::format("Output {}: w/h is 0, sending default hardcoded 1280x720", name)); + w = 1280; + h = 720; + } events.state.emit(SStateEvent{.size = {w, h}}); sendFrameAndSetCallback(); });