#2954 HIGH Opportu: Cursor should hide in handheld mode
Zarro Boogs per Child
bugtracker at laptop.org
Wed Feb 13 16:40:05 EST 2008
#2954: Cursor should hide in handheld mode
--------------------------+-------------------------------------------------
Reporter: Eben | Owner: marco
Type: enhancement | Status: new
Priority: high | Milestone: Opportunity
Component: sugar | Version:
Resolution: | Keywords:
Verified: 0 | Blocking:
Blockedby: |
--------------------------+-------------------------------------------------
Comment(by mtd):
Sure, it'd be an easy enhancement, IIUC. You just want the additional two
steps 1d) and 2d) below:
1a) normal mode; each activity connect()ed to ebook switch HAL signal
1b) ebook switch hal event happens
1c) active activity fullscreen()s itself
1d) set cursor to invisible xpm
1e) create 1x1 gtk.Window at xmax-2, ymax-2
1f) warp pointer to xmax-2, ymax-2
...time passes...
2a) ebook switch hal event happens
2b) active activity unfullscreen()s itself
2c) warp pointer to original location
2d) destroy 1x1 gtk.Window
2f) set cursor to original xpm
Do you think it's worth creating that 1x1 window at all? I can imagine
it's good insurance against enter()/leave()ing any widgets in the
activity, but I'm not sure what window hints I should declare on it, or
what its parent should be, or anything. Any tips would be appreciated.
I'll have a go tomorrow GMT morning.
Martin
PS - (yes, I know, I just wrote about 5x as many lines of text as lines of
code your suggestion would probably take :))
PPS - re: unclutter: <shrug>. For the short term, my patch is available
now, too :). Before I pared this patch down I had the whole hide-on-
certain-keys (think PgUp, PgDn, etc.) and unhide-on-mouse/keyboard/etc.
coded, with the only problem being it was about 1/3 more lines and I got
lots of seemingly-spurious POINTER_MOVE events from Read's
ScrolledWindow...so I omitted that code from the patch. 1/3 more lines,
almost all isolated in cursor.py, not in the/each activity.py, and where
original LOC =~ 200, seems a good tradeoff rather than another process and
memory/packaging/security burden. Of course if the problem was totally
solved in the way you wanted it, then sure (why should olpc maintain more
code?). Anyway I'll stop talking and look forward to feedback and
incorporating your suggestion.
PPS - alright, I couldn't resist scanning unclutter.c before hitting the
submit button. Boy, it's got a lot more to worry about than an activity
does because it tries to disturb the current window & window manager. One
low-level advantage my patch has is that as it's activity.py kicking all
this off, it's easy (to add the ability) for each activity to
disable/control this behavior if required, but the normal case (hide
cursor) is handled most naturally. Another advantage I/we have is we
don't have to tip-toe around any window manager bar matchbox :).
--
Ticket URL: <http://dev.laptop.org/ticket/2954#comment:13>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system
More information about the Bugs
mailing list