<table><tr><td style="">davidedmundson added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D10197" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>The old code is clearly wrong.</p>

<p>It calls Dialog::event(event);</p>

<p>that will set up a shellsurface in the expose event<br />
Then we process further and set up a shell surface in the expose event</p>

<p>PlasmaShellSurfaces are shared, but you still have two objects handling the move event simultaneously, and worst still</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">} else if (event->type() == QEvent::Hide) {</pre></div>

<p>delete m_plasmaShellSurface;</p>

<p>is just screaming out for a crash as dialog is sharing that same object. We're just being very lucky at the moment.</p>

<p>I wouldn't want to see this reverted as-is.</p>

<p>But clearly we need the setRole and the setPanelTakesFocus.  I missed that in my review.<br />
That could mean just adding an if(Dock) in Dialog.cpp  , only setting those parts in ExposeEvent here, or adding an extra virtual to configure dialog somehow.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D10197" rel="noreferrer">https://phabricator.kde.org/D10197</a></div></div><br /><div><strong>To: </strong>apol, Plasma, davidedmundson<br /><strong>Cc: </strong>graesslin, broulik, ngraham, davidedmundson, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>