<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>415155</bug_id>
          
          <creation_ts>2019-12-13 21:38:12 +0000</creation_ts>
          <short_desc>Closing window from Present Windows effect sometimes causes the new frontmost window to lose focus and be unable to regain it</short_desc>
          <delta_ts>2020-02-18 19:38:28 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Plasma</classification>
          <product>kwin</product>
          <component>effects-present-windows</component>
          <version>git master</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Nate Graham">nate</reporter>
          <assigned_to name="KWin default assignee">kwin-bugs-null</assigned_to>
          <cc>ae</cc>
    
    <cc>kde</cc>
    
    <cc>michal.dybczak</cc>
          
          <cf_commitlink>https://commits.kde.org/kwin/3dbfa6a32545c9afd27bf8c1e86cba516b71d2a6</cf_commitlink>
          <cf_versionfixedin>5.18.1</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1896388</commentid>
    <comment_count>0</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2019-12-13 21:38:12 +0000</bug_when>
    <thetext>KWin and everything else KDE-related from git master.


STEPS TO REPRODUCE
1. Open two windows
2. Engage Present Windows
3. Click on the close button for a window

OBSERVED RESULT
The effect ends and whatever window comes to the front does not have focus and cannot be given focus. Clicking on the titlebar does not give it focus. You can click and drag on the titlebar to move it around. The Task Switcher does not appear on Alt+Tab. Various other odd window-focus related oddities occur. Restarting KWin fixes everything.


EXPECTED RESULT
None of that weird stuff happens


ADDITIONAL INFORMATION
This is quite reproducible for me, though not to the level of 100%. I have not been able to nail down why it only sometimes happens when I perform the above-mentioned steps to reproduce.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1909033</commentid>
    <comment_count>1</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2020-02-11 20:21:06 +0000</bug_when>
    <thetext>Got confirmation from a user that this is affecting them too in Plasma 5.18.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1909036</commentid>
    <comment_count>2</comment_count>
    <who name="Komorebi">markovs.i.mail</who>
    <bug_when>2020-02-11 20:23:49 +0000</bug_when>
    <thetext>Also affected
Operating System: KDE neon 5.18
KDE Plasma Version: 5.18.0
KDE Frameworks Version: 5.67.0
Qt Version: 5.13.2
Kernel Version: 5.3.0-28-generic
OS Type: 64-bit
Processors: 4 × Intel® Xeon® CPU E3-1225 V2 @ 3.20GHz
Memory: 23,4 GiB of RAM

Please let me know if you need some additional info.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1909044</commentid>
    <comment_count>3</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2020-02-11 20:53:39 +0000</bug_when>
    <thetext>Also can reproduce.

Cause seems to be Kwins visual stacking order gets out of sync with X&apos;s.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1909052</commentid>
    <comment_count>4</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2020-02-11 21:29:39 +0000</bug_when>
    <thetext>https://phabricator.kde.org/D27333</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1909069</commentid>
    <comment_count>5</comment_count>
    <who name="Vlad Zahorodnii">vlad.zahorodnii</who>
    <bug_when>2020-02-11 22:37:42 +0000</bug_when>
    <thetext>Okay, I can reproduce it. Here&apos;s what I do

- Open two konsole windows
- Open sublime text by clicking on an icon in the task manager

- trigger pw and close the sublime text window

- Open sublime text again (after this step, the stacking order is messed up)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1909124</commentid>
    <comment_count>6</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2020-02-12 08:03:54 +0000</bug_when>
    <thetext>Git commit 3dbfa6a32545c9afd27bf8c1e86cba516b71d2a6 by David Edmundson.
Committed on 12/02/2020 at 08:03.
Pushed by davidedmundson into branch &apos;Plasma/5.18&apos;.

Return early if close button accepts input event

Summary:
Otherwise we close the effect whenever the close is pressed which is a
behavioural change.

That in turn leads to bigger bugs

Test Plan:
Ran effect
Clicked on the &quot;Whitespace&quot; of the dash
Clicked on the close

Now matches desktopgrid code

Reviewers: #kwin, zzag, ngraham

Reviewed By: #kwin, zzag, ngraham

Subscribers: ngraham, zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27333

M  +4    -0    effects/presentwindows/presentwindows.cpp

https://commits.kde.org/kwin/3dbfa6a32545c9afd27bf8c1e86cba516b71d2a6</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1910638</commentid>
    <comment_count>7</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2020-02-16 18:16:16 +0000</bug_when>
    <thetext>*** Bug 417715 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1911188</commentid>
    <comment_count>8</comment_count>
    <who name="David Edmundson">kde</who>
    <bug_when>2020-02-18 19:38:28 +0000</bug_when>
    <thetext>*** Bug 417840 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>