A lot of our calculations only change based on (unlikely) external
events, simply cache those parts and only update when the underlying
properties actually change.
Notable is base_direction, which was previously being calculated
repeatedly per workspace per monitor on every interpolate — now it's
simply a private int.
This seriously cuts down the number of calls, vs just maths, we need to
do at each step including eliminating a repeated `g_object_get` in favour
of a gboolean flag.
This commit does a fairly 1:1 port of the objects methods, leaving the
constructor in JS land, with the goal of cutting down on the time spent
in `_interpolateProgress` (which has been sufficient to drop frames)
d383f4a...
by
Sebastian Wick <email address hidden>
shell-app: Make recent all app windows on the target workspace
meta_window_raise_and_make_recent_on_workspace now works on a target
workspace instead of the active workspace. We call this before another
workspace is made active so the previous behavior made the window the
MRU window on the wrong workspace. If an app got activated and one
window closed, the stacking and focus diverged.
(cherry picked from commit acf5593bf86fc7c9ca015bada2535978c3007b13)
23bcff3...
by
Sebastian Keller <email address hidden>
calendar: Emit selected-date-changed before rebuilding the calendar
If the cursor was placed on one of the widgets that get removed when
rebuilding the calendar due to a month change, destroying the hovered
widget will trigger a repick. This repick can then trigger an allocation
while not all buttons of the calendar are present.
If the last allocation before selected-date-changed is emitted was from
such an incomplete state, DateMenuButton will still freeze the layout in
this state in its signal handler.
What freezing the layout in DateMenuButton is supposed to do is to
prevent size changes of the menu when changing days, but for this the
layout needs to be frozen before potentially rebuilding calendar. This
change ensures that by emitting the signal earlier.