GNOME Bugzilla – Bug 729979
calendar: Factor out event highlighting
Last modified: 2021-07-05 14:23:15 UTC
Commit e117aa529784 introduced some looping, resulting in rebuilding the calendar twice: Calendar._rebuildCalendar() did rebuild the calendar days, then requested the range of events from the Calendar._eventSource for the visible days. The event source would then in turn emit the 'changed' signal, which had been connected to the Calendar._rebuildCalendar() yet again. This patch changes _rebuildCalendar() to no longer set the 'calendar-day-with-events' style class, but still request the range from the event source when the rebuilding has been done. The 'changed' signal of the event source is now connected to the new _highlightEvents() method which takes care of setting the style class according to the event source, without rebuilding the calendar days again. From a user's point of view this fixes again (originally fixed in commit 257e1f3096b3) the loss of keyboard focus when rebuilding the calendar after clicking on a day outside of the currently shown month.
Created attachment 276351 [details] [review] calendar: Factor out event highlighting
Created attachment 276352 [details] [review] Added one more safty check
Patch still applies cleanly.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/ Thank you for your understanding and your help.