XWayland floating
This commit is contained in:
parent
5d0919fcff
commit
332fa8a802
11 changed files with 69 additions and 6 deletions
|
|
@ -303,4 +303,12 @@ void CHyprDwindleLayout::onMouseMove(const Vector2D& mousePos) {
|
|||
|
||||
if (PMONITOR)
|
||||
DRAGGINGWINDOW->m_iMonitorID = PMONITOR->ID;
|
||||
}
|
||||
|
||||
void CHyprDwindleLayout::onWindowCreatedFloating(CWindow* pWindow) {
|
||||
const auto PWINDOWSURFACE = g_pXWaylandManager->getWindowSurface(pWindow);
|
||||
const auto PMONITOR = g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID);
|
||||
|
||||
pWindow->m_vRealSize = Vector2D(PWINDOWSURFACE->current.width, PWINDOWSURFACE->current.height);
|
||||
pWindow->m_vRealPosition = Vector2D(PMONITOR->vecPosition.x + (PMONITOR->vecSize.x - pWindow->m_vRealSize.x) / 2.f, PMONITOR->vecPosition.y + (PMONITOR->vecSize.y - pWindow->m_vRealSize.y) / 2.f);
|
||||
}
|
||||
|
|
@ -35,6 +35,7 @@ public:
|
|||
virtual void changeWindowFloatingMode(CWindow*);
|
||||
virtual void onBeginDragWindow();
|
||||
virtual void onMouseMove(const Vector2D&);
|
||||
virtual void onWindowCreatedFloating(CWindow*);
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
|||
|
|
@ -14,5 +14,6 @@ public:
|
|||
virtual void changeWindowFloatingMode(CWindow*) = 0;
|
||||
virtual void onBeginDragWindow() = 0;
|
||||
virtual void onMouseMove(const Vector2D&) = 0;
|
||||
virtual void onWindowCreatedFloating(CWindow*) = 0;
|
||||
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue