Opened 14 years ago

Closed 11 years ago

#2413 closed defect (invalid)

Hovering over the new activity toolbar activity icon so that sub toolbar appears triggers focus_out_event

Reported by: garycmartin Owned by: tomeu
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Sugar Version: Unspecified
Severity: Unspecified Keywords: new-toolbar focus-out-event
Cc: alsroot, erikos Distribution/OS: Unspecified
Bug Status: Unconfirmed


Hovering over the new activity toolbar activity icon so that the sub toolbar appears triggers a gtk+ focus_out_event. Clicking the activity toolbar icon to lock open the same toolbar does not generate the event.

This causes problems for Activities that want to free up resources when they are switched to the background. Memorize currently uses this to pause audio playback when it is not front most, and a new version of Physics will use this event to pause the simulation to free up cpu usage when it is in the background.

Change History (3)

comment:1 Changed 14 years ago by garycmartin

I decided to keep poking at this for Physics and there does seem to be an activity level fix. As per a long, long lost email from Tomeu (thanks Tomeu, only took me two years to re-investigate and take action). I'm connecting a callback to the visibility-notify-event and then testing if data.state == gtk.gdk.VISIBILITY_FULLY_OBSCURED. Took me ages to track this down, but seems to be working a treat, I'm about to test outside of my VM dev environment and onto an XO-1:

Simon: might also be what you want to do in Memorize for freeing up sound resources, fixing the event issue at the Sugar level may take some time.

comment:2 Changed 14 years ago by alsroot

Tried to reproduce the issue in my env (gtk+ 2.20.1).
It works as assumed, ie, palette popping up sends focus_out_event event but closing this palette (w/ and w/o locking sub tool bar) sends focus_in_event as well.

comment:3 Changed 11 years ago by dnarvaez

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

Sounds like this can be fixed in activities after all.

Note: See TracTickets for help on using tickets.