mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 10:49:52 +01:00
simplify code and update monitor on warp
This commit is contained in:
parent
eee0cad4d0
commit
3c3f80c2fe
2 changed files with 4 additions and 2 deletions
|
@ -1692,6 +1692,10 @@ void CCompositor::warpCursorTo(const Vector2D& pos) {
|
|||
return;
|
||||
|
||||
wlr_cursor_warp(m_sWLRCursor, m_sSeat.mouse->mouse, pos.x, pos.y);
|
||||
|
||||
const auto PMONITORNEW = getMonitorFromVector(pos);
|
||||
if (PMONITORNEW != m_pLastMonitor)
|
||||
m_pLastMonitor = PMONITORNEW;
|
||||
}
|
||||
|
||||
SLayerSurface* CCompositor::getLayerSurfaceFromWlr(wlr_layer_surface_v1* pLS) {
|
||||
|
|
|
@ -1351,8 +1351,6 @@ void CKeybindManager::focusWindow(std::string regexp) {
|
|||
|
||||
Debug::log(LOG, "Focusing to window name: %s", PWINDOW->m_szTitle.c_str());
|
||||
|
||||
changeworkspace("[internal]" + std::to_string(PWINDOW->m_iWorkspaceID));
|
||||
|
||||
g_pCompositor->focusWindow(PWINDOW);
|
||||
|
||||
const auto MIDPOINT = PWINDOW->m_vRealPosition.goalv() + PWINDOW->m_vRealSize.goalv() / 2.f;
|
||||
|
|
Loading…
Reference in a new issue