mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 08:45:58 +01:00
parent
bcba3951f4
commit
c32b2331d1
1 changed files with 4 additions and 2 deletions
|
@ -92,9 +92,10 @@ void CConstraint::deactivate() {
|
||||||
if (!m_bActive)
|
if (!m_bActive)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wlr_pointer_constraint_v1_send_deactivated(m_pConstraint);
|
|
||||||
m_bActive = false;
|
m_bActive = false;
|
||||||
|
|
||||||
|
wlr_pointer_constraint_v1_send_deactivated(m_pConstraint);
|
||||||
|
|
||||||
if (isLocked())
|
if (isLocked())
|
||||||
g_pCompositor->warpCursorTo(logicPositionHint(), true);
|
g_pCompositor->warpCursorTo(logicPositionHint(), true);
|
||||||
|
|
||||||
|
@ -106,6 +107,8 @@ void CConstraint::activate() {
|
||||||
if (m_bActive || m_bDead)
|
if (m_bActive || m_bDead)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
m_bActive = true;
|
||||||
|
|
||||||
// TODO: hack, probably not a super duper great idea
|
// TODO: hack, probably not a super duper great idea
|
||||||
if (g_pCompositor->m_sSeat.seat->pointer_state.focused_surface != m_pOwner->wlr()) {
|
if (g_pCompositor->m_sSeat.seat->pointer_state.focused_surface != m_pOwner->wlr()) {
|
||||||
const auto SURFBOX = m_pOwner->getSurfaceBoxGlobal();
|
const auto SURFBOX = m_pOwner->getSurfaceBoxGlobal();
|
||||||
|
@ -115,7 +118,6 @@ void CConstraint::activate() {
|
||||||
|
|
||||||
g_pCompositor->warpCursorTo(logicPositionHint(), true);
|
g_pCompositor->warpCursorTo(logicPositionHint(), true);
|
||||||
wlr_pointer_constraint_v1_send_activated(m_pConstraint);
|
wlr_pointer_constraint_v1_send_activated(m_pConstraint);
|
||||||
m_bActive = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CConstraint::active() {
|
bool CConstraint::active() {
|
||||||
|
|
Loading…
Reference in a new issue