Skip to content
Merged
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
14 changes: 10 additions & 4 deletions src/core/LockSurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ void CSessionLockSurface::configure(const Vector2D& size_, uint32_t serial_) {
logicalSize = size_;
appliedScale = fractionalScale;

if (!SAMESERIAL)
lockSurface->sendAckConfigure(serial);

if (size_.x <= 0 || size_.y <= 0) {
Log::logger->log(Log::WARN, "output {} configure with zero size, waiting for valid configure", m_outputID);
readyForFrame = false;
return;
}

if (fractional) {
size = (size_ * fractionalScale).floor();
viewport->sendSetDestination(logicalSize.x, logicalSize.y);
Expand All @@ -75,9 +84,6 @@ void CSessionLockSurface::configure(const Vector2D& size_, uint32_t serial_) {
surface->sendSetBufferScale(POUTPUT->scale);
}

if (!SAMESERIAL)
lockSurface->sendAckConfigure(serial);

Log::logger->log(Log::INFO, "Configuring surface for logical {} and pixel {}", logicalSize, size);

surface->sendDamageBuffer(0, 0, 0xFFFF, 0xFFFF);
Expand All @@ -92,7 +98,7 @@ void CSessionLockSurface::configure(const Vector2D& size_, uint32_t serial_) {
eglWindow = wl_egl_window_create((wl_surface*)surface->resource(), size.x, size.y);
if (!eglWindow) {
// Only fails when unable to allocate the wl_egl_window structure or size x or y is <= 0.
Log::logger->log(Log::CRIT, "Failed to create wayland egl window");
Log::logger->log(Log::WARN, "Failed to create wayland egl window (size {}x{}), waiting for valid configure", size.x, size.y);
readyForFrame = false;
return;
}
Expand Down
5 changes: 0 additions & 5 deletions src/core/Output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ void COutput::createSessionLockSurface() {
return;
}

if (size == Vector2D{0, 0}) {
Log::logger->log(Log::WARN, "output {} refusing to create a lock surface with size 0x0", m_ID);
return;
}

m_sessionLockSurface = makeUnique<CSessionLockSurface>(m_self.lock());
}

Expand Down
Loading