Comment 4 for bug 677577

Neil J. Patel (njpatel) wrote :

This could be done in src/BamfLauncherIcon.cpp::OnMouseClick() by first copying the list of children returned by bamf_view_get_children earlier in the function, and then sorting the list by using g_list_sort and using the bamf_window_get_last_active (you only care if the child is a BamfWindow). By sorting the list, both the window spread/scale and the raising of the windows would be done in the correct order, so the most recently used window is at the top.

Be careful not to sort the actual GList returned by get_children, it's internal to bamf, and hence we need to make a copy.