KRunner Wayland issues on Qt 5.9

Martin Flöser mgraesslin at kde.org
Wed Jul 12 16:45:54 UTC 2017


Am 2017-07-12 17:02, schrieb Martin Flöser:
> Hi all,
> 
> I had a look at the issues of KRunner on Wayland with Qt 5.9 and want
> to share my findings.
> 
> What we see is KRunner working fine on first invokation, but
> afterwards everything is messed up:
> * maximized windows shortly change their size
> * KRunner opens behind other windows
> 
> With WAYLAND_DEBUG I was able to understand the issue. On first
> invokation everything is normal:
> * Plasma shell surface gets created
> * Plasma shell surface gets positioned
> * Plasma shell surface gets marked as panel
> * Panel is set to windows go below
> * Panel is marked as accepts focus
> * Surface gets mapped
> 
> Yay, a situation KWin can handle.
> 
> Now the window gets hidden, and shown again and Qt recreates the
> surface. Due to queuing we have
> 1. Surface gets mapped
> 2. KWin shows the window at random position
> 3. Plasma shell surface gets created and marked as panel
> 4. KWin adjust it to be a panel and moves maximized windows around
> 5. Plasma shell surface gets marked as panel with windows go below
> 6. KWin adjust it to be a panel with windows go below and moves
> maximized windows around
> 7. Panel gets marked as accepts focus (too late, too late)
> 8. KRunner gets positioned
> 
> So we are in a bad state. When looking at it our Plasma Shell Surface
> protocol is not double buffered which explains why KWin reacts on each
> and every of the actions. It was designed so that double buffered is
> not needed as it was supposed to be used before mapping the window.
> 
> Now with Qt's new behavior that bites our ass and I'm a little bit
> lost what to do. I think we can improve the situation by first setting
> the panel behavior, but the wrong position is something we cannot
> prevent if the window is already mapped. Even changing the protocol to
> be double buffered would not really help here as we are too late. It's
> not every frame is perfect.
> 
> Any ideas or advice?

So played with the KRunner code, resulted in: 
https://phabricator.kde.org/D6654

Summary, don't use expose event, use show event

Cheers
Martin


More information about the Plasma-devel mailing list