Delta drew in a 640x480 corner of a full-size window: ask again when a client keeps another size
CI / test (push) Failing after 17s

GPUI apps (Delta, Zed) answer a configure that takes the maximized state away by going back to
their old floating size, whatever size it asks for. Unmaximized into a tiled slot (or a layout
change while maximized), Delta kept drawing 640x480 and Chandra padded it out with the bottom
right colour to the whole frame, so only the sidebar and toolbar showed.

The server now tracks each toplevel's last configure and the serial the client acked. When a
client commits a buffer of another size after acking the latest configure, the same configure
is sent once more (GPUI, no longer maximized then, takes it). A client that still keeps its own
size gets a ToplevelSizeChosen: a floating window's frame follows it, a tiled, maximized or
fullscreen window keeps the compositor's size. Sizes take set_window_geometry and
set_buffer_scale into account.

CHANDRA_DEBUG_CONFIGURE=1 logs configures, acks and committed buffer sizes to stderr.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DPL5hiKUmCPZNFNiGwd8EW
This commit is contained in:
Claude committed 2026-11-25 20:55:58 +00:00
1 parent a215dd6bf7
commit 0fc2598d27
5 files changed
+359 -7

No files matched your search

+11
View File
@@ -472,6 +472,17 @@ pub fn ChandraCompositor::step(self : ChandraCompositor) -> Unit {
}
None => ()
}
@wayland.CompositorEvent::ToplevelSizeChosen(wid, w, h) =>
// The client keeps its own size after being asked twice. A floating window is the
// client's to size: the frame follows it instead of padding the buffer out. A tiled,
// maximized or fullscreen window keeps the compositor's size.
match self.wm.windows.get(wid) {
Some(r) =>
if r.is_floating && !r.maximized && !r.fullscreen && self.wm.drag is None && self.split_drag is None {
self.apply_actions(self.wm.handle_request(wid, @wm.WindowRequest::ResizeTo(w, h), self.work_area))
}
None => ()
}
@wayland.CompositorEvent::PopupOpened(wid, parent, rx, ry, w, h) => {
// Keyboard focus stays on the parent until the popup grabs and maps: moving it away
// early makes clients (Chrome, Qt) take the keyboard leave as "dismiss the menu".