seat: always add view to focus stack on map

Currently if a view is mapped while some other view is fullscreen, it
will not be added to the focus stack, which means that if the fullscreen
view is then closed the view which was not added to the focus stack will
not be focused.

To fix this, always add views to the focus stack on map.
This commit is contained in:
Isaac Freund
2021-08-10 21:54:36 +02:00
parent e752555969
commit 1baf3bf462
5 changed files with 31 additions and 41 deletions

View File

@ -161,15 +161,6 @@ pub fn defaultSeat(self: Self) *Seat {
return &self.seats.first.?.data;
}
/// Must be called whenever a view is unmapped.
pub fn handleViewUnmap(self: Self, view: *View) void {
var it = self.seats.first;
while (it) |node| : (it = node.next) {
const seat = &node.data;
seat.handleViewUnmap(view);
}
}
/// Returns true if input is currently allowed on the passed surface.
pub fn inputAllowed(self: Self, wlr_surface: *wlr.Surface) bool {
return if (self.exclusive_client) |exclusive_client|