Opened 10 years ago

Closed 10 years ago

Last modified 21 months ago

#2239 closed enhancement (wontfix)

need notify callback when switching from activity to home

Reported by: erikb Owned by: marco
Priority: normal Milestone:
Component: sugar Version:
Keywords: Cc: olpc-dev@…, Eben, marco, arjs
Blocked By: Blocking:
Deployments affected: Action Needed:
Verified: no


Related to #2026...

Need to be notified when switching to/from the Home zoom level.

(b/c we need to be able to turn off the camera).

Would be nice to have this callback be the same as notify::active.

Change History (5)

comment:1 Changed 10 years ago by jg

  • Milestone changed from Untriaged to Trial-2


You are better off using the standard ICCCM/EWMH specifications for notifications of whether you are visible.

A long term goal is for sugar activities to also be easily usable on standard desktops, and reinventing a wheel like this, when we have a perfectly good wheel at hand that requires no sugar dependence, is foolish.

comment:2 Changed 10 years ago by jg

  • Cc Eben marco added
  • Milestone changed from Trial-2 to Trial-3

The suggestion is also worthwhile, but not right now.

Eben, could you please get into the HIG the fact that visibility can be figured out via the standard X mechanisms, and that applications not visible should usually not be consuming cycles or other resources.

This should also get into sugar documentation.

comment:3 Changed 10 years ago by marco

  • Resolution set to wontfix
  • Status changed from new to closed

I don't think Sugar should provide API for this. I think in general activities should just use the active property to disable sound etc.

If active doesn't work for the camera activity then it's probably a side case. And as jg suggest you can use wm hints to figure this out. We ship python bindings for wnck on the images which provide easy access to those.

I haven't looked in it carefully but a way to do it would be to iterate the windows stack, filter out not NORMAL windows, and verify if the activity window is at the top of the stack (by comparing xid). Obviously you will also need to listen for windows stack changes.

comment:4 Changed 9 years ago by arjs

  • Cc arjs added

I'd just like to add that it'd be great for this notification to have from the point of Measure Activity too, since Measure uses a lot of CPU (Cairo drawing etc) and slows down opening of other activities.

Only when another activity becomes active, does Measure get to know that it needs to release resources. This slows down opening of other activities

comment:5 Changed 21 months ago by Quozl

  • Milestone Trial-3 deleted

Milestone Trial-3 deleted

Note: See TracTickets for help on using tickets.