2020-08-02 22:22:19 +00:00
|
|
|
/*
|
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
2007-11-13 16:20:52 +00:00
|
|
|
|
2020-08-02 22:22:19 +00:00
|
|
|
SPDX-FileCopyrightText: 2007 Christian Nitschkowski <christian.nitschkowski@kdemail.net>
|
|
|
|
SPDX-FileCopyrightText: 2018 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
2007-11-13 16:20:52 +00:00
|
|
|
|
2020-08-02 22:22:19 +00:00
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2007-11-13 16:20:52 +00:00
|
|
|
|
|
|
|
#include "diminactive_config.h"
|
[effects] Rewrite the Dim Inactive effect
Summary:
The Dim Inactive effect was rewritten mostly to fix most of issues with
it, e.g. after leaving a full screen effect(e.g. Desktop Grid) windows
sometimes are not dimmed back, or when a window becomes inactive there
is no smooth transition, etc.
{F5956124}
//Before: the window is not smoothly dimmed.//
{F5956127}
//After: the window is smoothly dimmed.//
In combination with an effect that animates the disappearing of windows,
e.g. Glide, the rewritten Dim Inactive effect doesn't "flash" windows.
If an active window has been closed, it will stay bright. If an inactive
window has been closed, it will stay dimmed.
Among other changes, the KCM has been re-designed to follow common KCM
design in Plasma:
{F5956128, layout=center, size=full}
The way the rewritten Dim Inactive effect handles flashing/flickering problem can be
reused in the Dialog Parent effect.
### Demo
{F5959885}
//Before: dimming of a window group.//
{F5959886}
//After: Dimming of a window group.//
Depends on D13740
CCBUG: 359251
Test Plan:
Test plan #1
* Activated the Desktop Grid effect
* Dimmed windows smoothly brightened
* Left desktop grid
* Windows dimmed back
Test plan #2
* Opened Dolphin and its Preferences window
* Clicked on desktop, both Dolphin and the Preferences window dimmed
* Clicked on Dolphin, both windows smoothly brightened back
Reviewers: #kwin, #plasma, #vdg, davidedmundson
Reviewed By: #kwin, #plasma, #vdg, davidedmundson
Subscribers: davidedmundson, abetts, ngraham, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13720
2018-06-20 10:16:31 +00:00
|
|
|
|
2012-09-11 22:42:46 +00:00
|
|
|
// KConfigSkeleton
|
|
|
|
#include "diminactiveconfig.h"
|
2016-12-02 19:27:43 +00:00
|
|
|
#include <config-kwin.h>
|
2007-11-13 16:20:52 +00:00
|
|
|
|
2014-03-18 15:09:20 +00:00
|
|
|
#include <kwineffects_interface.h>
|
2007-11-13 16:20:52 +00:00
|
|
|
|
2014-03-17 15:24:10 +00:00
|
|
|
#include <KAboutData>
|
2014-03-18 15:09:20 +00:00
|
|
|
#include <KPluginFactory>
|
2007-11-13 16:20:52 +00:00
|
|
|
|
2014-03-17 13:56:11 +00:00
|
|
|
K_PLUGIN_FACTORY_WITH_JSON(DimInactiveEffectConfigFactory,
|
|
|
|
"diminactive_config.json",
|
|
|
|
registerPlugin<KWin::DimInactiveEffectConfig>();)
|
|
|
|
|
2007-11-13 16:20:52 +00:00
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
[effects] Rewrite the Dim Inactive effect
Summary:
The Dim Inactive effect was rewritten mostly to fix most of issues with
it, e.g. after leaving a full screen effect(e.g. Desktop Grid) windows
sometimes are not dimmed back, or when a window becomes inactive there
is no smooth transition, etc.
{F5956124}
//Before: the window is not smoothly dimmed.//
{F5956127}
//After: the window is smoothly dimmed.//
In combination with an effect that animates the disappearing of windows,
e.g. Glide, the rewritten Dim Inactive effect doesn't "flash" windows.
If an active window has been closed, it will stay bright. If an inactive
window has been closed, it will stay dimmed.
Among other changes, the KCM has been re-designed to follow common KCM
design in Plasma:
{F5956128, layout=center, size=full}
The way the rewritten Dim Inactive effect handles flashing/flickering problem can be
reused in the Dialog Parent effect.
### Demo
{F5959885}
//Before: dimming of a window group.//
{F5959886}
//After: Dimming of a window group.//
Depends on D13740
CCBUG: 359251
Test Plan:
Test plan #1
* Activated the Desktop Grid effect
* Dimmed windows smoothly brightened
* Left desktop grid
* Windows dimmed back
Test plan #2
* Opened Dolphin and its Preferences window
* Clicked on desktop, both Dolphin and the Preferences window dimmed
* Clicked on Dolphin, both windows smoothly brightened back
Reviewers: #kwin, #plasma, #vdg, davidedmundson
Reviewed By: #kwin, #plasma, #vdg, davidedmundson
Subscribers: davidedmundson, abetts, ngraham, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13720
2018-06-20 10:16:31 +00:00
|
|
|
DimInactiveEffectConfig::DimInactiveEffectConfig(QWidget *parent, const QVariantList &args)
|
2020-10-21 17:03:07 +00:00
|
|
|
: KCModule(parent, args)
|
2007-11-13 16:20:52 +00:00
|
|
|
{
|
[effects] Rewrite the Dim Inactive effect
Summary:
The Dim Inactive effect was rewritten mostly to fix most of issues with
it, e.g. after leaving a full screen effect(e.g. Desktop Grid) windows
sometimes are not dimmed back, or when a window becomes inactive there
is no smooth transition, etc.
{F5956124}
//Before: the window is not smoothly dimmed.//
{F5956127}
//After: the window is smoothly dimmed.//
In combination with an effect that animates the disappearing of windows,
e.g. Glide, the rewritten Dim Inactive effect doesn't "flash" windows.
If an active window has been closed, it will stay bright. If an inactive
window has been closed, it will stay dimmed.
Among other changes, the KCM has been re-designed to follow common KCM
design in Plasma:
{F5956128, layout=center, size=full}
The way the rewritten Dim Inactive effect handles flashing/flickering problem can be
reused in the Dialog Parent effect.
### Demo
{F5959885}
//Before: dimming of a window group.//
{F5959886}
//After: Dimming of a window group.//
Depends on D13740
CCBUG: 359251
Test Plan:
Test plan #1
* Activated the Desktop Grid effect
* Dimmed windows smoothly brightened
* Left desktop grid
* Windows dimmed back
Test plan #2
* Opened Dolphin and its Preferences window
* Clicked on desktop, both Dolphin and the Preferences window dimmed
* Clicked on Dolphin, both windows smoothly brightened back
Reviewers: #kwin, #plasma, #vdg, davidedmundson
Reviewed By: #kwin, #plasma, #vdg, davidedmundson
Subscribers: davidedmundson, abetts, ngraham, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13720
2018-06-20 10:16:31 +00:00
|
|
|
m_ui.setupUi(this);
|
|
|
|
DimInactiveConfig::instance(KWIN_CONFIG);
|
|
|
|
addConfig(DimInactiveConfig::self(), this);
|
|
|
|
load();
|
2007-11-13 16:20:52 +00:00
|
|
|
}
|
|
|
|
|
[effects] Rewrite the Dim Inactive effect
Summary:
The Dim Inactive effect was rewritten mostly to fix most of issues with
it, e.g. after leaving a full screen effect(e.g. Desktop Grid) windows
sometimes are not dimmed back, or when a window becomes inactive there
is no smooth transition, etc.
{F5956124}
//Before: the window is not smoothly dimmed.//
{F5956127}
//After: the window is smoothly dimmed.//
In combination with an effect that animates the disappearing of windows,
e.g. Glide, the rewritten Dim Inactive effect doesn't "flash" windows.
If an active window has been closed, it will stay bright. If an inactive
window has been closed, it will stay dimmed.
Among other changes, the KCM has been re-designed to follow common KCM
design in Plasma:
{F5956128, layout=center, size=full}
The way the rewritten Dim Inactive effect handles flashing/flickering problem can be
reused in the Dialog Parent effect.
### Demo
{F5959885}
//Before: dimming of a window group.//
{F5959886}
//After: Dimming of a window group.//
Depends on D13740
CCBUG: 359251
Test Plan:
Test plan #1
* Activated the Desktop Grid effect
* Dimmed windows smoothly brightened
* Left desktop grid
* Windows dimmed back
Test plan #2
* Opened Dolphin and its Preferences window
* Clicked on desktop, both Dolphin and the Preferences window dimmed
* Clicked on Dolphin, both windows smoothly brightened back
Reviewers: #kwin, #plasma, #vdg, davidedmundson
Reviewed By: #kwin, #plasma, #vdg, davidedmundson
Subscribers: davidedmundson, abetts, ngraham, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13720
2018-06-20 10:16:31 +00:00
|
|
|
DimInactiveEffectConfig::~DimInactiveEffectConfig()
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
|
|
|
}
|
2007-11-13 16:20:52 +00:00
|
|
|
|
|
|
|
void DimInactiveEffectConfig::save()
|
2011-01-30 14:34:42 +00:00
|
|
|
{
|
2007-11-13 16:20:52 +00:00
|
|
|
KCModule::save();
|
[effects] Rewrite the Dim Inactive effect
Summary:
The Dim Inactive effect was rewritten mostly to fix most of issues with
it, e.g. after leaving a full screen effect(e.g. Desktop Grid) windows
sometimes are not dimmed back, or when a window becomes inactive there
is no smooth transition, etc.
{F5956124}
//Before: the window is not smoothly dimmed.//
{F5956127}
//After: the window is smoothly dimmed.//
In combination with an effect that animates the disappearing of windows,
e.g. Glide, the rewritten Dim Inactive effect doesn't "flash" windows.
If an active window has been closed, it will stay bright. If an inactive
window has been closed, it will stay dimmed.
Among other changes, the KCM has been re-designed to follow common KCM
design in Plasma:
{F5956128, layout=center, size=full}
The way the rewritten Dim Inactive effect handles flashing/flickering problem can be
reused in the Dialog Parent effect.
### Demo
{F5959885}
//Before: dimming of a window group.//
{F5959886}
//After: Dimming of a window group.//
Depends on D13740
CCBUG: 359251
Test Plan:
Test plan #1
* Activated the Desktop Grid effect
* Dimmed windows smoothly brightened
* Left desktop grid
* Windows dimmed back
Test plan #2
* Opened Dolphin and its Preferences window
* Clicked on desktop, both Dolphin and the Preferences window dimmed
* Clicked on Dolphin, both windows smoothly brightened back
Reviewers: #kwin, #plasma, #vdg, davidedmundson
Reviewed By: #kwin, #plasma, #vdg, davidedmundson
Subscribers: davidedmundson, abetts, ngraham, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13720
2018-06-20 10:16:31 +00:00
|
|
|
|
2014-05-15 06:39:42 +00:00
|
|
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.KWin"),
|
2014-03-18 15:09:20 +00:00
|
|
|
QStringLiteral("/Effects"),
|
|
|
|
QDBusConnection::sessionBus());
|
2014-04-04 09:49:31 +00:00
|
|
|
interface.reconfigureEffect(QStringLiteral("diminactive"));
|
2011-01-30 14:34:42 +00:00
|
|
|
}
|
2007-11-13 16:20:52 +00:00
|
|
|
|
[effects] Rewrite the Dim Inactive effect
Summary:
The Dim Inactive effect was rewritten mostly to fix most of issues with
it, e.g. after leaving a full screen effect(e.g. Desktop Grid) windows
sometimes are not dimmed back, or when a window becomes inactive there
is no smooth transition, etc.
{F5956124}
//Before: the window is not smoothly dimmed.//
{F5956127}
//After: the window is smoothly dimmed.//
In combination with an effect that animates the disappearing of windows,
e.g. Glide, the rewritten Dim Inactive effect doesn't "flash" windows.
If an active window has been closed, it will stay bright. If an inactive
window has been closed, it will stay dimmed.
Among other changes, the KCM has been re-designed to follow common KCM
design in Plasma:
{F5956128, layout=center, size=full}
The way the rewritten Dim Inactive effect handles flashing/flickering problem can be
reused in the Dialog Parent effect.
### Demo
{F5959885}
//Before: dimming of a window group.//
{F5959886}
//After: Dimming of a window group.//
Depends on D13740
CCBUG: 359251
Test Plan:
Test plan #1
* Activated the Desktop Grid effect
* Dimmed windows smoothly brightened
* Left desktop grid
* Windows dimmed back
Test plan #2
* Opened Dolphin and its Preferences window
* Clicked on desktop, both Dolphin and the Preferences window dimmed
* Clicked on Dolphin, both windows smoothly brightened back
Reviewers: #kwin, #plasma, #vdg, davidedmundson
Reviewed By: #kwin, #plasma, #vdg, davidedmundson
Subscribers: davidedmundson, abetts, ngraham, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D13720
2018-06-20 10:16:31 +00:00
|
|
|
} // namespace KWin
|
2007-11-13 16:20:52 +00:00
|
|
|
|
2014-03-17 13:56:11 +00:00
|
|
|
#include "diminactive_config.moc"
|