mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-08 08:01:57 -07:00
Fixed XWayland (GTK/?) popups focus
This commit is contained in:
@@ -23,7 +23,6 @@ void CInputManager::mouseMoveUnified(uint32_t time) {
|
||||
// update stuff
|
||||
updateDragIcon();
|
||||
|
||||
|
||||
// focus
|
||||
wlr_surface* foundSurface = nullptr;
|
||||
Vector2D mouseCoords = getMouseCoordsInternal();
|
||||
@@ -66,11 +65,10 @@ void CInputManager::mouseMoveUnified(uint32_t time) {
|
||||
foundSurface = g_pCompositor->vectorToLayerSurface(mouseCoords, &PMONITOR->m_aLayerSurfaceLists[ZWLR_LAYER_SHELL_V1_LAYER_TOP], &surfaceCoords);
|
||||
|
||||
// then windows
|
||||
const auto PWINDOWIDEAL = g_pCompositor->vectorToWindowIdeal(mouseCoords);
|
||||
if (!foundSurface && PWINDOWIDEAL) {
|
||||
foundSurface = g_pXWaylandManager->getWindowSurface(PWINDOWIDEAL);
|
||||
if (foundSurface)
|
||||
surfacePos = PWINDOWIDEAL->m_vRealPosition;
|
||||
const auto PWINDOWIDEAL = g_pCompositor->vectorToWindowIdealExcludeWithSurface(mouseCoords, nullptr, &foundSurface);
|
||||
|
||||
if (foundSurface && PWINDOWIDEAL) {
|
||||
surfacePos = PWINDOWIDEAL->m_vRealPosition;
|
||||
}
|
||||
|
||||
// then surfaces below
|
||||
@@ -124,8 +122,6 @@ void CInputManager::onMouseButton(wlr_pointer_button_event* e) {
|
||||
break;
|
||||
}
|
||||
|
||||
refocus();
|
||||
|
||||
// notify app if we didnt handle it
|
||||
if (g_pCompositor->doesSeatAcceptInput(g_pCompositor->m_pLastFocus)) {
|
||||
wlr_seat_pointer_notify_button(g_pCompositor->m_sSeat.seat, e->time_msec, e->button, e->state);
|
||||
|
Reference in New Issue
Block a user