<?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>450001</bug_id>
          
          <creation_ts>2022-02-11 11:29:57 +0000</creation_ts>
          <short_desc>Spectacle closes when a notification generated by it disappears</short_desc>
          <delta_ts>2023-03-11 04:03:28 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>Spectacle</product>
          <component>General</component>
          <version>22.12.1</version>
          <rep_platform>Arch Linux</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>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Silva">bugseforuns</reporter>
          <assigned_to name="Boudhayan Gupta">me</assigned_to>
          <cc>kde</cc>
    
    <cc>nate</cc>
          
          <cf_commitlink>https://invent.kde.org/graphics/spectacle/commit/fc2d625144536b53e5f3e671341b4a5651857cf2</cf_commitlink>
          <cf_versionfixedin>23.04</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2103303</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Silva">bugseforuns</who>
    <bug_when>2022-02-11 11:29:57 +0000</bug_when>
    <thetext>SUMMARY
Can reproduce on both X11 and Wayland sessions.

STEPS TO REPRODUCE
1. open Spectacle by pressing printscreen key
2. make sure &apos;Quit after manual Save or Copy&apos; option is checked
3. save the screenshot (Spectacle closes and Plasma shows a notification)
4. open Spectacle again while the notification is visible
5. wait for the notification to disappear

OBSERVED RESULT
Spectacle closes when the notification disappears

EXPECTED RESULT
Spectacle remains open when the notification disappears

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.24.80
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.3
Graphics Platform: Wayland</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2213557</commentid>
    <comment_count>1</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2023-03-03 09:09:27 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/graphics/spectacle/-/merge_requests/210</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2213919</commentid>
    <comment_count>2</comment_count>
    <who name="Noah Davis">noahadvs</who>
    <bug_when>2023-03-05 01:19:01 +0000</bug_when>
    <thetext>Git commit fc2d625144536b53e5f3e671341b4a5651857cf2 by Noah Davis.
Committed on 04/03/2023 at 18:24.
Pushed by ndavis into branch &apos;master&apos;.

Use QEventLoopLocker to keep Spectacle alive for notifications

Stopped using setQuitOnLastWindowClosed(false) because setting it true
or false depending on the situation was too complex. Now we just create
a QEventLoopLocker when we make a notification and destroy the event
loop locker, which also automatically quits the application, when the
notification is destroyed. To close the windows, we use
SpectacleWindow::closeAll() instead of making them hidden. This
automatically closes Spectacle when the QEventLoopLocker has not been
created.
Related: bug 466143

M  +12   -8    src/Gui/SpectacleWindow.cpp
M  +5    -0    src/Gui/SpectacleWindow.h
M  +6    -17   src/SpectacleCore.cpp
M  +1    -0    src/SpectacleCore.h

https://invent.kde.org/graphics/spectacle/commit/fc2d625144536b53e5f3e671341b4a5651857cf2</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>