mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 00:29:49 +01:00
only check for visible on xdg
This commit is contained in:
parent
5a146e9d90
commit
a96acc8fa4
1 changed files with 12 additions and 9 deletions
|
@ -64,8 +64,10 @@ void IHyprLayout::onWindowCreatedFloating(CWindow* pWindow) {
|
|||
// check if it's on the correct monitor!
|
||||
Vector2D middlePoint = Vector2D(desiredGeometry.x, desiredGeometry.y) + Vector2D(desiredGeometry.width, desiredGeometry.height) / 2.f;
|
||||
|
||||
// check if it's visible on any monitor
|
||||
bool visible = false;
|
||||
// check if it's visible on any monitor (only for XDG)
|
||||
bool visible = pWindow->m_bIsX11;
|
||||
|
||||
if (!pWindow->m_bIsX11) {
|
||||
for (auto& m : g_pCompositor->m_vMonitors) {
|
||||
if (VECINRECT(Vector2D(desiredGeometry.x, desiredGeometry.y), m->vecPosition.x, m->vecPosition.y, m->vecPosition.x + m->vecSize.x, m->vecPosition.y + m->vecPosition.y)
|
||||
|| VECINRECT(Vector2D(desiredGeometry.x + desiredGeometry.width, desiredGeometry.y), m->vecPosition.x, m->vecPosition.y, m->vecPosition.x + m->vecSize.x, m->vecPosition.y + m->vecPosition.y)
|
||||
|
@ -76,6 +78,7 @@ void IHyprLayout::onWindowCreatedFloating(CWindow* pWindow) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: detect a popup in a more consistent way.
|
||||
if ((desiredGeometry.x == 0 && desiredGeometry.y == 0) || !visible) {
|
||||
|
|
Loading…
Reference in a new issue