Ticket #2239 (closed enhancement: wontfix)

Opened 7 years ago

Last modified 7 years ago

need notify callback when switching from activity to home

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

Description

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

Changed 7 years ago by jg

  • milestone changed from Untriaged to Trial-2

Eric,

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.

Changed 7 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.

Changed 7 years ago by marco

  • status changed from new to closed
  • resolution set to wontfix

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.

Changed 7 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

Note: See TracTickets for help on using tickets.