Fixed merge conflicts.
Browse files
+3 −3 src/bar/bar.zig
| @@ -77,10 +77,10 @@ pub const Bar = struct { | ||
| 77 | 77 | |
| 78 | 78 | if (std.mem.eql(u8, config.bar_position, "top")) { |
| 79 | 79 | bar_y = monitor.mon_y; |
| 80 | - monitor.mon_y = monitor.mon_y + bar_height; | |
| 80 | + monitor.win_y = monitor.mon_y + bar_height; | |
| 81 | 81 | } else if (std.mem.eql(u8, config.bar_position, "bottom")) { |
| 82 | - bar_y = monitor.mon_h - bar_height; | |
| 83 | - monitor.mon_y = 0; | |
| 82 | + bar_y = monitor.mon_y + monitor.mon_h - bar_height; | |
| 83 | + monitor.win_y = monitor.mon_y; | |
| 84 | 84 | } else { |
| 85 | 85 | return null; |
| 86 | 86 | } |
+5 −0 src/config/lua.zig
| @@ -1046,6 +1046,11 @@ fn luaSetTerminal(state: ?*c.lua_State) callconv(.c) c_int { | ||
| 1046 | 1046 | fn luaSetLayout(state: ?*c.lua_State) callconv(.c) c_int { |
| 1047 | 1047 | const cfg = config orelse return 0; |
| 1048 | 1048 | const s = state orelse return 0; |
| 1049 | + const name = getStringArg(s, 1) orelse return 0; | |
| 1050 | + if (config_mod.Layouts.fromString(name) == null) { | |
| 1051 | + std.debug.print("set_layout: unknown layout '{s}'\n", .{name}); | |
| 1052 | + return 0; | |
| 1053 | + } | |
| 1049 | 1054 | if (dupeLuaString(s, 1)) |layout| { |
| 1050 | 1055 | cfg.layout = layout; |
| 1051 | 1056 | } |
+1 −1 src/overlay.zig
| @@ -172,7 +172,7 @@ pub const KeybindOverlay = struct { | ||
| 172 | 172 | if (self.display) |display| { |
| 173 | 173 | _ = xlib.XUngrabKeyboard(display, xlib.CurrentTime); |
| 174 | 174 | if (self.window != 0) { |
| 175 | - _ = xlib.c.XUnmapWindow(display, self.window); | |
| 175 | + _ = xlib.XUnmapWindow(display, self.window); | |
| 176 | 176 | } |
| 177 | 177 | } |
| 178 | 178 | self.visible = false; |
+3 −3 src/wm/actions.zig
| @@ -196,13 +196,13 @@ pub fn updateBarVisibility(monitor: *Monitor, wm: *WindowManager) void { | ||
| 196 | 196 | _ = xlib.XMapWindow(wm.display.handle, bar.window); |
| 197 | 197 | monitor.win_h -= bar.height; |
| 198 | 198 | if (std.mem.eql(u8, wm.config.bar_position, "top")) { |
| 199 | - monitor.mon_y += bar.height; | |
| 199 | + monitor.win_y += bar.height; | |
| 200 | 200 | } |
| 201 | 201 | } else { |
| 202 | - _ = xlib.c.XUnmapWindow(wm.display.handle, bar.window); | |
| 202 | + _ = xlib.XUnmapWindow(wm.display.handle, bar.window); | |
| 203 | 203 | monitor.win_h += bar.height; |
| 204 | 204 | if (std.mem.eql(u8, wm.config.bar_position, "top")) { |
| 205 | - monitor.mon_y -= bar.height; | |
| 205 | + monitor.win_y -= bar.height; | |
| 206 | 206 | } |
| 207 | 207 | } |
| 208 | 208 | } |
+1 −0 src/x11/xlib.zig
| @@ -42,6 +42,7 @@ pub const XQueryTree = c.XQueryTree; | ||
| 42 | 42 | pub const XFree = c.XFree; |
| 43 | 43 | pub const XGetWindowAttributes = c.XGetWindowAttributes; |
| 44 | 44 | pub const XMapWindow = c.XMapWindow; |
| 45 | +pub const XUnmapWindow = c.XUnmapWindow; | |
| 45 | 46 | pub const XConfigureWindow = c.XConfigureWindow; |
| 46 | 47 | pub const XSetInputFocus = c.XSetInputFocus; |
| 47 | 48 | pub const XRaiseWindow = c.XRaiseWindow; |