After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 734890 - Numbers move around when moving with arrow keys
Numbers move around when moving with arrow keys
Status: RESOLVED FIXED
Product: gnome-sudoku
Classification: Applications
Component: general
3.13.x
Other Linux
: Normal blocker
: ---
Assigned To: gnome-sudoku-maint
gnome-sudoku-maint
Depends on:
Blocks:
 
 
Reported: 2014-08-16 01:23 UTC by Michael Catanzaro
Modified: 2014-08-17 22:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screencast (134.73 KB, application/octet-stream)
2014-08-16 01:23 UTC, Michael Catanzaro
  Details
Remove cairo_update_layout() call of a filled cell on draw (904 bytes, patch)
2014-08-17 21:19 UTC, Parin Porecha
committed Details | Review

Description Michael Catanzaro 2014-08-16 01:23:34 UTC
Created attachment 283574 [details]
screencast

This looks pretty bad :(

(Something to worry about after GSoC.)
Comment 1 Parin Porecha 2014-08-17 21:19:45 UTC
Created attachment 283687 [details] [review]
Remove cairo_update_layout() call of a filled cell on draw

I've removed the call to cairo_update_layout() of a filled cell's pango layout during the drawing of the cell.

If you notice the dancing closely, you'd find that it does not happen to the fixed cells AND the cells which were already filled on startup (i.e. - the saved ones). This happens only to the cells whose values change, and it also happens with selecting other cells with mouse click.

A number filled in a cell looked like it was dancing because the cell's pango layout height changed on focusing on a different cell, and since we saved it by updating that cell's private context on every redraw, it got passed on and the number's height had to be adjusted to deal with the change.
Please note that this is just my explanation based on the debugging I did for this, and it maybe wrong. But, yes removing the update_layout call fixes this bug.

There's also this old thread (might not be relevant anymore) related to cairo_update_layout() - https://mail.gnome.org/archives/gtk-i18n-list/2008-October/msg00019.html
Comment 2 Michael Catanzaro 2014-08-17 22:08:55 UTC
Review of attachment 283687 [details] [review]:

That looks like it was probably a lot harder than the size of the patch indicates. ;)
Comment 3 Parin Porecha 2014-08-17 22:16:26 UTC
Comment on attachment 283687 [details] [review]
Remove cairo_update_layout() call of a filled cell on draw

Pushed as eee5c4.
Comment 4 Parin Porecha 2014-08-17 22:17:24 UTC
Yeah, this was one of the bugs where you can't believe that it'd have a one-line fix.