xwayland: move to hyprland impl (#6086)

This commit is contained in:
Vaxry 2024-05-25 22:43:51 +02:00 committed by GitHub
parent a71207434c
commit addd3e7f1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 2956 additions and 707 deletions

View file

@ -661,7 +661,7 @@ void CInputManager::processMouseDownNormal(const IPointer::SButtonEvent& e) {
// clicking on border triggers resize
// TODO detect click on LS properly
if (*PRESIZEONBORDER && !m_bLastFocusOnLS && e.state == WL_POINTER_BUTTON_STATE_PRESSED) {
if (*PRESIZEONBORDER && !m_bLastFocusOnLS && e.state == WL_POINTER_BUTTON_STATE_PRESSED && (!w || w->m_iX11Type != 2)) {
if (w && !w->m_bIsFullscreen) {
const CBox real = {w->m_vRealPosition.value().x, w->m_vRealPosition.value().y, w->m_vRealSize.value().x, w->m_vRealSize.value().y};
const CBox grab = {real.x - BORDER_GRAB_AREA, real.y - BORDER_GRAB_AREA, real.width + 2 * BORDER_GRAB_AREA, real.height + 2 * BORDER_GRAB_AREA};
@ -674,7 +674,7 @@ void CInputManager::processMouseDownNormal(const IPointer::SButtonEvent& e) {
}
switch (e.state) {
case WL_POINTER_BUTTON_STATE_PRESSED:
case WL_POINTER_BUTTON_STATE_PRESSED: {
if (*PFOLLOWMOUSE == 3) // don't refocus on full loose
break;
@ -692,10 +692,16 @@ void CInputManager::processMouseDownNormal(const IPointer::SButtonEvent& e) {
}
// if clicked on a floating window make it top
if (g_pCompositor->m_pLastWindow.lock() && g_pCompositor->m_pLastWindow->m_bIsFloating)
g_pCompositor->changeWindowZOrder(g_pCompositor->m_pLastWindow.lock(), true);
if (!g_pSeatManager->state.pointerFocus)
break;
auto HLSurf = CWLSurface::surfaceFromWlr(g_pSeatManager->state.pointerFocus);
if (HLSurf && HLSurf->getWindow())
g_pCompositor->changeWindowZOrder(HLSurf->getWindow(), true);
break;
}
case WL_POINTER_BUTTON_STATE_RELEASED: break;
}
@ -1677,6 +1683,10 @@ void CInputManager::setCursorIconOnBorder(PHLWINDOW w) {
return;
}
// ignore X11 OR windows, they shouldn't be touched
if (w->m_bIsX11 && w->m_iX11Type == 2)
return;
static auto PEXTENDBORDERGRAB = CConfigValue<Hyprlang::INT>("general:extend_border_grab_area");
const int BORDERSIZE = w->getRealBorderSize();
const int ROUNDING = w->rounding();