Do not set focus to NoInterventions windows

This commit is contained in:
vaxerski 2022-03-08 20:30:49 +01:00
parent 296096596b
commit 951e1c3b62
1 changed files with 6 additions and 2 deletions

View File

@ -509,6 +509,12 @@ void CWindowManager::refreshDirtyWindows() {
void CWindowManager::setFocusedWindow(xcb_drawable_t window) {
if (window && window != Screen->root) {
const auto PNEWFOCUS = g_pWindowManager->getWindowFromDrawable(window);
if (PNEWFOCUS && PNEWFOCUS->getNoInterventions()) {
Debug::log(LOG, "Not setting focus to a non-interventions window.");
return;
}
Debug::log(LOG, "Setting focus to " + std::to_string(window));
@ -530,8 +536,6 @@ void CWindowManager::setFocusedWindow(xcb_drawable_t window) {
LastWindow = window;
const auto PNEWFOCUS = g_pWindowManager->getWindowFromDrawable(window);
if (PNEWFOCUS) {
applyShapeToWindow(g_pWindowManager->getWindowFromDrawable(window));