minor changes

This commit is contained in:
vaxerski 2022-03-22 20:04:39 +01:00
parent aa64af95fe
commit 90bb8e6441
4 changed files with 7 additions and 9 deletions

View file

@ -51,6 +51,7 @@ void Events::listener_unmapWindow(wl_listener* listener, void* data) {
if (g_pXWaylandManager->getWindowSurface(PWINDOW) == g_pCompositor->m_pLastFocus)
g_pCompositor->m_pLastFocus = nullptr;
PWINDOW->m_bMappedX11 = false;
// remove the fullscreen window status from workspace if we closed it
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(PWINDOW->m_iWorkspaceID);

View file

@ -345,6 +345,9 @@ void CHyprDwindleLayout::onWindowCreatedFloating(CWindow* pWindow) {
pWindow->m_vRealPosition = Vector2D(desiredGeometry.x, desiredGeometry.y);
}
}
g_pXWaylandManager->setWindowSize(pWindow, pWindow->m_vRealSize);
g_pCompositor->fixXWaylandWindowsOnWorkspace(PMONITOR->activeWorkspace);
}
void CHyprDwindleLayout::fullscreenRequestForWindow(CWindow* pWindow) {

View file

@ -106,7 +106,7 @@ void CInputManager::onMouseButton(wlr_event_pointer_button* e) {
}
// notify app if we didnt handle it
const auto PWINDOW = g_pCompositor->vectorToWindowIdeal(getMouseCoordsInternal());
const auto PWINDOW = g_pCompositor->vectorToWindow(getMouseCoordsInternal());
if (g_pCompositor->windowValidMapped(PWINDOW) && g_pCompositor->doesSeatAcceptInput(g_pXWaylandManager->getWindowSurface(PWINDOW)))
wlr_seat_pointer_notify_button(g_pCompositor->m_sSeat.seat, e->time_msec, e->button, e->state);
}

View file

@ -43,14 +43,8 @@ bool shouldRenderWindow(CWindow* pWindow, SMonitor* pMonitor) {
return true;
// if not, check if it maybe is active on a different monitor.
for (auto& m : g_pCompositor->m_lMonitors) {
if (&m == pMonitor)
continue;
if (m.activeWorkspace == pWindow->m_iWorkspaceID)
if (g_pCompositor->isWorkspaceVisible(pWindow->m_iWorkspaceID))
return true;
}
return false;
}