aboutsummaryrefslogtreecommitdiff
path: root/src/root.zig
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-04-01 19:39:36 +0200
committerIsaac Freund <ifreund@ifreund.xyz>2020-04-01 19:39:36 +0200
commit26a5aaca69fecbf818d247fc7d838d7482431f20 (patch)
treefca3dc67016eac5cd660cd6d6b5be864d0cf31c9 /src/root.zig
parent42d454b26f44b7eea45b46e1b70d3e19e05489f9 (diff)
downloadriver-26a5aaca69fecbf818d247fc7d838d7482431f20.tar.gz
river-26a5aaca69fecbf818d247fc7d838d7482431f20.tar.xz
Implement switching between single tags
Diffstat (limited to 'src/root.zig')
-rw-r--r--src/root.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/root.zig b/src/root.zig
index e19f3f4..bddee87 100644
--- a/src/root.zig
+++ b/src/root.zig
@@ -2,6 +2,7 @@ const std = @import("std");
const c = @import("c.zig");
const util = @import("util.zig");
+const Log = @import("log.zig").Log;
const Output = @import("output.zig").Output;
const Server = @import("server.zig").Server;
const Seat = @import("seat.zig").Seat;
@@ -171,10 +172,6 @@ pub const Root = struct {
const visible_count = self.visibleCount(tags);
- if (visible_count == 0) {
- return;
- }
-
const master_count = util.min(u32, self.master_count, visible_count);
const slave_count = if (master_count >= visible_count) 0 else visible_count - master_count;
@@ -284,6 +281,8 @@ pub const Root = struct {
if (c.wl_event_source_timer_update(self.transaction_timer, 200) == -1) {
// TODO: handle failure
}
+ } else {
+ self.commitTransaction();
}
}
@@ -315,6 +314,7 @@ pub const Root = struct {
// If there were pending focused tags, make them the current focus
if (self.pending_focused_tags) |tags| {
+ Log.Debug.log("changing current focus: {b:0>10} to {b:0>10}\n", .{ self.current_focused_tags, tags });
self.current_focused_tags = tags;
self.pending_focused_tags = null;
}