mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-16 12:33:48 -07:00
@@ -116,6 +116,7 @@ void CPopup::onMap() {
|
|||||||
m_pSubsurfaceHead = std::make_unique<CSubsurface>(this);
|
m_pSubsurfaceHead = std::make_unique<CSubsurface>(this);
|
||||||
|
|
||||||
unconstrain();
|
unconstrain();
|
||||||
|
sendScale();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPopup::onUnmap() {
|
void CPopup::onUnmap() {
|
||||||
@@ -234,3 +235,12 @@ void CPopup::recheckChildrenRecursive() {
|
|||||||
Vector2D CPopup::size() {
|
Vector2D CPopup::size() {
|
||||||
return m_vLastSize;
|
return m_vLastSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CPopup::sendScale() {
|
||||||
|
if (m_pWindowOwner)
|
||||||
|
g_pCompositor->setPreferredScaleForSurface(m_sWLSurface.wlr(), m_pWindowOwner->m_pWLSurface.m_fLastScale);
|
||||||
|
else if (m_pLayerOwner)
|
||||||
|
g_pCompositor->setPreferredScaleForSurface(m_sWLSurface.wlr(), m_pLayerOwner->surface.m_fLastScale);
|
||||||
|
else
|
||||||
|
UNREACHABLE();
|
||||||
|
}
|
||||||
|
@@ -65,6 +65,7 @@ class CPopup {
|
|||||||
void initAllSignals();
|
void initAllSignals();
|
||||||
void unconstrain();
|
void unconstrain();
|
||||||
void recheckChildrenRecursive();
|
void recheckChildrenRecursive();
|
||||||
|
void sendScale();
|
||||||
|
|
||||||
Vector2D localToGlobal(const Vector2D& rel);
|
Vector2D localToGlobal(const Vector2D& rel);
|
||||||
Vector2D t1ParentCoords();
|
Vector2D t1ParentCoords();
|
||||||
|
Reference in New Issue
Block a user