remove the HideUtilityWindowsForInactive option
It caused bugs and doesn't seem to work anymore, with no complaints about it not working or an obvious reason for it to exist, so it almost certainly isn't needed at all.
This commit is contained in:
parent
a6a85466cd
commit
65b4968c80
9 changed files with 2 additions and 174 deletions
|
@ -254,7 +254,6 @@ void Workspace::setActiveWindow(Window *window)
|
|||
}
|
||||
}
|
||||
|
||||
updateToolWindows(false);
|
||||
if (window) {
|
||||
disableGlobalShortcutsForClient(window->rules()->checkDisableGlobalShortcuts(false));
|
||||
} else {
|
||||
|
|
|
@ -118,26 +118,6 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="specialWindowsLabel">
|
||||
<property name="text">
|
||||
<string>&Special windows:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>kcfg_HideUtilityWindowsForInactive</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="kcfg_HideUtilityWindowsForInactive">
|
||||
<property name="whatsThis">
|
||||
<string>When turned on, utility windows (tool windows, torn-off menus,...) of inactive applications will be hidden and will be shown only when the application becomes active. Note that applications have to mark the windows with the proper window type for this feature to work.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide utility windows for inactive applications</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="activationDesktopPolicyLabel">
|
||||
<property name="text">
|
||||
<string>Virtual Desktop behavior:</string>
|
||||
|
@ -147,14 +127,14 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="activationDesktopPolicyDescriptionLabel">
|
||||
<property name="text">
|
||||
<string>When activating a window on a different Virtual Desktop:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="kcfg_ActivationDesktopPolicy">
|
||||
<property name="whatsThis">
|
||||
<string><html><head/><body><p>This setting controls what happens when an open window located on a Virtual Desktop other than the current one is activated. </p><p><span style=" font-style:italic;">Switch to that Virtual Desktop</span> will switch to the Virtual Desktop where the window is currently located. </p><p><span style=" font-style:italic;">Bring window to current Virtual Desktop</span> will cause the window to jump to the active Virtual Desktop. </p></body></html></string>
|
||||
|
|
|
@ -49,10 +49,6 @@
|
|||
<default>Centered</default>
|
||||
</entry>
|
||||
|
||||
<entry key="HideUtilityWindowsForInactive" type="Bool">
|
||||
<default>true</default>
|
||||
</entry>
|
||||
|
||||
<entry name="ActivationDesktopPolicy" type="Enum">
|
||||
<choices name="ActivationDesktopPolicyChoices">
|
||||
<choice name="SwitchToOtherDesktop"></choice>
|
||||
|
|
|
@ -205,9 +205,6 @@
|
|||
<entry name="KillPingTimeout" type="Int">
|
||||
<default>5000</default>
|
||||
</entry>
|
||||
<entry name="HideUtilityWindowsForInactive" type="Bool">
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="InactiveTabsSkipTaskbar" type="Bool">
|
||||
<default>false</default>
|
||||
</entry>
|
||||
|
|
|
@ -52,7 +52,6 @@ Options::Options(QObject *parent)
|
|||
, m_rollOverDesktops(false)
|
||||
, m_focusStealingPreventionLevel(0)
|
||||
, m_killPingTimeout(0)
|
||||
, m_hideUtilityWindowsForInactive(false)
|
||||
, m_xwaylandCrashPolicy(Options::defaultXwaylandCrashPolicy())
|
||||
, m_xwaylandMaxCrashCount(Options::defaultXwaylandMaxCrashCount())
|
||||
, m_xwaylandEavesdrops(Options::defaultXwaylandEavesdrops())
|
||||
|
@ -556,15 +555,6 @@ void Options::setKillPingTimeout(int killPingTimeout)
|
|||
Q_EMIT killPingTimeoutChanged();
|
||||
}
|
||||
|
||||
void Options::setHideUtilityWindowsForInactive(bool hideUtilityWindowsForInactive)
|
||||
{
|
||||
if (m_hideUtilityWindowsForInactive == hideUtilityWindowsForInactive) {
|
||||
return;
|
||||
}
|
||||
m_hideUtilityWindowsForInactive = hideUtilityWindowsForInactive;
|
||||
Q_EMIT hideUtilityWindowsForInactiveChanged();
|
||||
}
|
||||
|
||||
void Options::setCompositingMode(int compositingMode)
|
||||
{
|
||||
if (m_compositingMode == static_cast<CompositingType>(compositingMode)) {
|
||||
|
@ -849,7 +839,6 @@ void Options::syncFromKcfgc()
|
|||
setCornerBarrier(m_settings->cornerBarrier());
|
||||
setSnapOnlyWhenOverlapping(m_settings->snapOnlyWhenOverlapping());
|
||||
setKillPingTimeout(m_settings->killPingTimeout());
|
||||
setHideUtilityWindowsForInactive(m_settings->hideUtilityWindowsForInactive());
|
||||
setBorderlessMaximizedWindows(m_settings->borderlessMaximizedWindows());
|
||||
setElectricBorderMaximize(m_settings->electricBorderMaximize());
|
||||
setElectricBorderTiling(m_settings->electricBorderTiling());
|
||||
|
|
|
@ -181,10 +181,6 @@ class KWIN_EXPORT Options : public QObject
|
|||
* timeout before non-responding application will be killed after attempt to close.
|
||||
*/
|
||||
Q_PROPERTY(int killPingTimeout READ killPingTimeout WRITE setKillPingTimeout NOTIFY killPingTimeoutChanged)
|
||||
/**
|
||||
* Whether to hide utility windows for inactive applications.
|
||||
*/
|
||||
Q_PROPERTY(bool hideUtilityWindowsForInactive READ isHideUtilityWindowsForInactive WRITE setHideUtilityWindowsForInactive NOTIFY hideUtilityWindowsForInactiveChanged)
|
||||
Q_PROPERTY(int compositingMode READ compositingMode WRITE setCompositingMode NOTIFY compositingModeChanged)
|
||||
Q_PROPERTY(bool useCompositing READ isUseCompositing WRITE setUseCompositing NOTIFY useCompositingChanged)
|
||||
Q_PROPERTY(int hiddenPreviews READ hiddenPreviews WRITE setHiddenPreviews NOTIFY hiddenPreviewsChanged)
|
||||
|
@ -635,14 +631,6 @@ public:
|
|||
return m_killPingTimeout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether to hide utility windows for inactive applications.
|
||||
*/
|
||||
bool isHideUtilityWindowsForInactive() const
|
||||
{
|
||||
return m_hideUtilityWindowsForInactive;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the animation time factor for desktop effects.
|
||||
*/
|
||||
|
@ -756,7 +744,6 @@ public:
|
|||
void setElectricBorderCornerRatio(float electricBorderCornerRatio);
|
||||
void setBorderlessMaximizedWindows(bool borderlessMaximizedWindows);
|
||||
void setKillPingTimeout(int killPingTimeout);
|
||||
void setHideUtilityWindowsForInactive(bool hideUtilityWindowsForInactive);
|
||||
void setCompositingMode(int compositingMode);
|
||||
void setUseCompositing(bool useCompositing);
|
||||
void setHiddenPreviews(int hiddenPreviews);
|
||||
|
@ -958,7 +945,6 @@ Q_SIGNALS:
|
|||
void electricBorderCornerRatioChanged();
|
||||
void borderlessMaximizedWindowsChanged();
|
||||
void killPingTimeoutChanged();
|
||||
void hideUtilityWindowsForInactiveChanged();
|
||||
void compositingModeChanged();
|
||||
void useCompositingChanged();
|
||||
void hiddenPreviewsChanged();
|
||||
|
@ -998,7 +984,6 @@ private:
|
|||
bool m_rollOverDesktops;
|
||||
int m_focusStealingPreventionLevel;
|
||||
int m_killPingTimeout;
|
||||
bool m_hideUtilityWindowsForInactive;
|
||||
XwaylandCrashPolicy m_xwaylandCrashPolicy;
|
||||
int m_xwaylandMaxCrashCount;
|
||||
XwaylandEavesdropsMode m_xwaylandEavesdrops;
|
||||
|
|
|
@ -208,11 +208,9 @@ void Workspace::init()
|
|||
|
||||
reconfigureTimer.setSingleShot(true);
|
||||
m_rearrangeTimer.setSingleShot(true);
|
||||
updateToolWindowsTimer.setSingleShot(true);
|
||||
|
||||
connect(&reconfigureTimer, &QTimer::timeout, this, &Workspace::slotReconfigure);
|
||||
connect(&m_rearrangeTimer, &QTimer::timeout, this, &Workspace::rearrange);
|
||||
connect(&updateToolWindowsTimer, &QTimer::timeout, this, &Workspace::slotUpdateToolWindows);
|
||||
|
||||
// TODO: do we really need to reconfigure everything when fonts change?
|
||||
// maybe just reconfigure the decorations? Move this into libkdecoration?
|
||||
|
@ -739,9 +737,6 @@ void Workspace::addX11Window(X11Window *window)
|
|||
window->checkActiveModal();
|
||||
checkTransients(window->window()); // SELI TODO: Does this really belong here?
|
||||
updateStackingOrder(true); // Propagatem new window
|
||||
if (window->isUtility() || window->isMenu() || window->isToolbar()) {
|
||||
updateToolWindows(true);
|
||||
}
|
||||
updateTabbox();
|
||||
}
|
||||
|
||||
|
@ -881,112 +876,6 @@ void Workspace::removeWindow(Window *window)
|
|||
updateTabbox();
|
||||
}
|
||||
|
||||
void Workspace::updateToolWindows(bool also_hide)
|
||||
{
|
||||
// TODO: What if Client's transiency/group changes? should this be called too? (I'm paranoid, am I not?)
|
||||
if (!options->isHideUtilityWindowsForInactive()) {
|
||||
#if KWIN_BUILD_X11
|
||||
for (auto it = m_windows.constBegin(); it != m_windows.constEnd(); ++it) {
|
||||
X11Window *x11Window = qobject_cast<X11Window *>(*it);
|
||||
if (x11Window && x11Window->isUtility()) {
|
||||
x11Window->setHidden(false);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
const Group *group = nullptr;
|
||||
auto window = m_activeWindow;
|
||||
// Go up in transiency hiearchy, if the top is found, only tool transients for the top mainwindow
|
||||
// will be shown; if a group transient is group, all tools in the group will be shown
|
||||
while (window != nullptr) {
|
||||
if (!window->isTransient()) {
|
||||
break;
|
||||
}
|
||||
if (window->groupTransient()) {
|
||||
group = window->group();
|
||||
break;
|
||||
}
|
||||
window = window->transientFor();
|
||||
}
|
||||
// Use stacking order only to reduce flicker, it doesn't matter if block_stacking_updates == 0,
|
||||
// I.e. if it's not up to date
|
||||
|
||||
// SELI TODO: But maybe it should - what if a new window has been added that's not in stacking order yet?
|
||||
QList<Window *> to_show, to_hide;
|
||||
for (auto it = stacking_order.constBegin(); it != stacking_order.constEnd(); ++it) {
|
||||
auto c = *it;
|
||||
if (!c->isClient()) {
|
||||
continue;
|
||||
}
|
||||
if (c->isUtility() || c->isMenu() || c->isToolbar()) {
|
||||
bool show = true;
|
||||
if (!c->isTransient()) {
|
||||
#if KWIN_BUILD_X11
|
||||
if (!c->group() || c->group()->members().count() == 1) { // Has its own group, keep always visible
|
||||
show = true;
|
||||
} else if (window != nullptr && c->group() == window->group()) {
|
||||
show = true;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
show = false;
|
||||
}
|
||||
} else {
|
||||
if (group != nullptr && c->group() == group) {
|
||||
show = true;
|
||||
} else if (window != nullptr && window->hasTransient(c, true)) {
|
||||
show = true;
|
||||
} else {
|
||||
show = false;
|
||||
}
|
||||
}
|
||||
if (!show && also_hide) {
|
||||
const auto mainwindows = c->mainWindows();
|
||||
// Don't hide utility windows which are standalone(?) or
|
||||
// have e.g. kicker as mainwindow
|
||||
if (mainwindows.isEmpty()) {
|
||||
show = true;
|
||||
}
|
||||
for (auto it2 = mainwindows.constBegin(); it2 != mainwindows.constEnd(); ++it2) {
|
||||
if ((*it2)->isSpecialWindow()) {
|
||||
show = true;
|
||||
}
|
||||
}
|
||||
if (!show) {
|
||||
to_hide.append(c);
|
||||
}
|
||||
}
|
||||
if (show) {
|
||||
to_show.append(c);
|
||||
}
|
||||
}
|
||||
} // First show new ones, then hide
|
||||
for (int i = to_show.size() - 1; i >= 0; --i) { // From topmost
|
||||
// TODO: Since this is in stacking order, the order of taskbar entries changes :(
|
||||
to_show.at(i)->setHidden(false);
|
||||
}
|
||||
if (also_hide) {
|
||||
for (auto it = to_hide.constBegin(); it != to_hide.constEnd(); ++it) { // From bottommost
|
||||
(*it)->setHidden(true);
|
||||
}
|
||||
updateToolWindowsTimer.stop();
|
||||
} else { // setActiveWindow() is after called with NULL window, quickly followed
|
||||
// by setting a new window, which would result in flickering
|
||||
resetUpdateToolWindowsTimer();
|
||||
}
|
||||
}
|
||||
|
||||
void Workspace::resetUpdateToolWindowsTimer()
|
||||
{
|
||||
updateToolWindowsTimer.start(200);
|
||||
}
|
||||
|
||||
void Workspace::slotUpdateToolWindows()
|
||||
{
|
||||
updateToolWindows(true);
|
||||
}
|
||||
|
||||
void Workspace::slotReloadConfig()
|
||||
{
|
||||
reconfigure();
|
||||
|
@ -1013,7 +902,6 @@ void Workspace::slotReconfigure()
|
|||
|
||||
Q_EMIT configChanged();
|
||||
m_userActionsMenu->discard();
|
||||
updateToolWindows(true);
|
||||
|
||||
m_rulebook->load();
|
||||
for (Window *window : std::as_const(m_windows)) {
|
||||
|
|
|
@ -236,7 +236,6 @@ public:
|
|||
void restackWindowUnderActive(Window *window);
|
||||
void restack(Window *window, Window *under, bool force = false);
|
||||
void raiseOrLowerWindow(Window *window);
|
||||
void resetUpdateToolWindowsTimer();
|
||||
void updateStackingOrder(bool propagate_new_windows = false);
|
||||
void forceRestacking();
|
||||
|
||||
|
@ -549,7 +548,6 @@ private Q_SLOTS:
|
|||
#if KWIN_BUILD_X11
|
||||
void selectWmInputEventMask();
|
||||
#endif
|
||||
void slotUpdateToolWindows();
|
||||
void delayFocus();
|
||||
void slotReloadConfig();
|
||||
void updateCurrentActivity(const QString &new_activity);
|
||||
|
@ -610,7 +608,6 @@ private:
|
|||
void lowerWindowWithinApplication(Window *window);
|
||||
bool allowFullClientRaising(const Window *window, uint32_t timestamp);
|
||||
void blockStackingUpdates(bool block);
|
||||
void updateToolWindows(bool also_hide);
|
||||
void saveOldScreenSizes();
|
||||
void addToStack(Window *window);
|
||||
void removeFromStack(Window *window);
|
||||
|
@ -720,8 +717,6 @@ private:
|
|||
// Timer to collect requests for 'reconfigure'
|
||||
QTimer reconfigureTimer;
|
||||
|
||||
QTimer updateToolWindowsTimer;
|
||||
|
||||
static Workspace *_self;
|
||||
#if KWIN_BUILD_X11
|
||||
std::unique_ptr<KStartupInfo> m_startup;
|
||||
|
|
|
@ -3227,7 +3227,6 @@ void X11Window::setTransient(xcb_window_t new_transient_for_id)
|
|||
setTransientFor(transient_for);
|
||||
checkGroup(nullptr, true); // force, because transiency has changed
|
||||
updateLayer();
|
||||
workspace()->resetUpdateToolWindowsTimer();
|
||||
Q_EMIT transientChanged();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue