<table><tr><td style="">davidedmundson accepted this revision.<br />davidedmundson added a comment.<br />This revision is now accepted and ready to land.
</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>For context, krunner inherits from Dialog. <br />
Dialog does all this stuff.  Duplicating it here is wrong.</p>

<p>Must have been ported first or something.</p></div></div><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D10197#inline-47019" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">view.cpp:194-200</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; ">    <span style="color: #aa4000">bool</span> <span class="n">setState</span> <span style="color: #aa2211">=</span> <span class="n">event</span><span style="color: #aa2211">-></span><span class="n">type</span><span class="p">()</span> <span style="color: #aa2211">==</span> <span class="n">QEvent</span><span style="color: #aa2211">::</span><span class="n">Show</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; ">    <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">event</span><span style="color: #aa2211">-></span><span class="n">type</span><span class="p">()</span> <span style="color: #aa2211">==</span> <span class="n">QEvent</span><span style="color: #aa2211">::</span><span class="n">PlatformSurface</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; ">        <span class="n">setState</span> <span style="color: #aa2211">=</span> <span class="p">(</span><span style="color: #aa4000">static_cast</span><span style="color: #aa2211"><</span><span class="n">QPlatformSurfaceEvent</span><span style="color: #aa2211">*></span><span class="p">(</span><span class="n">event</span><span class="p">)</span><span style="color: #aa2211">-></span><span class="n">surfaceEventType</span><span class="p">()</span> <span style="color: #aa2211">==</span> <span class="n">QPlatformSurfaceEvent</span><span style="color: #aa2211">::</span><span class="n">SurfaceCreated</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; ">    <span class="p">}</span>
</div><div style="padding: 0 8px; margin: 0 4px; ">    <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">setState</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; ">        <span class="n">KWindowSystem</span><span style="color: #aa2211">::</span><span class="n">setState</span><span class="p">(</span><span class="n">winId</span><span class="p">(),</span> <span class="n">NET</span><span style="color: #aa2211">::</span><span class="n">SkipTaskbar</span> <span style="color: #aa2211">|</span> <span class="n">NET</span><span style="color: #aa2211">::</span><span class="n">SkipPager</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; ">    <span class="p">}</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">    <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">m_plasmaShell</span> <span style="color: #aa2211">&&</span> <span class="n">event</span><span style="color: #aa2211">-></span><span class="n">type</span><span class="p">()</span> <span style="color: #aa2211">==</span> <span class="n">QEvent</span><span style="color: #aa2211">::</span><span class="n">Expose</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">        <span style="color: #aa4000">using</span> <span style="color: #aa4000">namespace</span> <span class="n">KWayland</span><span style="color: #aa2211">::</span><span class="n">Client</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">        <span style="color: #aa4000">auto</span> <span class="n">ee</span> <span style="color: #aa2211">=</span> <span style="color: #aa4000">static_cast</span><span style="color: #aa2211"><</span><span class="n">QExposeEvent</span><span style="color: #aa2211">*></span><span class="p">(</span><span class="n">event</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">        <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">ee</span><span style="color: #aa2211">-></span><span class="n">region</span><span class="p">().</span><span class="n">isNull</span><span class="p">())</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">            <span style="color: #aa4000">return</span> <span class="n">retval</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">        <span class="p">}</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">        <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">m_plasmaShellSurface</span> <span style="color: #aa2211">&&</span> <span class="n">isVisible</span><span class="p">())</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">            <span class="n">Surface</span> <span style="color: #aa2211">*</span><span class="n">s</span> <span style="color: #aa2211">=</span> <span class="n">Surface</span><span style="color: #aa2211">::</span><span class="n">fromWindow</span><span class="p">(</span><span style="color: #aa4000">this</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">            <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">s</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">                <span style="color: #aa4000">return</span> <span class="n">retval</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">            <span class="p">}</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">            <span class="n">m_plasmaShellSurface</span> <span style="color: #aa2211">=</span> <span class="n">m_plasmaShell</span><span style="color: #aa2211">-></span><span class="n">createSurface</span><span class="p">(</span><span class="n">s</span><span class="p">,</span> <span style="color: #aa4000">this</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">            <span class="n">m_plasmaShellSurface</span><span style="color: #aa2211">-></span><span class="n">setPanelBehavior</span><span class="p">(</span><span class="n">PlasmaShellSurface</span><span style="color: #aa2211">::</span><span class="n">PanelBehavior</span><span style="color: #aa2211">::</span><span class="n">WindowsGoBelow</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">            <span class="n">m_plasmaShellSurface</span><span style="color: #aa2211">-></span><span class="n">setPanelTakesFocus</span><span class="p">(</span><span style="color: #304a96">true</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">            <span class="n">m_plasmaShellSurface</span><span style="color: #aa2211">-></span><span class="n">setRole</span><span class="p">(</span><span class="n">PlasmaShellSurface</span><span style="color: #aa2211">::</span><span class="n">Role</span><span style="color: #aa2211">::</span><span class="n">Panel</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">            <span style="color: #74777d">//this should be on showEvent, but it was too soon so none of those had any effect</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">            <span class="n">KWindowSystem</span><span style="color: #aa2211">::</span><span class="n">setOnAllDesktops</span><span class="p">(</span><span class="n">winId</span><span class="p">(),</span> <span style="color: #304a96">true</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">            <span class="n">positionOnScreen</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">            <span class="n">requestActivate</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">            <span style="color: #74777d">//positionOnScreen tried to position it in the position it already had, so no moveevent happens and we need to manually posiyion the surface</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">            <span class="n">m_plasmaShellSurface</span><span style="color: #aa2211">-></span><span class="n">setPosition</span><span class="p">(</span><span class="n">position</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">        <span class="p">}</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">    <span class="p">}</span> <span style="color: #aa4000">else</span> <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">event</span><span style="color: #aa2211">-></span><span class="n">type</span><span class="p">()</span> <span style="color: #aa2211">==</span> <span class="n">QEvent</span><span style="color: #aa2211">::</span><span class="n">Hide</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">        <span style="color: #aa4000">delete</span> <span class="n">m_plasmaShellSurface</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">    <span class="p">}</span> <span style="color: #aa4000">else</span> <span style="color: #aa4000">if</span> <span class="p">(</span><span class="n">m_plasmaShellSurface</span> <span style="color: #aa2211">&&</span> <span class="n">event</span><span style="color: #aa2211">-></span><span class="n">type</span><span class="p">()</span> <span style="color: #aa2211">==</span> <span class="n">QEvent</span><span style="color: #aa2211">::</span><span class="n">Move</span><span class="p">)</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">        <span class="n">QMoveEvent</span> <span style="color: #aa2211">*</span><span class="n">me</span> <span style="color: #aa2211">=</span> <span style="color: #aa4000">static_cast</span><span style="color: #aa2211"><</span><span class="n">QMoveEvent</span> <span style="color: #aa2211">*></span><span class="p">(</span><span class="n">event</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">        <span class="n">m_plasmaShellSurface</span><span style="color: #aa2211">-></span><span class="n">setPosition</span><span class="p">(</span><span class="n">me</span><span style="color: #aa2211">-></span><span class="n">pos</span><span class="p">());</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">    <span class="p">}</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">This relates to the QXcbWindow comment that you removed, can you leave it.</p>

<p style="padding: 0; margin: 8px;">(I /think/ you can remove this code, it relates to David Rosca's patch that landed ages ago. Check first though)</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</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>ngraham, davidedmundson, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>