generic: misc cleanups

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2016-04-16 16:05:41 +00:00
parent c6d67eace2
commit d6d2061bb5
10 changed files with 17 additions and 13 deletions

View file

@ -24,6 +24,7 @@
#include <kdebug.h>
#include <klocale.h>
#include <kglobalsettings.h>
#include <kicon.h>
#include <QtGui/QMessageBox>
#include <QtGui/QWidget>

View file

@ -25,6 +25,7 @@
#include "UnicodeBlocks.h"
#include "UnicodeScripts.h"
#include <KLocale>
#include <KIcon>
namespace KFI
{

View file

@ -335,7 +335,7 @@ void KRunnerDialog::paintEvent(QPaintEvent *e)
void KRunnerDialog::showEvent(QShowEvent *)
{
m_shadows->addWindow(this);
unsigned long state = NET::SkipTaskbar | NET::KeepAbove | NET::StaysOnTop;
unsigned long state = NET::SkipTaskbar | NET::KeepAbove;
if (m_floating) {
KWindowSystem::clearState(winId(), state);
} else {

View file

@ -72,7 +72,7 @@ bool KSysTrayCmd::start()
if ( win ) {
// Window always on top
if (onTop) {
KWindowSystem::setState(win, NET::StaysOnTop);
KWindowSystem::setState(win, NET::KeepAbove);
}
return true;
}
@ -108,7 +108,7 @@ void KSysTrayCmd::showWindow()
// Window always on top
if (onTop)
{
KWindowSystem::setState(win, NET::StaysOnTop);
KWindowSystem::setState(win, NET::KeepAbove);
}
KWindowSystem::activateWindow( win );
@ -144,7 +144,7 @@ void KSysTrayCmd::setTargetWindow( WId w )
// Always on top ?
if (onTop)
{
KWindowSystem::setState(win, NET::StaysOnTop);
KWindowSystem::setState(win, NET::KeepAbove);
}
}

View file

@ -25,12 +25,12 @@
#include <kmenu.h>
#include <kstandardaction.h>
#include <kwindowsystem.h>
#include <kicon.h>
#include <ktextedit.h>
#include <QPointer>
#include <QApplication>
#include <QClipboard>
#include <QToolButton>
#include <ktextedit.h>
#include <QtGui/qevent.h>
#include <QtGui/qevent.h>
#include <QItemDelegate>

View file

@ -28,8 +28,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KLocalizedString>
#include <kdebug.h>
#include <KActionCollection>
#include <kaction.h>
#include <KAction>
#include <KShortcutsEditor>
#include <KIcon>
#include <QVBoxLayout>

View file

@ -196,7 +196,7 @@ bool Task::isIconified() const
bool Task::isAlwaysOnTop() const
{
return d->info.valid(true) && (d->info.state() & NET::StaysOnTop);
return d->info.valid(true) && (d->info.state() & NET::KeepAbove);
}
bool Task::isKeptBelowOthers() const

View file

@ -204,9 +204,9 @@ void Task::setAlwaysOnTop(bool stay)
{
NETWinInfo ni(QX11Info::display(), d->win, QX11Info::appRootWindow(), NET::WMState);
if (stay)
ni.setState(NET::StaysOnTop, NET::StaysOnTop);
ni.setState(NET::KeepAbove, NET::KeepAbove);
else
ni.setState(0, NET::StaysOnTop);
ni.setState(0, NET::KeepAbove);
}
void Task::setKeptBelowOthers(bool below)

View file

@ -40,6 +40,7 @@
#include <knewfilemenu.h>
#include <KWindowSystem>
#include <KMenu>
#include <KIcon>
#include <kio/fileundomanager.h>
#include <kio/paste.h>

View file

@ -57,7 +57,7 @@ public:
setWindowFlags(Qt::FramelessWindowHint | Qt::CustomizeWindowHint);
KWindowSystem::setOnAllDesktops(winId(), true);
unsigned long state = NET::Sticky | NET::StaysOnTop | NET::KeepAbove | NET::SkipTaskbar | NET::SkipPager | NET::MaxVert | NET::MaxHoriz;
unsigned long state = NET::Sticky | NET::KeepAbove | NET::SkipTaskbar | NET::SkipPager | NET::MaxVert | NET::MaxHoriz;
KWindowSystem::setState(effectiveWinId(), state);
}
@ -107,7 +107,7 @@ FullScreenWindow::FullScreenWindow(QDeclarativeItem *parent)
m_view->setWindowFlags(Qt::FramelessWindowHint | Qt::CustomizeWindowHint);
m_view->setFrameShape(QFrame::NoFrame);
KWindowSystem::setOnAllDesktops(m_view->winId(), true);
unsigned long state = NET::Sticky | NET::StaysOnTop | NET::KeepAbove | NET::SkipTaskbar | NET::SkipPager;
unsigned long state = NET::Sticky | NET::KeepAbove | NET::SkipTaskbar | NET::SkipPager;
KWindowSystem::setState(m_view->effectiveWinId(), state);
m_background = new Background(this);
@ -283,7 +283,7 @@ void FullScreenWindow::setVisible(const bool visible)
m_background->setVisible(visible);
Plasma::WindowEffects::slideWindow(m_view->winId(), Plasma::BottomEdge, 0);
m_view->setVisible(visible);
unsigned long state = NET::Sticky | NET::StaysOnTop | NET::KeepAbove | NET::SkipTaskbar | NET::SkipPager;
unsigned long state = NET::Sticky | NET::KeepAbove | NET::SkipTaskbar | NET::SkipPager;
KWindowSystem::setState(m_view->effectiveWinId(), state);
KWindowSystem::setState(m_background->effectiveWinId(), state);
if (visible) {