Skip to content

Commit 618a8c4

Browse files
committed
fix(lockscreen): remove incorrect coordinate transform for rotated outputs
1 parent 1c7d339 commit 618a8c4

2 files changed

Lines changed: 0 additions & 32 deletions

File tree

src/shell/lockscreen/lock_surface.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -486,22 +486,6 @@ void LockSurface::layoutScene(std::uint32_t width, std::uint32_t height) {
486486
loginBox != nullptr) {
487487
float cx = loginBox->cx;
488488
float cy = loginBox->cy;
489-
const WaylandOutput* output = m_connection.findOutputByWl(m_output);
490-
if (output != nullptr) {
491-
float curW = sw;
492-
float curH = sh;
493-
bool isRotated90or270 =
494-
(output->transform == WL_OUTPUT_TRANSFORM_90
495-
|| output->transform == WL_OUTPUT_TRANSFORM_270
496-
|| output->transform == WL_OUTPUT_TRANSFORM_FLIPPED_90
497-
|| output->transform == WL_OUTPUT_TRANSFORM_FLIPPED_270);
498-
float refW = isRotated90or270 ? curH : curW;
499-
float refH = isRotated90or270 ? curW : curH;
500-
if (refW > 0.0f && refH > 0.0f) {
501-
cx = cx * (curW / refW);
502-
cy = cy * (curH / refH);
503-
}
504-
}
505489
lockscreen_login_box::panelOriginFromCenter(
506490
cx, cy, sw, loginBox->boxWidth, loginBox->boxHeight, panelX, panelY, panelWidth, panelHeight
507491
);

src/shell/lockscreen/lockscreen_widgets_host.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -373,22 +373,6 @@ void LockscreenWidgetsHost::prepareFrame(LockSurface& surface, bool needsUpdate,
373373
if (const DesktopWidgetState* origState = findStateById(m_snapshot, instance->state.id); origState != nullptr) {
374374
currentState = *origState;
375375
}
376-
if (const WaylandOutput* output = desktop_widgets::resolveStateOutput(*m_wayland, currentState);
377-
output != nullptr) {
378-
float curW = surfaceW;
379-
float curH = surfaceH;
380-
bool isRotated90or270 =
381-
(output->transform == WL_OUTPUT_TRANSFORM_90
382-
|| output->transform == WL_OUTPUT_TRANSFORM_270
383-
|| output->transform == WL_OUTPUT_TRANSFORM_FLIPPED_90
384-
|| output->transform == WL_OUTPUT_TRANSFORM_FLIPPED_270);
385-
float refW = isRotated90or270 ? curH : curW;
386-
float refH = isRotated90or270 ? curW : curH;
387-
if (refW > 0.0f && refH > 0.0f) {
388-
currentState.cx = currentState.cx * (curW / refW);
389-
currentState.cy = currentState.cy * (curH / refH);
390-
}
391-
}
392376
desktop_widgets::clampStateToOutput(
393377
*m_wayland, currentState, instance->intrinsicWidth, instance->intrinsicHeight
394378
);

0 commit comments

Comments
 (0)