Added toplevel handle sharing Rev2 (#1203)
Some checks failed
Build Hyprland / Build Hyprland (Arch) (push) Has been cancelled
Build Hyprland / Build Hyprland with Meson (Arch) (push) Has been cancelled
Build Hyprland / Build Hyprland in pure Wayland (Arch) (push) Has been cancelled
Build Hyprland (Nix) / Build Hyprland (Nix) (push) Has been cancelled
Build Hyprland (Nix) / Build Hyprland (Nix)-1 (push) Has been cancelled
Nix: update lockfile / update (push) Has been cancelled
Some checks failed
Build Hyprland / Build Hyprland (Arch) (push) Has been cancelled
Build Hyprland / Build Hyprland with Meson (Arch) (push) Has been cancelled
Build Hyprland / Build Hyprland in pure Wayland (Arch) (push) Has been cancelled
Build Hyprland (Nix) / Build Hyprland (Nix) (push) Has been cancelled
Build Hyprland (Nix) / Build Hyprland (Nix)-1 (push) Has been cancelled
Nix: update lockfile / update (push) Has been cancelled
* Added toplevel handle sharing * nix: fix build * update hyprland-protocols Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
This commit is contained in:
parent
b45a213413
commit
111d209bff
10 changed files with 331 additions and 22 deletions
|
|
@ -931,6 +931,23 @@ CWindow* CCompositor::getWindowFromHandle(uint32_t handle) {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
CWindow* CCompositor::getWindowFromZWLRHandle(wl_resource* handle) {
|
||||
for (auto& w : m_vWindows) {
|
||||
if (!w->m_bIsMapped || w->isHidden() || !w->m_phForeignToplevel)
|
||||
continue;
|
||||
|
||||
wl_resource* current;
|
||||
|
||||
wl_list_for_each(current, &w->m_phForeignToplevel->resources, link) {
|
||||
if (current == handle) {
|
||||
return w.get();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CWindow* CCompositor::getFullscreenWindowOnWorkspace(const int& ID) {
|
||||
for (auto& w : m_vWindows) {
|
||||
if (w->m_iWorkspaceID == ID && w->m_bIsFullscreen)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue