FIX: Close spectacle if it's started with: -b -c
ClosedPublic

Authored by aprcela on Aug 28 2019, 10:28 AM.

Details

Summary

Spectacle should close if both -b and -c are set

Preparation to fix this one:
CCBUG: 411263

Test Plan

start spectacle:
spectacle -b -c

Expected:

  1. Spectacle runs in background and the screenshot gets saved to clipboard
  2. Spectacle closes itself after the notification disappears (or has been closed by the user)

Observed:

  1. Spectacle runs in background and the screenshot gets saved to clipboard
  2. Spectacle never quits

Diff Detail

Repository
R166 Spectacle
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
aprcela created this revision.Aug 28 2019, 10:28 AM
Restricted Application added a project: Spectacle. · View Herald TranscriptAug 28 2019, 10:28 AM
Restricted Application added a subscriber: Spectacle. · View Herald Transcript
aprcela requested review of this revision.Aug 28 2019, 10:28 AM
aprcela edited the summary of this revision. (Show Details)Aug 28 2019, 10:33 AM
aprcela edited the test plan for this revision. (Show Details)
aprcela added a reviewer: davidre.
aprcela edited the test plan for this revision. (Show Details)
aprcela edited the summary of this revision. (Show Details)

Looking at this the connect should be outside the if instead of just adding it outside the if.
When I added this in c6ad1d6ae9291685b2767ab70bdeaaadb7783658 there was no if. I think that's because of the cherry-pick in 7f30ee858368695a10ebbe628aabf0ef688f60cf?

davidre retitled this revision from [spectacle] FIX: Close spectacle if it's started with: -b -c to FIX: Close spectacle if it's started with: -b -c.Aug 28 2019, 12:10 PM
davidre edited the summary of this revision. (Show Details)

Looking at this the connect should be outside the if instead of just adding it outside the if.
When I added this in c6ad1d6ae9291685b2767ab70bdeaaadb7783658 there was no if. I think that's because of the cherry-pick in 7f30ee858368695a10ebbe628aabf0ef688f60cf?

I see now, there was no if in c6ad1d6ae9291685b2767ab70bdeaaadb7783658 . The if got added with the check for if (!mCopySaveLocationToClipboard)...

Looking at it again, we could just delete the else and move the connect from L351 outside the if

aprcela updated this revision to Diff 64830.Aug 28 2019, 12:18 PM

Move connect outside of the else

davidre accepted this revision.Aug 28 2019, 1:19 PM
This revision is now accepted and ready to land.Aug 28 2019, 1:19 PM
This revision was automatically updated to reflect the committed changes.