mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 10:22:49 +00:00
kstart: implement option to not use temporary rules
for simulating clients actually demanding attention (not done by kwin rule) Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
e3ae38991c
commit
5f54837b9a
1 changed files with 5 additions and 1 deletions
|
@ -66,12 +66,13 @@ static unsigned long state = 0;
|
||||||
static unsigned long mask = 0;
|
static unsigned long mask = 0;
|
||||||
static NET::WindowType windowtype = NET::Unknown;
|
static NET::WindowType windowtype = NET::Unknown;
|
||||||
static Atom wm_state_atom = None;
|
static Atom wm_state_atom = None;
|
||||||
|
static bool norule = false;
|
||||||
|
|
||||||
KStart::KStart()
|
KStart::KStart()
|
||||||
: QObject()
|
: QObject()
|
||||||
{
|
{
|
||||||
NETRootInfo i(QX11Info::display(), NET::Supported);
|
NETRootInfo i(QX11Info::display(), NET::Supported);
|
||||||
bool useRule = i.isSupported(NET::WM2KDETemporaryRules);
|
bool useRule = (!norule && i.isSupported(NET::WM2KDETemporaryRules));
|
||||||
|
|
||||||
if (useRule) {
|
if (useRule) {
|
||||||
sendRule();
|
sendRule();
|
||||||
|
@ -353,6 +354,7 @@ int main(int argc, char *argv[])
|
||||||
options.add("keepbelow", ki18n("Try to keep the window below other windows"));
|
options.add("keepbelow", ki18n("Try to keep the window below other windows"));
|
||||||
options.add("skiptaskbar", ki18n("The window does not get an entry in the taskbar"));
|
options.add("skiptaskbar", ki18n("The window does not get an entry in the taskbar"));
|
||||||
options.add("skippager", ki18n("The window does not get an entry on the pager"));
|
options.add("skippager", ki18n("The window does not get an entry on the pager"));
|
||||||
|
options.add("norule", ki18n("Do not use temporary KWin rule, on by default"));
|
||||||
KCmdLineArgs::addCmdLineOptions(options); // Add our own options.
|
KCmdLineArgs::addCmdLineOptions(options); // Add our own options.
|
||||||
|
|
||||||
KComponentData componentData( &aboutData);
|
KComponentData componentData( &aboutData);
|
||||||
|
@ -458,6 +460,8 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
norule = !args->isSet("rule");
|
||||||
|
|
||||||
fcntl(ConnectionNumber(QX11Info::display()), F_SETFD, 1);
|
fcntl(ConnectionNumber(QX11Info::display()), F_SETFD, 1);
|
||||||
args->clear();
|
args->clear();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue