mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-09 23:45:58 +01:00
conform to unmanaged X11 activate requests
This commit is contained in:
parent
6688421240
commit
fcf1bafb09
1 changed files with 13 additions and 1 deletions
|
@ -56,6 +56,7 @@ void Events::listener_mapWindow(void* owner, void* data) {
|
||||||
PWINDOW->m_bReadyToDelete = false;
|
PWINDOW->m_bReadyToDelete = false;
|
||||||
PWINDOW->m_bFadingOut = false;
|
PWINDOW->m_bFadingOut = false;
|
||||||
PWINDOW->m_szTitle = g_pXWaylandManager->getTitle(PWINDOW);
|
PWINDOW->m_szTitle = g_pXWaylandManager->getTitle(PWINDOW);
|
||||||
|
PWINDOW->m_iX11Type = PWINDOW->m_bIsX11 ? (PWINDOW->m_uSurface.xwayland->override_redirect ? 2 : 1) : 1;
|
||||||
|
|
||||||
if (g_pInputManager->m_bLastFocusOnLS) // waybar fix
|
if (g_pInputManager->m_bLastFocusOnLS) // waybar fix
|
||||||
g_pInputManager->releaseAllMouseButtons();
|
g_pInputManager->releaseAllMouseButtons();
|
||||||
|
@ -851,7 +852,18 @@ void Events::listener_activateX11(void* owner, void* data) {
|
||||||
|
|
||||||
Debug::log(LOG, "X11 Activate request for window %x", PWINDOW);
|
Debug::log(LOG, "X11 Activate request for window %x", PWINDOW);
|
||||||
|
|
||||||
if (PWINDOW->m_iX11Type != 1 || PWINDOW == g_pCompositor->m_pLastWindow)
|
if (PWINDOW->m_iX11Type == 2) {
|
||||||
|
|
||||||
|
Debug::log(LOG, "Unmanaged X11 %x requests activate", PWINDOW);
|
||||||
|
|
||||||
|
if (g_pCompositor->m_pLastWindow && g_pCompositor->m_pLastWindow->getPID() != PWINDOW->getPID())
|
||||||
|
return;
|
||||||
|
|
||||||
|
g_pCompositor->focusWindow(PWINDOW);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PWINDOW == g_pCompositor->m_pLastWindow)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_pEventManager->postEvent(SHyprIPCEvent{"urgent", getFormat("%x", PWINDOW)});
|
g_pEventManager->postEvent(SHyprIPCEvent{"urgent", getFormat("%x", PWINDOW)});
|
||||||
|
|
Loading…
Reference in a new issue