Opened 10 years ago

Closed 10 years ago

Last modified 6 years ago

#1102 closed enhancement (fixed)

Make the unfullscreen go away after a timeout

Reported by: sayamindu Owned by: erikos
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Sugar Version: Git as of bugdate
Severity: Unspecified Keywords: r+
Cc: eben, garycmartin Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

The unfullscreen button should go away after a timeout, and should reappear on pointer movement.

Ref: http://lists.sugarlabs.org/archive/sugar-devel/2009-July/017045.html

Attachments (2)

dslo1102.patch (3.8 KB) - added by sayamindu 10 years ago.
Patch to implement the behaviour. The unfullscreen button disappears after a 2 second timeout.
dslo1102_2.patch (3.8 KB) - added by sayamindu 10 years ago.
Revised patch

Download all attachments as: .zip

Change History (8)

Changed 10 years ago by sayamindu

Patch to implement the behaviour. The unfullscreen button disappears after a 2 second timeout.

comment:1 Changed 10 years ago by tomeu

  • Keywords r- added
UNFULLSCREEN_BUTTON_VISIBILITY_TIMEOUT = 2

Please prepend with _ if it isn't meant to be used out this module.

        events = self._event_box.get_events() 
	        self._event_box.set_events(events | gtk.gdk.POINTER_MOTION_MASK | \ 
	            gtk.gdk.POINTER_MOTION_HINT_MASK) 

Better use add_events()?

                if self._unfullscreen_button_timeout_id: 

Better use "is not None" (see PEP 8 for rationale).

                gobject.timeout_add_seconds(UNFULLSCREEN_BUTTON_VISIBILITY_TIMEOUT, \

Not setting self._unfullscreen_button_timeout_id anywhere?

    def __motion_notify_cb(self, widget, event): 

I'm a (small) bit concerned about doing so much stuff at every motion event, any idea about how to reduce further the amount of work done at every motion event when in fullscreen?

    def _unfullscreen_button_timeout_cb(self): 

Shouldn't we set self._unfullscreen_button_timeout_id to None here?

And please remember to set the r? flag so it doesn't get lost so easily.

Changed 10 years ago by sayamindu

Revised patch

comment:2 Changed 10 years ago by sayamindu

  • Keywords r? added; r- removed

The second patch addresses all the issues. As for motion_notify_cb, I'm not sure, but as per my reading of http://library.gnome.org/devel/gdk/stable/gdk-Events.html#GdkEventMask, I think gtk.gdk.POINTER_MOTION_HINT_MASK would ensure that only motion hints are delivered, and not all motion that occurs.

comment:3 follow-ups: Changed 10 years ago by sascha_silbe

While having it disappear at all is a good start (and sufficient for activities like Read), I don't like it reappearing on every pointer movement. Fullscreen mode is useful is pointer-using activities as well (e.g. Browse - you need the pointer to follow links).

comment:4 in reply to: ↑ 3 Changed 10 years ago by tomeu

  • Cc eben garycmartin added
  • Keywords r+ added; r? removed
  • Resolution set to fixed
  • Status changed from new to closed

Replying to sascha_silbe:

While having it disappear at all is a good start (and sufficient for activities like Read), I don't like it reappearing on every pointer movement. Fullscreen mode is useful is pointer-using activities as well (e.g. Browse - you need the pointer to follow links).

Any idea about what would be more appropriate for activities like Browse?

I think we can apply the patch as-is for now, please enter another ticket if there's any further work we need to do on this.

comment:5 in reply to: ↑ 3 Changed 10 years ago by garycmartin

Replying to sascha_silbe:

While having it disappear at all is a good start (and sufficient for activities like Read), I don't like it reappearing on every pointer movement. Fullscreen mode is useful is pointer-using activities as well (e.g. Browse - you need the pointer to follow links).

I think kids would get stuck in fullscreen mode and not know how to get out, actually I know a few adults who would get stuck as well ;-)

comment:6 Changed 6 years ago by dnarvaez

  • Component changed from sugar-toolkit to Sugar
Note: See TracTickets for help on using tickets.