mirror of
https://github.com/hyprwm/hyprlock.git
synced 2025-12-20 08:50:03 +01:00
fix hovering/clicking error when monitor is scaled
This commit is contained in:
parent
a6f1590540
commit
83b24434d7
1 changed files with 2 additions and 2 deletions
|
|
@ -728,7 +728,7 @@ void CHyprlock::onClick(uint32_t button, bool down, const Vector2D& pos) {
|
||||||
const auto widgets = g_pRenderer->getOrCreateWidgetsFor(*m_focusedOutput->m_sessionLockSurface);
|
const auto widgets = g_pRenderer->getOrCreateWidgetsFor(*m_focusedOutput->m_sessionLockSurface);
|
||||||
for (const auto& widget : widgets) {
|
for (const auto& widget : widgets) {
|
||||||
if (widget->containsPoint(SCALEDPOS))
|
if (widget->containsPoint(SCALEDPOS))
|
||||||
widget->onClick(button, down, pos);
|
widget->onClick(button, down, SCALEDPOS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -751,7 +751,7 @@ void CHyprlock::onHover(const Vector2D& pos) {
|
||||||
if (CONTAINSPOINT) {
|
if (CONTAINSPOINT) {
|
||||||
if (SHOULDHOVER) {
|
if (SHOULDHOVER) {
|
||||||
widget->setHover(true);
|
widget->setHover(true);
|
||||||
widget->onHover(pos);
|
widget->onHover(SCALEDPOS);
|
||||||
outputNeedsRedraw = true;
|
outputNeedsRedraw = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue