mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-22 20:09:49 +01:00
parent
0ee69058c4
commit
a4c1f4a03d
2 changed files with 11 additions and 0 deletions
|
@ -116,6 +116,7 @@ void CPopup::onMap() {
|
|||
m_pSubsurfaceHead = std::make_unique<CSubsurface>(this);
|
||||
|
||||
unconstrain();
|
||||
sendScale();
|
||||
}
|
||||
|
||||
void CPopup::onUnmap() {
|
||||
|
@ -234,3 +235,12 @@ void CPopup::recheckChildrenRecursive() {
|
|||
Vector2D CPopup::size() {
|
||||
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 unconstrain();
|
||||
void recheckChildrenRecursive();
|
||||
void sendScale();
|
||||
|
||||
Vector2D localToGlobal(const Vector2D& rel);
|
||||
Vector2D t1ParentCoords();
|
||||
|
|
Loading…
Reference in a new issue