[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    Re: Raising Windows and Focus Prevention
From:       Milian Wolff <mail () milianw ! de>
Date:       2018-01-09 15:44:40
Message-ID: 1552308.eD9VfnxpOy () agathebauer
[Download RAW message or body]


On Tuesday, January 9, 2018 4:41:03 PM CET Martin Flöser wrote:
> Am 2018-01-09 12:49, schrieb Milian Wolff:
> > Hey all,
> > 
> > I'm trying to raise a Qt window by calling raise() on it. So far the
> > code
> > essentially looks like this:
> > 
> > w->show();
> > w->setWindowState(w->windowState() & ~Qt::WindowMinimized);
> > w->raise();
> > w->activateWindow();
> 
> The simple answer is: don't do that as it won't work on Wayland. You can
> neither raise a window nor activate a window. And on X11 as you noticed
> KWin's focus stealing prevention is kicking in.
> 
> So the obvious question from me is: why do you want to do that?

$ launch_unique_app &
# now cover the window by another app
$ launch_unique_app
# now the previous app's window should be raised

c.f.: https://github.com/qtproject/qt-solutions/blob/master/
qtsingleapplication/src/qtsingleapplication.cpp#L323

Cheers

-- 
Milian Wolff
mail@milianw.de
http://milianw.de
["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic