create shell surface only at the right moment

Summary:
make the behavior similar to Dialog
create a plasmashell surface only when isVisible() as
some expose events can arrive there too, and also not
create the shell surface if the exposed surface is null

Test Plan: krunner seems to be more reliable

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: broulik, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D6299
wilder-5.14
Marco Martin 9 years ago
parent 415b6d81a6
commit 4c2eb55636
  1. 8
      krunner/view.cpp

@ -230,7 +230,13 @@ bool View::event(QEvent *event)
if (m_plasmaShell && event->type() == QEvent::Expose) {
using namespace KWayland::Client;
if (!m_plasmaShellSurface) {
auto ee = static_cast<QExposeEvent*>(event);
if (ee->region().isNull()) {
return retval;
}
if (!m_plasmaShellSurface && isVisible()) {
Surface *s = Surface::fromWindow(this);
if (!s) {
return retval;

Loading…
Cancel
Save