mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 13:05:58 +01:00
compositor: drop unused vectorToWindow func
This commit is contained in:
parent
1d9bfa60a1
commit
84bc0a73f6
2 changed files with 0 additions and 41 deletions
|
@ -630,46 +630,6 @@ bool CCompositor::windowExists(CWindow* pWindow) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
CWindow* CCompositor::vectorToWindow(const Vector2D& pos) {
|
|
||||||
const auto PMONITOR = getMonitorFromVector(pos);
|
|
||||||
|
|
||||||
if (PMONITOR->specialWorkspaceID) {
|
|
||||||
for (auto& w : m_vWindows | std::views::reverse) {
|
|
||||||
auto box = w->getWindowMainSurfaceBox();
|
|
||||||
if (w->m_bIsFloating && w->m_iWorkspaceID == PMONITOR->specialWorkspaceID && w->m_bIsMapped && box.containsPoint(pos) && !w->isHidden() && !w->m_bNoFocus)
|
|
||||||
return w.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
for (auto& w : m_vWindows) {
|
|
||||||
auto box = w->getWindowMainSurfaceBox();
|
|
||||||
if (w->m_iWorkspaceID == PMONITOR->specialWorkspaceID && box.containsPoint(pos) && w->m_bIsMapped && !w->m_bIsFloating && !w->isHidden() && !w->m_bNoFocus)
|
|
||||||
return w.get();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// pinned
|
|
||||||
for (auto& w : m_vWindows | std::views::reverse) {
|
|
||||||
auto box = w->getWindowMainSurfaceBox();
|
|
||||||
if (box.containsPoint(pos) && w->m_bIsMapped && w->m_bIsFloating && !w->isHidden() && w->m_bPinned && !w->m_bNoFocus)
|
|
||||||
return w.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
// first loop over floating cuz they're above, m_vWindows should be sorted bottom->top, for tiled it doesn't matter.
|
|
||||||
for (auto& w : m_vWindows | std::views::reverse) {
|
|
||||||
auto box = w->getWindowMainSurfaceBox();
|
|
||||||
if (box.containsPoint(pos) && w->m_bIsMapped && w->m_bIsFloating && isWorkspaceVisible(w->m_iWorkspaceID) && !w->isHidden() && !w->m_bPinned && !w->m_bNoFocus)
|
|
||||||
return w.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
for (auto& w : m_vWindows) {
|
|
||||||
auto box = w->getWindowMainSurfaceBox();
|
|
||||||
if (box.containsPoint(pos) && w->m_bIsMapped && !w->m_bIsFloating && PMONITOR->activeWorkspace == w->m_iWorkspaceID && !w->isHidden() && !w->m_bNoFocus)
|
|
||||||
return w.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
CWindow* CCompositor::vectorToWindowTiled(const Vector2D& pos) {
|
CWindow* CCompositor::vectorToWindowTiled(const Vector2D& pos) {
|
||||||
const auto PMONITOR = getMonitorFromVector(pos);
|
const auto PMONITOR = getMonitorFromVector(pos);
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,6 @@ class CCompositor {
|
||||||
void focusSurface(wlr_surface*, CWindow* pWindowOwner = nullptr);
|
void focusSurface(wlr_surface*, CWindow* pWindowOwner = nullptr);
|
||||||
bool windowExists(CWindow*);
|
bool windowExists(CWindow*);
|
||||||
bool windowValidMapped(CWindow*);
|
bool windowValidMapped(CWindow*);
|
||||||
CWindow* vectorToWindow(const Vector2D&);
|
|
||||||
CWindow* vectorToWindowIdeal(const Vector2D&); // used only for finding a window to focus on, basically a "findFocusableWindow"
|
CWindow* vectorToWindowIdeal(const Vector2D&); // used only for finding a window to focus on, basically a "findFocusableWindow"
|
||||||
CWindow* vectorToWindowTiled(const Vector2D&);
|
CWindow* vectorToWindowTiled(const Vector2D&);
|
||||||
wlr_surface* vectorToLayerSurface(const Vector2D&, std::vector<std::unique_ptr<SLayerSurface>>*, Vector2D*, SLayerSurface**);
|
wlr_surface* vectorToLayerSurface(const Vector2D&, std::vector<std::unique_ptr<SLayerSurface>>*, Vector2D*, SLayerSurface**);
|
||||||
|
|
Loading…
Reference in a new issue