| Summary: | Should watch UPower AboutToSleep signal | ||
|---|---|---|---|
| Product: | Telepathy | Reporter: | Guillaume Desmottes <guillaume.desmottes> |
| Component: | mission-control | Assignee: | Telepathy bugs list <telepathy-bugs> |
| Status: | RESOLVED FIXED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
| Severity: | enhancement | ||
| Priority: | medium | Keywords: | patch |
| Version: | unspecified | ||
| Hardware: | Other | ||
| OS: | All | ||
| URL: | http://cgit.collabora.com/git/user/wjt/telepathy-mission-control-wjt.git/log/?h=upower | ||
| Whiteboard: | r+ | ||
| i915 platform: | i915 features: | ||
| Bug Depends on: | 38978 | ||
| Bug Blocks: | |||
|
Description
Guillaume Desmottes
2010-06-03 07:52:32 UTC
See also bug #40131 which is about using a similar signal with network changes. Well. I think this branch works given a quick smoke test. I'll try it harder after lunch! Why G_CONNECT_AFTER? (In reply to comment #3) > Why G_CONNECT_AFTER? No good reason. Branch updated! (It still depends on bug 38978, of course.) Maybe we should factor out this code: + g_signal_emit (self, signals[STATE_CHANGE], 0, + priv->connected && priv->awake); Especially, you check if priv->awake actually changed before firing this signal, but if priv->connected is still FALSE, you actually didn't change the state. The opposite is probably true as well: connected changing but awake being FALSE. (In reply to comment #5) > Maybe we should factor out this code: > + g_signal_emit (self, signals[STATE_CHANGE], 0, > + priv->connected && priv->awake); > > Especially, you check if priv->awake actually changed before firing this > signal, but if priv->connected is still FALSE, you actually didn't change the > state. > > The opposite is probably true as well: connected changing but awake being > FALSE. Right you are. I've pushed a patch that addresses this. Looks good! Go go merge and the original bug, initally opened by Daf on 2008-08-27 will be finally closed. :) It is merged! The feature will be in MC 5.9.3. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.