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

List:       kde-panel-devel
Subject:    D10197: Fix krunner's alt+f2 on wayland
From:       David Edmundson <noreply () phabricator ! kde ! org>
Date:       2018-02-06 16:47:10
Message-ID: 20180206164710.1.DC6B7DEC3B5A22A7 () phabricator ! kde ! org
[Download RAW message or body]

davidedmundson added a comment.


  The old code is clearly wrong.
  
  It calls Dialog::event(event);
  
  that will set up a shellsurface in the expose event
  Then we process further and set up a shell surface in the expose event
  
  PlasmaShellSurfaces are shared, but you still have two objects handling the move \
event simultaneously, and worst still  
    } else if (event->type() == QEvent::Hide) {
  
  delete m_plasmaShellSurface;
  
  is just screaming out for a crash as dialog is sharing that same object. We're just \
being very lucky at the moment.  
  I wouldn't want to see this reverted as-is.
  
  But clearly we need the setRole and the setPanelTakesFocus.  I missed that in my \
review.  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.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D10197

To: apol, #plasma, davidedmundson
Cc: graesslin, broulik, ngraham, davidedmundson, plasma-devel, ZrenBot, progwolff, \
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


[Attachment #3 (unknown)]

<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 \
&quot;Menlo&quot;, &quot;Consolas&quot;, &quot;Monaco&quot;, monospace; padding: \
12px; margin: 0; background: rgba(71, 87, 120, 0.08);">} else if (event-&gt;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&#039;re just being very lucky at the moment.</p>

<p>I wouldn&#039;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>



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

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