river-status: send view_tags on view map/unmap

This commit is contained in:
Isaac Freund 2020-06-05 00:02:55 +02:00
parent 35ceb08e1e
commit a63fb461ba
No known key found for this signature in database
GPG key ID: 86DED400DDFD7A11
3 changed files with 10 additions and 4 deletions

View file

@ -180,6 +180,11 @@ pub fn getRenderer(self: Self) *c.wlr_renderer {
return c.river_wlr_backend_get_renderer(self.wlr_output.backend);
}
pub fn sendViewTags(self: Self) void {
var it = self.status_trackers.first;
while (it) |node| : (it = node.next) node.data.sendViewTags();
}
const MasterPosition = enum {
Top,
Right,

View file

@ -246,10 +246,7 @@ fn commitTransaction(self: *Self) void {
view.dropStashedBuffer();
}
if (view_tags_changed) {
var it = output.status_trackers.first;
while (it) |node| : (it = node.next) node.data.sendViewTags();
}
if (view_tags_changed) output.sendViewTags();
}
// Iterate over all seats and update focus

View file

@ -248,6 +248,8 @@ pub fn map(self: *Self) void {
c.wlr_surface_send_enter(self.wlr_surface.?, self.output.wlr_output);
self.output.sendViewTags();
root.arrange();
}
@ -268,6 +270,8 @@ pub fn unmap(self: *Self) void {
const node = @fieldParentPtr(ViewStack(Self).Node, "view", self);
self.output.views.remove(node);
self.output.sendViewTags();
root.arrange();
}