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

List:       kwin
Subject:    Re: Raising Windows and Focus Prevention
From:       Martin_Flöser <mgraesslin () kde ! org>
Date:       2018-01-10 16:22:47
Message-ID: f068795ff869bdf69fe3457dec14c3f8 () kde ! org
[Download RAW message or body]

Am 2018-01-10 08:54, schrieb Milian Wolff:
> On Dienstag, 9. Januar 2018 18:10:25 CET Martin Flöser wrote:
>> Am 2018-01-09 16:44, schrieb Milian Wolff:
>> > 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
>> 
>> Use KDBusService in Unique mode. It ensures exactly that this works on
>> X11 (for Wayland we don't have a solution (yet)).
> 
> And what does KDBusService do in the background? Is it sending a DBUS 
> command
> to KWin to raise the window?

I would have to read the code as much as you :-) I assume it's using 
startup notifications to tell KWin that this window is allowed to be 
activated.

Cheers
Martin
[prev in list] [next in list] [prev in thread] [next in thread] 

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