Compare commits

..

No commits in common. "94e2ce91296a0118e2307b7cae449cfd7f49a5cc" and "a1b5ee11f86a20871bd4f06dba1f6565071e6539" have entirely different histories.

3 changed files with 5 additions and 8 deletions

View file

@ -46,7 +46,6 @@ Window *FocusChain::getForActivation(VirtualDesktop *desktop) const
Window *FocusChain::getForActivation(VirtualDesktop *desktop, Output *output) const Window *FocusChain::getForActivation(VirtualDesktop *desktop, Output *output) const
{ {
qInfo("getForActivation");
// TODO: Find windows on other dedsktops that are also currently visible. // TODO: Find windows on other dedsktops that are also currently visible.
auto it = m_desktopFocusChains.constFind(desktop); auto it = m_desktopFocusChains.constFind(desktop);
if (it == m_desktopFocusChains.constEnd()) { if (it == m_desktopFocusChains.constEnd()) {

View file

@ -834,6 +834,8 @@ bool Window::isOnDesktop(VirtualDesktop *desktop) const
bool Window::isOnCurrentDesktop() const bool Window::isOnCurrentDesktop() const
{ {
bool is = isOnDesktop(VirtualDesktopManager::self()->currentDesktop(output()));
qInfo("isOnDesktop %d", is);
return isOnDesktop(VirtualDesktopManager::self()->currentDesktop(output())); return isOnDesktop(VirtualDesktopManager::self()->currentDesktop(output()));
} }

View file

@ -1015,7 +1015,6 @@ void Workspace::activateWindowOnNewDesktop(VirtualDesktop *desktop)
Window *Workspace::findWindowToActivateOnDesktop(VirtualDesktop *desktop) Window *Workspace::findWindowToActivateOnDesktop(VirtualDesktop *desktop)
{ {
qInfo("findWindowToActivateOnDesktop");
if (m_moveResizeWindow != nullptr && m_activeWindow == m_moveResizeWindow && m_focusChain->contains(m_activeWindow, desktop) && m_activeWindow->isShown() && m_activeWindow->isOnCurrentDesktop()) { if (m_moveResizeWindow != nullptr && m_activeWindow == m_moveResizeWindow && m_focusChain->contains(m_activeWindow, desktop) && m_activeWindow->isShown() && m_activeWindow->isOnCurrentDesktop()) {
// A requestFocus call will fail, as the window is already active // A requestFocus call will fail, as the window is already active
return m_activeWindow; return m_activeWindow;
@ -1112,13 +1111,11 @@ void Workspace::updateCurrentActivity(const QString &new_activity)
window = m_activeWindow; window = m_activeWindow;
} else if (options->focusPolicyIsReasonable()) { } else if (options->focusPolicyIsReasonable()) {
// Search in focus chain // Search in focus chain
// TODO: Maybe we should give more info to the focuschain for it to find a more suitable window? window = m_focusChain->getForActivation(VirtualDesktopManager::self()->currentDesktop());
window = m_focusChain->getForActivation(VirtualDesktopManager::self()->currentDesktop(window->output()));
} }
if (!window) { if (!window) {
// TODO: Maybe we should give more info to the focuschain for it to find a more suitable window? window = findDesktop(true, VirtualDesktopManager::self()->currentDesktop());
window = findDesktop(true, VirtualDesktopManager::self()->currentDesktop(window->output()));
} }
if (window != m_activeWindow) { if (window != m_activeWindow) {
@ -2444,8 +2441,7 @@ QRectF Workspace::clientArea(clientAreaOption opt, const Window *window, const O
{ {
const VirtualDesktop *desktop; const VirtualDesktop *desktop;
if (window->isOnCurrentDesktop()) { if (window->isOnCurrentDesktop()) {
// TODO: This will likely need serious refactoring in case support for different virtual desktop layouts per-output is needed? Or maybe I just don't undestand how this works at all. desktop = VirtualDesktopManager::self()->currentDesktop();
desktop = VirtualDesktopManager::self()->currentDesktop(window->output());
} else { } else {
desktop = window->desktops().constLast(); desktop = window->desktops().constLast();
} }