mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 21:25:58 +01:00
compositor: allow source monitor to be provided to getMonitorInDirection
(#4837)
Co-authored-by: github-user-name <spam-here@github.com>
This commit is contained in:
parent
f534ac3fc4
commit
f9cfec8abb
2 changed files with 9 additions and 2 deletions
|
@ -1802,8 +1802,14 @@ CWindow* CCompositor::getConstraintWindow(SMouse* pMouse) {
|
||||||
}
|
}
|
||||||
|
|
||||||
CMonitor* CCompositor::getMonitorInDirection(const char& dir) {
|
CMonitor* CCompositor::getMonitorInDirection(const char& dir) {
|
||||||
const auto POSA = m_pLastMonitor->vecPosition;
|
return this->getMonitorInDirection(m_pLastMonitor, dir);
|
||||||
const auto SIZEA = m_pLastMonitor->vecSize;
|
}
|
||||||
|
|
||||||
|
CMonitor* CCompositor::getMonitorInDirection(CMonitor* pSourceMonitor, const char& dir) {
|
||||||
|
if(!pSourceMonitor) return nullptr;
|
||||||
|
|
||||||
|
const auto POSA = pSourceMonitor->vecPosition;
|
||||||
|
const auto SIZEA = pSourceMonitor->vecSize;
|
||||||
|
|
||||||
auto longestIntersect = -1;
|
auto longestIntersect = -1;
|
||||||
CMonitor* longestIntersectMonitor = nullptr;
|
CMonitor* longestIntersectMonitor = nullptr;
|
||||||
|
|
|
@ -171,6 +171,7 @@ class CCompositor {
|
||||||
bool isPointOnReservedArea(const Vector2D& point, const CMonitor* monitor = nullptr);
|
bool isPointOnReservedArea(const Vector2D& point, const CMonitor* monitor = nullptr);
|
||||||
CWindow* getConstraintWindow(SMouse*);
|
CWindow* getConstraintWindow(SMouse*);
|
||||||
CMonitor* getMonitorInDirection(const char&);
|
CMonitor* getMonitorInDirection(const char&);
|
||||||
|
CMonitor* getMonitorInDirection(CMonitor*, const char&);
|
||||||
void updateAllWindowsAnimatedDecorationValues();
|
void updateAllWindowsAnimatedDecorationValues();
|
||||||
void updateWorkspaceWindows(const int64_t& id);
|
void updateWorkspaceWindows(const int64_t& id);
|
||||||
void updateWindowAnimatedDecorationValues(CWindow*);
|
void updateWindowAnimatedDecorationValues(CWindow*);
|
||||||
|
|
Loading…
Reference in a new issue