mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-05 14:42:01 -07:00
handle layer popups
This commit is contained in:
@@ -310,4 +310,18 @@ bool CCompositor::windowValidMapped(CWindow* pWindow) {
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
SLayerSurface* CCompositor::getLayerForPopup(SLayerPopup* pPopup) {
|
||||
auto CurrentPopup = pPopup;
|
||||
while (CurrentPopup->parentPopup != nullptr) {
|
||||
for (auto& p : g_pCompositor->m_lLayerPopups) {
|
||||
if (p.popup == CurrentPopup->parentPopup) {
|
||||
CurrentPopup = &p;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return CurrentPopup->parentSurface;
|
||||
}
|
Reference in New Issue
Block a user