summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorGrant Paul <chpwn@chpwn.com>2010-11-07 00:53:00 -0700
committerGrant Paul <chpwn@chpwn.com>2010-11-07 00:53:00 -0700
commit262afe117c7f0275e5aed81c880f544bd3b7e7a4 (patch)
tree7d66d2f56fc5dcab4837d249d4b82132100a2656 /MobileCydia.mm
parentf361c04311261daab1b9342b1a17643f34093c75 (diff)
Use external status API to get the status. But internally.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm13
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", &notify_token) == NOTIFY_STATUS_OK) {
+ notify_get_state(notify_token, &status);
+ notify_cancel(notify_token);
+ }
+
+ if (hud_ == nil && status == 0)
[super applicationSuspend:event];
}