view: avoid raising same view over and over

Since view_move_to_front() now does more work than it used to
(updating XWayland server stacking order), try to avoid doing that
work unnecessarily.
This commit is contained in:
John Lindgren 2023-10-21 11:28:00 -04:00 committed by Johan Malm
parent 0ddf3c43ad
commit db591d1400
3 changed files with 31 additions and 4 deletions

View file

@ -238,12 +238,17 @@ struct server {
struct wlr_box grab_box;
uint32_t resize_edges;
/* SSD state */
/*
* Currently focused view. Updated with each "focus change"
* event. This view is drawn with "active" SSD coloring.
*/
struct view *focused_view;
/*
* Most recently raised view. Used to avoid unnecessarily
* raising the same view over and over.
*/
struct view *last_raised_view;
struct ssd_hover_state *ssd_hover_state;
/* Tree for all non-layer xdg/xwayland-shell surfaces */