diff options
author | Grant Paul <chpwn@chpwn.com> | 2010-11-07 00:53:00 -0700 |
---|---|---|
committer | Grant Paul <chpwn@chpwn.com> | 2010-11-07 00:53:00 -0700 |
commit | 262afe117c7f0275e5aed81c880f544bd3b7e7a4 (patch) | |
tree | 7d66d2f56fc5dcab4837d249d4b82132100a2656 /MobileCydia.mm | |
parent | f361c04311261daab1b9342b1a17643f34093c75 (diff) |
Use external status API to get the status. But internally.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 6999f0a..dd645d9 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -8439,9 +8439,16 @@ static _finline void _setHomePage(Cydia *self) { } - (void) applicationSuspend:(__GSEvent *)event { - // FIXME: This needs to be fixed, but we no longer have a progress_. - // What's the best solution? - if (hud_ == nil)// && ![progress_ isRunning]) + // Use external process status API internally. + // This is probably a really bad idea. + uint64_t status = 0; + int notify_token; + if (notify_register_check("com.saurik.Cydia.status", ¬ify_token) == NOTIFY_STATUS_OK) { + notify_get_state(notify_token, &status); + notify_cancel(notify_token); + } + + if (hud_ == nil && status == 0) [super applicationSuspend:event]; } |