tony / oxwm

Fixed merge conflicts. Browse files
tonybanters committed 2026-03-30 parent bc5f7a5 commit 8e047c5bf231eb0e7d92324066e21918872535f7
Showing 5 changed files with 13 additions and 7 deletions. UnifiedSplit
+3 −3 src/bar/bar.zig
@@ -77,10 +77,10 @@ pub const Bar = struct {
77 77
78 if (std.mem.eql(u8, config.bar_position, "top")) { 78 if (std.mem.eql(u8, config.bar_position, "top")) {
79 bar_y = monitor.mon_y; 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 } else if (std.mem.eql(u8, config.bar_position, "bottom")) { 81 } else if (std.mem.eql(u8, config.bar_position, "bottom")) {
82 - bar_y = monitor.mon_h - bar_height; 82 + bar_y = monitor.mon_y + monitor.mon_h - bar_height;
83 - monitor.mon_y = 0; 83 + monitor.win_y = monitor.mon_y;
84 } else { 84 } else {
85 return null; 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 fn luaSetLayout(state: ?*c.lua_State) callconv(.c) c_int { 1046 fn luaSetLayout(state: ?*c.lua_State) callconv(.c) c_int {
1047 const cfg = config orelse return 0; 1047 const cfg = config orelse return 0;
1048 const s = state orelse return 0; 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 if (dupeLuaString(s, 1)) |layout| { 1054 if (dupeLuaString(s, 1)) |layout| {
1050 cfg.layout = layout; 1055 cfg.layout = layout;
1051 } 1056 }
+1 −1 src/overlay.zig
@@ -172,7 +172,7 @@ pub const KeybindOverlay = struct {
172 if (self.display) |display| { 172 if (self.display) |display| {
173 _ = xlib.XUngrabKeyboard(display, xlib.CurrentTime); 173 _ = xlib.XUngrabKeyboard(display, xlib.CurrentTime);
174 if (self.window != 0) { 174 if (self.window != 0) {
175 - _ = xlib.c.XUnmapWindow(display, self.window); 175 + _ = xlib.XUnmapWindow(display, self.window);
176 } 176 }
177 } 177 }
178 self.visible = false; 178 self.visible = false;
+3 −3 src/wm/actions.zig
@@ -196,13 +196,13 @@ pub fn updateBarVisibility(monitor: *Monitor, wm: *WindowManager) void {
196 _ = xlib.XMapWindow(wm.display.handle, bar.window); 196 _ = xlib.XMapWindow(wm.display.handle, bar.window);
197 monitor.win_h -= bar.height; 197 monitor.win_h -= bar.height;
198 if (std.mem.eql(u8, wm.config.bar_position, "top")) { 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 } else { 201 } else {
202 - _ = xlib.c.XUnmapWindow(wm.display.handle, bar.window); 202 + _ = xlib.XUnmapWindow(wm.display.handle, bar.window);
203 monitor.win_h += bar.height; 203 monitor.win_h += bar.height;
204 if (std.mem.eql(u8, wm.config.bar_position, "top")) { 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 pub const XFree = c.XFree; 42 pub const XFree = c.XFree;
43 pub const XGetWindowAttributes = c.XGetWindowAttributes; 43 pub const XGetWindowAttributes = c.XGetWindowAttributes;
44 pub const XMapWindow = c.XMapWindow; 44 pub const XMapWindow = c.XMapWindow;
45 +pub const XUnmapWindow = c.XUnmapWindow;
45 pub const XConfigureWindow = c.XConfigureWindow; 46 pub const XConfigureWindow = c.XConfigureWindow;
46 pub const XSetInputFocus = c.XSetInputFocus; 47 pub const XSetInputFocus = c.XSetInputFocus;
47 pub const XRaiseWindow = c.XRaiseWindow; 48 pub const XRaiseWindow = c.XRaiseWindow;