mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-10 20:05:59 +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) {
|
||||
const auto POSA = m_pLastMonitor->vecPosition;
|
||||
const auto SIZEA = m_pLastMonitor->vecSize;
|
||||
return this->getMonitorInDirection(m_pLastMonitor, dir);
|
||||
}
|
||||
|
||||
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;
|
||||
CMonitor* longestIntersectMonitor = nullptr;
|
||||
|
|
|
@ -171,6 +171,7 @@ class CCompositor {
|
|||
bool isPointOnReservedArea(const Vector2D& point, const CMonitor* monitor = nullptr);
|
||||
CWindow* getConstraintWindow(SMouse*);
|
||||
CMonitor* getMonitorInDirection(const char&);
|
||||
CMonitor* getMonitorInDirection(CMonitor*, const char&);
|
||||
void updateAllWindowsAnimatedDecorationValues();
|
||||
void updateWorkspaceWindows(const int64_t& id);
|
||||
void updateWindowAnimatedDecorationValues(CWindow*);
|
||||
|
|
Loading…
Reference in a new issue