Drop MoveMinimizedWindowsToEndOfTabBoxFocusChain

Use OrderMinimizedMode option in [TabBox] instead.
This commit is contained in:
Vlad Zahorodnii 2023-03-04 13:40:59 +02:00
parent 9720a6ee84
commit 9a4ca5ec2b
5 changed files with 1 additions and 40 deletions

View file

@ -212,21 +212,7 @@ Window *FocusChain::nextForDesktop(Window *reference, VirtualDesktop *desktop) c
void FocusChain::makeFirstInChain(Window *window, Chain &chain)
{
chain.removeAll(window);
if (options->moveMinimizedWindowsToEndOfTabBoxFocusChain()) {
if (window->isMinimized()) { // add it before the first minimized ...
for (int i = chain.count() - 1; i >= 0; --i) {
if (chain.at(i)->isMinimized()) {
chain.insert(i + 1, window);
return;
}
}
chain.prepend(window); // ... or at end of chain
} else {
chain.append(window);
}
} else {
chain.append(window);
}
chain.append(window);
}
void FocusChain::makeLastInChain(Window *window, Chain &chain)

View file

@ -319,9 +319,6 @@
<entry name="LayoutName" type="String">
<default>thumbnails</default>
</entry>
<entry name="MoveMinimizedWindowsToEndOfTabBoxFocusChain" type="Bool">
<default>false</default>
</entry>
</group>
<group name="KDE">
<entry name="AnimationDurationFactor" type="Double">

View file

@ -68,7 +68,6 @@ Options::Options(QObject *parent)
, m_glPreferBufferSwap(Options::defaultGlPreferBufferSwap())
, m_glPlatformInterface(Options::defaultGlPlatformInterface())
, m_windowsBlockCompositing(true)
, m_MoveMinimizedWindowsToEndOfTabBoxFocusChain(false)
, OpTitlebarDblClick(Options::defaultOperationTitlebarDblClick())
, CmdActiveTitlebar1(Options::defaultCommandActiveTitlebar1())
, CmdActiveTitlebar2(Options::defaultCommandActiveTitlebar2())
@ -611,14 +610,6 @@ void Options::setWindowsBlockCompositing(bool value)
Q_EMIT windowsBlockCompositingChanged();
}
void Options::setMoveMinimizedWindowsToEndOfTabBoxFocusChain(bool value)
{
if (m_MoveMinimizedWindowsToEndOfTabBoxFocusChain == value) {
return;
}
m_MoveMinimizedWindowsToEndOfTabBoxFocusChain = value;
}
void Options::setGlPreferBufferSwap(char glPreferBufferSwap)
{
if (glPreferBufferSwap == 'a') {
@ -817,7 +808,6 @@ void Options::syncFromKcfgc()
setElectricBorderTiling(m_settings->electricBorderTiling());
setElectricBorderCornerRatio(m_settings->electricBorderCornerRatio());
setWindowsBlockCompositing(m_settings->windowsBlockCompositing());
setMoveMinimizedWindowsToEndOfTabBoxFocusChain(m_settings->moveMinimizedWindowsToEndOfTabBoxFocusChain());
setLatencyPolicy(m_settings->latencyPolicy());
setRenderTimeEstimator(m_settings->renderTimeEstimator());
setAllowTearing(m_settings->allowTearing());

View file

@ -707,11 +707,6 @@ public:
return m_windowsBlockCompositing;
}
bool moveMinimizedWindowsToEndOfTabBoxFocusChain() const
{
return m_MoveMinimizedWindowsToEndOfTabBoxFocusChain;
}
QStringList modifierOnlyDBusShortcut(Qt::KeyboardModifier mod) const;
LatencyPolicy latencyPolicy() const;
RenderTimeEstimator renderTimeEstimator() const;
@ -773,7 +768,6 @@ public:
void setGlPreferBufferSwap(char glPreferBufferSwap);
void setGlPlatformInterface(OpenGLPlatformInterface interface);
void setWindowsBlockCompositing(bool set);
void setMoveMinimizedWindowsToEndOfTabBoxFocusChain(bool set);
void setLatencyPolicy(LatencyPolicy policy);
void setRenderTimeEstimator(RenderTimeEstimator estimator);
void setAllowTearing(bool allow);
@ -1032,7 +1026,6 @@ private:
GlSwapStrategy m_glPreferBufferSwap;
OpenGLPlatformInterface m_glPlatformInterface;
bool m_windowsBlockCompositing;
bool m_MoveMinimizedWindowsToEndOfTabBoxFocusChain;
WindowOperation OpTitlebarDblClick;
WindowOperation opMaxButtonRightClick = defaultOperationMaxButtonRightClick();

View file

@ -1307,11 +1307,6 @@ void Window::minimize()
doMinimize();
updateWindowRules(Rules::Minimize);
if (options->moveMinimizedWindowsToEndOfTabBoxFocusChain()) {
Workspace::self()->focusChain()->update(this, FocusChain::MakeFirstMinimized);
}
Q_EMIT minimizedChanged();
}