Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request for comment, not for merging, home view redraw excess #616

Closed
wants to merge 1 commit into from

Conversation

quozl
Copy link
Contributor

@quozl quozl commented Nov 25, 2015

  • do not let the view children of the home window take focus; this prevents redraw, proving it is the focus change causing #4914.2,
  • but as a side effect focus is always in the search box, and the blinking cursor is a bother; it consumes power,
  • gtk-cursor-blink Gdk.Settings might help with the blinking cursor, but don't know how to set them, changing the gtk-widgets.css files did nothing,
  • perhaps a better solution may be to ensure there are no focus rectangles drawn by children of the home window,

Any ideas welcome.

@godiard
Copy link
Contributor

godiard commented Nov 25, 2015

@godiard
Copy link
Contributor

godiard commented Nov 25, 2015

I think this is a example of set a Gtk.Setting:

https://github.com/sugarlabs/sugar/blob/master/src/jarabe/main.py#L346

@samdroid-apps
Copy link
Contributor

Works great, seems to do it's job.

Can we remove some of the focus steeling code from the homeview not that you can't focus anything other than the search bar? (Or does that code only exsist in my mind?)

- do not let the view children of the home window take focus; this
  prevents redraw, proving it is the focus change causing #4914.2,

- as a side effect focus is always in the search box, so the blinking
  cursor is turned off,

However, breaks and makes harder any solution for two tickets:

https://bugs.sugarlabs.org/ticket/1969 (Keyboard navigability of the
Sugar UI) closed by Daniel Narvaez for being non-specific, and would
require visible focus rectangles to be restored.

https://bugs.sugarlabs.org/ticket/4891 (no journal accessibility keys)
which turns out to be mentioned already by 1969.
@quozl
Copy link
Contributor Author

quozl commented Nov 26, 2015

Force pushed for further review only.

@samdroid-apps, yes, there is some focus stealing code that could be removed, if we go with this.

@godiard, thanks, that fixes the blinking cursor, brings idle redraws to nothing.

I also extended the patch to exclude focus from the control panel scrolled window.

I'm still worried about keyboard focus accessibility. #1969 and #4891. Almost the opposite of this work. We would need to bring back a visible focus rectangle, accept the consequent redraws, and fix some of the problems. Our gtk-widgets.css makes any focus rectangle invisible. Gtk+ seems to redraw an entire widget when redrawing the focus rectangle, instead of splitting the drawing into segments.

After your next comments, it is probably time for me to post to sugar-devel@ to get other input.

@samdroid-apps
Copy link
Contributor

Yes the accessibility is an issue. But does the homeview have keyboard focus accessibility now? I speculate that making sugar work with keyboard focus would be a large task. I'm also going to speculate that we could just drop down a palette of search suggestions more easily than fixing the whole focus model 😄

I speculate that redrawing the entire widget on focus is always going to be needed - an entry looks very different focused vs unfocused.

@godiard
Copy link
Contributor

godiard commented Nov 26, 2015

@quozl, imho, accessibility in the home view is implemented with the search box. Keyboard navigation was never implemented and would be a non trivial task.

@quozl
Copy link
Contributor Author

quozl commented Nov 27, 2015

@godiard, using a shorter gtk-cursor-blink-timeout would increase redrawing and decrease battery run time. Thanks for the input, I'll fork.

@quozl quozl closed this Nov 27, 2015
@quozl quozl deleted the 4914-2-a branch November 27, 2015 01:30
@godiard
Copy link
Contributor

godiard commented Nov 27, 2015

@quozl, gtk_cursor_blink_timeout set "the time after which the cursor stops blinking, in seconds. The timer is reset after each user interaction." not how fast the cursor blinks.

@quozl
Copy link
Contributor Author

quozl commented Nov 27, 2015

@godiard, thanks, easily confused with gtk-cursor-blink-time which is duration of each blink. So this seems good;

settings.set_property('gtk-cursor-blink-timeout', 5)

and on XO-1 to manipulate perception of responsiveness

settings.set_property('gtk-cursor-blink-timeout', 5)
settings.set_property('gtk-cursor-blink-time', 500)

also found that turning off the blink can make me think there is a vertical bar character.

@godiard
Copy link
Contributor

godiard commented Nov 27, 2015

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants