tony / oxwm

ignored fullscreen clients' configure requests, answered wm_change_state with normal state, republished net_wm_state after state requests and rechecked fullscreen rules on title change Browse files
tonybanters committed 2026-10-06 parent 67e1141 commit 3daf04179f31b4d810e4df1c84777e13fd47a2b5
Showing 1 changed file with 10 additions and 2 deletions. UnifiedSplit
+10 −2 src/wm/handlers.zig
@@ -74,6 +74,10 @@ fn handleConfigureRequest(event: *xlib.XConfigureRequestEvent, wm: *WindowManage
74 const client = client_mod.windowToClient(wm.monitors, event.window); 74 const client = client_mod.windowToClient(wm.monitors, event.window);
75 75
76 if (client) |managed_client| { 76 if (client) |managed_client| {
77 + if (managed_client.is_fullscreen) {
78 + tiling.sendConfigure(managed_client);
79 + return;
80 + }
77 if ((event.value_mask & xlib.c.CWBorderWidth) != 0) { 81 if ((event.value_mask & xlib.c.CWBorderWidth) != 0) {
78 managed_client.border_width = event.border_width; 82 managed_client.border_width = event.border_width;
79 } else if (managed_client.is_floating or (managed_client.monitor != null and managed_client.monitor.?.lt[managed_client.monitor.?.sel_lt] == null)) { 83 } else if (managed_client.is_floating or (managed_client.monitor != null and managed_client.monitor.?.lt[managed_client.monitor.?.sel_lt] == null)) {
@@ -318,6 +322,9 @@ fn handleClientMessage(event: *xlib.XClientMessageEvent, wm: *WindowManager) voi
318 core.setFullscreen(client, !client.is_fullscreen, wm); 322 core.setFullscreen(client, !client.is_fullscreen, wm);
319 } 323 }
320 } 324 }
325 + core.publishNetWmState(client, wm);
326 + } else if (event.message_type == wm.atoms.wm_change_state) {
327 + core.setClientState(client, core.NormalState, wm);
321 } else if (event.message_type == wm.atoms.net_active_window) { 328 } else if (event.message_type == wm.atoms.net_active_window) {
322 const selected = wm.selected_monitor orelse return; 329 const selected = wm.selected_monitor orelse return;
323 if (client != selected.sel and !client.is_urgent) { 330 if (client != selected.sel and !client.is_urgent) {
@@ -336,7 +343,7 @@ fn handleDestroyNotify(event: *xlib.XDestroyWindowEvent, wm: *WindowManager) voi
336 343
337 const client = client_mod.windowToClient(wm.monitors, event.window) orelse return; 344 const client = client_mod.windowToClient(wm.monitors, event.window) orelse return;
338 std.debug.print("destroy_notify: window=0x{x}\n", .{event.window}); 345 std.debug.print("destroy_notify: window=0x{x}\n", .{event.window});
339 - core.unmanage(client, wm); 346 + core.unmanage(client, true, wm);
340 } 347 }
341 348
342 fn handleUnmapNotify(event: *xlib.XUnmapEvent, wm: *WindowManager) void { 349 fn handleUnmapNotify(event: *xlib.XUnmapEvent, wm: *WindowManager) void {
@@ -349,7 +356,7 @@ fn handleUnmapNotify(event: *xlib.XUnmapEvent, wm: *WindowManager) void {
349 356
350 const client = client_mod.windowToClient(wm.monitors, event.window) orelse return; 357 const client = client_mod.windowToClient(wm.monitors, event.window) orelse return;
351 std.debug.print("unmap_notify: window=0x{x}\n", .{event.window}); 358 std.debug.print("unmap_notify: window=0x{x}\n", .{event.window});
352 - core.unmanage(client, wm); 359 + core.unmanage(client, false, wm);
353 } 360 }
354 361
355 fn handleEnterNotify(event: *xlib.XCrossingEvent, wm: *WindowManager) void { 362 fn handleEnterNotify(event: *xlib.XCrossingEvent, wm: *WindowManager) void {
@@ -430,6 +437,7 @@ fn handlePropertyNotify(event: *xlib.XPropertyEvent, wm: *WindowManager) void {
430 wm.invalidateBars(); 437 wm.invalidateBars();
431 } else if (event.atom == xlib.XA_WM_NAME or event.atom == wm.atoms.net_wm_name) { 438 } else if (event.atom == xlib.XA_WM_NAME or event.atom == wm.atoms.net_wm_name) {
432 core.updateTitle(client, wm); 439 core.updateTitle(client, wm);
440 + core.applyFullscreenRule(client, wm);
433 } else if (event.atom == wm.atoms.net_wm_window_type) { 441 } else if (event.atom == wm.atoms.net_wm_window_type) {
434 core.updateWindowType(client, wm); 442 core.updateWindowType(client, wm);
435 } 443 }