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

Authored by aprcela on Wed, Aug 28, 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.Wed, Aug 28, 10:28 AM
Restricted Application added a project: Spectacle. · View Herald TranscriptWed, Aug 28, 10:28 AM
Restricted Application added a subscriber: Spectacle. · View Herald Transcript
aprcela requested review of this revision.Wed, Aug 28, 10:28 AM
aprcela edited the summary of this revision. (Show Details)Wed, Aug 28, 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.Wed, Aug 28, 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.Wed, Aug 28, 12:18 PM

Move connect outside of the else

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