Skip to content

Window menu on X11, and tiled states on X11 and Wayland #313

Done

Description

@rock3r

Goal: Make custom Linux titlebars follow the window manager’s menu, decoration and tiling behavior.

Gap: Rune’s window-menu path is Windows-only, and views cannot read negotiated decorations, tiled edges or available window actions.

Request: Add an X11 titlebar-menu path using _GTK_SHOW_WINDOW_MENU when advertised. Separately expose actual decoration mode, tiled edges and action availability where the backend provides them, preserving unknown values. Use per-window action information on X11 and coordinate Wayland support with winit. Do not infer decoration mode from missing capabilities.

Activity

  1. wmfeht commented on Nov 22, 2026

    @wmfeht

    From Strata (lgse/strata), a file manager on Rune that draws its own header: on Wayland the window menu is missing as well. chrome::window_menu (window/chrome.rs:138-155 at 67d73a5f) is still Windows-only, so a right-click on a .window_drag() region opens nothing on Linux. winit's Wayland show_window_menu already sends xdg_toplevel.show_window_menu, which GNOME and KDE expect; Rune doesn't call it.

    One more piece would let a custom header match the desktop: the desktop's titlebar double-click action (org.gnome.desktop.wm.preferences action-double-click-titlebar, also in the Settings portal), instead of always maximising (titlebar_double_click, window/chrome.rs:106-111 at 67d73a5f).

  2. opencodejr commented on Nov 25, 2026

    @opencodejr
    Contributor

    Thanks for the clear write-up. I checked, and the gap is real:

    • window_menu and has_window_menu in crates/rune/src/window/chrome.rs only work on Windows. On Linux they do nothing, so a right-click or Alt+Space on a custom titlebar opens no menu.
    • In the vendored winit, show_window_menu is empty on X11. On Wayland it does send xdg_toplevel.show_window_menu, but Rune never calls it, as @wmfeht points out.
    • Views can't currently read the decoration mode the compositor chose, tiled edges, or which window actions are available.

    I'll treat this as a feature request in these parts:

    1. On X11, open the window manager's menu with _GTK_SHOW_WINDOW_MENU, but only when the window manager advertises it.
    2. On Wayland, call winit's show_window_menu for the same titlebar and keyboard paths.
    3. Expose decoration mode, tiled edges and action availability only where the backend reports them, keeping "unknown" as its own value. Decoration mode won't be inferred from missing capabilities. On X11, action availability will be read per window.

    The Wayland state may need changes in winit. The desktop's titlebar double-click setting from the comment is a related follow-up.

  3. opencodejr commented on Nov 25, 2026

    @opencodejr
    Contributor

    I've opened a PR for the window-menu half of this:

    • Wayland: a right-click on a bare .window_drag() region, or Alt+Space that no handler takes, now calls winit's show_window_menu (xdg_toplevel.show_window_menu). That should also cover the Strata case @wmfeht described.
    • X11: Rune sends _GTK_SHOW_WINDOW_MENU itself, only when the window manager lists it in _NET_SUPPORTED. winit's X11 show_window_menu does nothing.

    The change hasn't been compiled or tested yet, so it needs a build and a try on a real desktop before merging. Reading the decoration mode, tiled edges and available actions isn't in this PR: it needs its own API with an explicit "unknown" value, and on Wayland it depends on winit exposing that state.

    Fixed in #2196.

  4. rock3r commented on Nov 25, 2026

    @rock3r
    Author

    Thank you. We can test #2196 on real X11 and Wayland desktops and report the result here. We will do this on the merged code in dev.

  5. rock3r commented on Nov 25, 2026

    @rock3r
    Author

    Tested #2196 live: the window menu does not open from a custom titlebar on GNOME, on Wayland or on X11.

    Setup: Rune dev at 4f8a7d14, cargo run -p rune --example custom_titlebar, on Ubuntu 26.04 with GNOME Shell 50.1, scale 1. On X11 the test ran through XWayland, whose window manager lists _GTK_SHOW_WINDOW_MENU in _NET_SUPPORTED. Input came from Mutter's RemoteDesktop API, and screenshots came from its ScreenCast stream.

    Action Wayland X11
    Left-click on the band's Theme button the theme switches the theme switches
    Right-click on a bare part of the .window_drag() band, between the title text and the buttons no window menu no window menu
    Right-click on GNOME's own title bar above the band GNOME's window menu opens GNOME's window menu opens

    The first row shows that input reaches the window. The build passes, and the 5 window_menu unit tests pass. The example reports chrome insets of 0 on both backends, and GNOME keeps its own decorations: server-side on X11 and client-side on Wayland. So the window shows two title bars, and the band may never act as a titlebar on Linux. Could you reopen this issue, or tell us which setup #2196 expects?

  6. opencodejr commented on Nov 25, 2026

    @opencodejr
    Contributor

    Thanks for testing this so carefully. You're right: #2196 doesn't open the menu on Linux. It isn't your setup.

    Why: secondary_region_down (crates/rune/src/runtime/input/titlebar.rs) only treats a right-press on a .window_drag() region as a titlebar press while the runtime has a caption. Only the Windows custom frame sets one (caption() in window/chrome.rs returns None elsewhere). On Linux the release never asks for the window menu, so the new Wayland (xdg_toplevel.show_window_menu) and X11 (_GTK_SHOW_WINDOW_MENU) code never runs. The unit tests only cover building the X11 message and the _NET_SUPPORTED check, so they missed this. That's a gap in #2196.

    Setup: the two title bars and zero chrome insets are expected today. On Linux, App::titlebar keeps the native frame (see the README's App::titlebar entry), so that band never replaces the title bar. The setup #2196 was meant for is a borderless window (WindowSpec { borderless: true, .. }) whose header uses .window_drag() regions, like Strata's. The same caption check blocks that case too, so it won't work there yet either.

    This should be reopened. On Linux the check needs to depend on whether the window can show a window menu, not on the Windows caption. The decoration-mode, tiled-edge and window-action half of this issue was never done either.

  7. rock3r commented on Nov 25, 2026

    @rock3r
    Author

    When the caption check is fixed, we can test a borderless window (WindowSpec { borderless: true, .. }) live on GNOME, on Wayland and on X11, and report here.

  8. opencodejr commented on Nov 25, 2026

    @opencodejr
    Contributor

    Thanks, a borderless window (WindowSpec { borderless: true, .. }) is the right setup to test. Once a fix for the caption check lands, these are the checks that would tell us the most, on both Wayland and X11:

    1. Right-click on a bare part of a .window_drag() region. GNOME's window menu should open at the pointer.
    2. Right-click on a child that has its own press handler (a button in the header). There should be no window menu.
    3. Alt+Space with the window focused. On GNOME the shell's own Alt+Space binding probably opens the menu before Rune sees the key. If it reaches the app, the menu should open at the window's top-left corner.
    4. The menu items themselves. Move, Resize, Maximize and Close should work on the borderless window.

    For anything that fails, a note of which backend it was would be enough.

  9. Hona commented on Nov 25, 2026

    @Hona
    Member

    The reactive window-manager state API and its X11 backend are now on dev in #2249 (0ade7deab).

    On dev now (X11):

    • Cx::decoration_mode() -> DecorationMode (Unknown / Server / Client), read from _NET_FRAME_EXTENTS (never inferred from missing actions or is_decorated()).
    • Cx::tiled_edges() -> Option<TiledEdges> (None when unknown, Some(TiledEdges::NONE) when untiled), read from _GTK_EDGE_CONSTRAINTS (bits 0=top, 2=right, 4=bottom, 6=left; matching Chromium Linux, GTK4, and libadwaita).
    • Cx::window_actions() -> WindowActions (window_menu, maximize, minimize, fullscreen, close, each Option<bool>), read from per-window _NET_WM_ALLOWED_ACTIONS and root _NET_SUPPORTED (_GTK_SHOW_WINDOW_MENU).
    • Views that read any of the three (and their memo closures) rebuild automatically on change; views that never read them do no extra work. Wayland, macOS, Windows, and web currently report Unknown / None.
    use rune::{App, AppSpec, Cx, El, text};
    
    fn view(_: &(), cx: &mut Cx<()>) -> El {
        let mode = cx.decoration_mode();
        let tiled = cx.tiled_edges();
        let actions = cx.window_actions();
        text(format!("mode={mode:?} tiled={tiled:?} actions={actions:?}"))
    }
    
    fn main() { App::new(AppSpec::new("WM state", (640.0, 360.0), || (), view)).run(); }

    cargo run -p rune --example custom_titlebar also displays these three values live.

    What to try on X11 / XWayland (not run on a live desktop here — verified via unit tests, doctests, and Linux container / macOS / Windows / wasm32 builds):

    1. Tile left and tile right: verify tiled_edges reports Some(TiledEdges { top: true, right: false, bottom: true, left: true }) on left half and { top: true, right: true, bottom: true, left: false } on right half, and Some(TiledEdges::NONE) when untiled.
    2. Maximize and restore: verify cx.is_maximized() flips without falsely setting tiled edges when untiled.
    3. A window or WM rule that forbids maximize (e.g. non-resizable window): verify window_actions().maximize reports Some(false) while other allowed actions stay Some(true).
    4. Server-side decorations (default titled window) vs. client-side / borderless (WindowOptions { borderless: true, .. }): verify decoration_mode() reports Server when _NET_FRAME_EXTENTS is non-zero and Client when it is [0, 0, 0, 0] (or Unknown if unset).

    Leaving this issue open for the remaining pieces: Wayland xdg-decoration / xdg_toplevel configure state + X11 PropertyNotify wake in the next PR, the Linux custom-titlebar window-menu repair, and live GNOME X11/Wayland confirmation.

  10. rock3r commented on Nov 25, 2026

    @rock3r
    Author

    Tested #2249 live on X11: dev at 0ade7deab, on XWayland under GNOME Shell 50.1 (Mutter), Ubuntu 26.04, scale 1. A small app logged decoration_mode(), tiled_edges(), is_maximized() and window_actions() on every change. GNOME's shortcuts drove it through Mutter's RemoteDesktop API. Screenshots confirmed that each tile and maximize happened.

    Check Titled window (default) Borderless window Not resizable
    4. decoration_mode() Unknown for the first frame, then Server ✅ stays Unknown ❌ (expected Client) Server ✅
    1. Tile left (Super+Left) stays NONE, though the window visibly tiled ❌ top + bottom only; left is false ❌ not tested
    1. Tile right (Super+Right) stays NONE ❌ top + bottom only; right is false ❌ not tested
    1. Untile (Super+Down) NONE ✅ NONE ✅ not tested
    2. Maximize / restore (Super+Up / Super+Down) is_maximized() flips both ways, and tiled_edges stays NONE ✅ is_maximized() flips both ways, and tiled_edges reports all four edges while maximized, NONE after restore not tested
    3. window_actions().maximize Some(true) Some(true) Some(false) ✅ (and fullscreen is Some(false))

    Summary:

    • On a titled window, tiling is never reported.
    • On a borderless window, tiling reports only top and bottom, never the side that touches the screen edge.
    • A borderless window's decoration mode stays Unknown.
    • Maximize, restore and the allowed-actions check work.
  11. Hona commented on Nov 25, 2026

    @Hona
    Member

    A fix for the Linux window-menu trigger is now on dev in #2271 (b16605c7b).

    What changed:

    • Removed the Windows-only caption check that blocked right-clicks on bare .window_drag() regions on Linux (both borderless windows and App::titlebar).
    • Wayland: xdg_toplevel.show_window_menu now fires on right-button press instead of release, while winit still holds the button-press serial (calling it on release sent the release serial, which compositors checking the implicit-grab serial ignore). Touch long-press now also passes the touch position rather than (0, 0).
    • X11: _GTK_SHOW_WINDOW_MENU fires on right-button release (after the X server releases winit's implicit button-press grab) and reads _GTK_SHOW_WINDOW_MENU support from feat(window): expose reactive Cx decoration mode, tiled edges and window actions with X11 backend #2249's _NET_SUPPORTED query instead of querying a second time.

    About the two title bars in custom_titlebar: that is expected today. On Linux, App::titlebar keeps the native frame (see the App::titlebar / WindowSpec::titlebar entry in crates/rune/README.md, which notes zero Cx::chrome_insets() where the native frame stays), while a custom .window_drag() header is intended for a borderless window (WindowSpec { borderless: true, .. }).

    What could not be verified here: we have no live Linux desktop (Wayland or X11 display server) in this run, so #2271 is verified by headless unit tests and Linux container compilation/clippy, not seen live on GNOME. Could you repeat your table on dev at b16605c7b on both Wayland and X11:

    1. On a borderless window (WindowSpec { borderless: true, .. }) with a .window_drag() header (bare band right-click, button inside the band right-click, and menu actions like Move / Resize / Maximize / Close).
    2. On cargo run -p rune --example custom_titlebar as it is (with GNOME's native frame kept).

    Leaving this issue open for live confirmation and the remaining Wayland decoration-mode / tiled-edges / window-actions work.

  12. rock3r commented on Nov 25, 2026

    @rock3r
    Author

    Retested #2271 live: dev at b16605c7b, GNOME Shell 50.1 (Mutter), Ubuntu 26.04, scale 1, on Wayland and on X11 (XWayland). Input came from Mutter's RemoteDesktop API. The table's results come from screenshots taken through its ScreenCast stream, and from the app's own log.

    1. A borderless window (WindowOptions { borderless: true, .. }) with a 44 pt .window_drag() header band and a button in the band.

    Check Wayland X11
    Right-click on the bare band GNOME's window menu opens at the pointer ✅ ✅
    Right-click on the band's button no menu ✅ no menu ✅
    Left-click on the band's button the button's press runs ✅ ✅
    Menu ▸ Maximize is_maximized() becomes true ✅ ✅
    Menu ▸ Move, then Right ×10 and Return the window moves right ✅ ✅
    Menu ▸ Resize, then Right ×10 and Return the window grows wider ✅ ✅
    Menu ▸ Close the app exits ✅ ✅

    2. cargo run -p rune --example custom_titlebar, unchanged, with GNOME's frame kept. A right-click on the bare part of the app's band opens GNOME's window menu, on Wayland and on X11 ✅.

    Not separated: we did not test press timing apart from release timing. Each click was a press and a release 80 ms apart, so this test does not show that Wayland opens the menu on press and X11 on release.

    Thanks, this works now.

  13. Hona commented on Nov 25, 2026

    @Hona
    Member

    Thanks for testing #2249 live and posting the table — that pinpointed all four X11 gaps right away. Both the X11 fixes and the Wayland backend are now on dev in #2283 (6bee31712), and the Linux custom-titlebar window-menu repair is also on dev in #2271 (b16605c7b).

    (Apps pinning dev need to update their [patch.crates-io] winit rev to 6bee31712 or newer because vendor/winit.patch was updated.)

    What was wrong in each X11 cell (fixed in #2283)

    1. Titled window tiling stayed NONE: Mutter's update_gtk_edge_constraints (src/x11/window-x11.c) writes _GTK_EDGE_CONSTRAINTS on the reparented frame parent (priv->frame->xwindow), not on the client window. Rune now falls back to the reparented parent frame when the client window has no _GTK_EDGE_CONSTRAINTS. (Note: when maximized, Mutter writes 0x55 — all four edges constrained — on both titled and borderless windows, matching GTK4 and Chromium, and 0xAA / NONE on restore.)
    2. Borderless half-tiling missed left / right: On Ubuntu 26.04, ubuntu-tiling-assistant handles Super+Left/Right via set_maximize_flags(VERTICAL) on a half-width frame instead of meta_window_tile, so Mutter writes only TOP_TILED | BOTTOM_TILED (0x99) plus _NET_WM_STATE_MAXIMIZED_VERT. Rune now refines _NET_WM_STATE_MAXIMIZED_VERT (without HORZ, and the horizontal twin) against _NET_WORKAREA intersected with the active monitor rect so flush left/right edges are reported without affecting floating vertically-maximized windows.
    3. Borderless decoration_mode() stayed Unknown: Mutter omits _NET_FRAME_EXTENTS on frameless windows (priv->frame == NULL). When _NET_FRAME_EXTENTS is absent, Rune now reports DecorationMode::Client if the app requested no native frame (borderless: true), an EWMH WM is managing the window, and it was not reparented into a WM frame (titled windows without _NET_FRAME_EXTENTS stay Unknown).
    4. First-frame Unknown → Server timing: Frame 1 before Mutter finishes mapping and framing the window is genuinely Unknown on X11; vendored winit now wakes Rune on PropertyNotify for _NET_FRAME_EXTENTS, _NET_WM_STATE, _NET_WM_ALLOWED_ACTIONS, and _GTK_EDGE_CONSTRAINTS so the update arrives as soon as Mutter writes the property even without a resize or focus change (zero X11 IPC on ordinary redraws).

    Wayland backend (now on dev in #2283)

    • Cx::decoration_mode() reads xdg-decoration / xdg_toplevel configure mode directly (Unknown before initial configure, Server or Client afterwards).
    • Cx::tiled_edges() reads xdg_toplevel TILED_* states on xdg_toplevel v2+ (None below v2 or before initial configure).
    • Cx::window_actions() reads xdg_toplevel::wm_capabilities (window_menu, maximize, minimize, fullscreen; close stays None) on xdg_toplevel v5+ (None below v5 so sctk's default all() never leaks).
    • Decoration-mode or capability changes without a resize wake sync_chrome_core. Layer-shell overlays are not toplevels and remain Unknown / None.

    cargo run -p rune --example custom_titlebar shows the live wm: readout. None of this has been run on a live Wayland or X11 desktop here (verified via cross-platform unit tests, doctests, wasm32/WebGL2, macOS, Windows, and Linux container builds only).

    Could you run three quick checks on dev (6bee31712)?

    1. Repeat your X11 table (titled, borderless, non-resizable: decoration_mode(), Super+Left, Super+Right, Super+Down, Super+Up/restore, window_actions()).
    2. Wayland table (titled, borderless, non-resizable):
      • decoration_mode() (client-side on GNOME; server-side on an SSD compositor if available)
      • Tile left and tile right via keyboard (Super+Left / Super+Right) and by dragging to a screen edge
      • Maximize / restore and full screen
      • window_actions() on resizable vs. non-resizable windows
    3. Repeat the Linux window-menu table from your earlier test (right-click on a bare .window_drag() region on both Wayland and X11, now repaired in fix(linux): open the window manager's window menu on right-click of bare window_drag regions #2271).

    Leaving #313 open until live GNOME Wayland and X11 results confirm everything.

  14. rock3r commented on Nov 25, 2026

    @rock3r
    Author

    Retested #2283 live: dev at 6bee31712, GNOME Shell 50.1 (Mutter), Ubuntu 26.04, scale 1, Wayland and X11 (XWayland).

    • Setup: a small app logged decoration_mode(), tiled_edges(), is_maximized(), is_full_screen() and window_actions() on every change. Its window has a 44 pt .window_drag() band, and F calls Tx::toggle_full_screen.
    • Input: Mutter's RemoteDesktop API sent GNOME's shortcuts and the pointer drags.
    • Proof: screenshots from its ScreenCast stream confirmed each tile, move and resize.

    1. X11: every gap from the last table is fixed.

    Check Titled Borderless Not resizable
    decoration_mode() Server ✅ Client ✅ Unknown for the first frame, then Server ✅
    Super+Left top, bottom, left ✅ top, bottom, left ✅ no change (the WM refuses) ✅
    Super+Right top, right, bottom ✅ top, right, bottom ✅ no change ✅
    Super+Down (untile) NONE ✅ NONE ✅ —
    Super+Up / Super+Down is_maximized() flips; edges NONE while maximized ✅ flips; all four edges while maximized no change ✅
    Full screen (F, twice) is_full_screen() flips both ways ✅ ✅ not allowed ✅
    window_actions() max, min, full, close: Some(true) the same maximize: Some(false), fullscreen: Some(false) ✅

    Two small things on X11:

    • In full screen, a titled window reports decoration_mode() == Client, and maximize: Some(false). Right after leaving full screen, one frame still reports Client before it returns to Server.
    • While maximized, a titled window reports no tiled edges, but a borderless window reports all four.

    2. Wayland

    Check Titled (client-side) Borderless Not resizable
    decoration_mode() Client ✅ Client ✅ Client ✅
    Super+Left, or a drag to the left edge top + bottom only; left is false ❌ top + bottom only ❌ no change
    Super+Right, or a drag to the right edge top + bottom only; right is false ❌ top + bottom only ❌ no change
    Super+Down (untile) NONE ✅ NONE ✅ —
    Super+Up / Super+Down is_maximized() flips; all four edges while maximized ✅ ✅ no change
    Full screen (F, twice) is_full_screen() flips both ways ✅ ✅ ✅
    window_actions() close: None on every window, while X11 gives Some(true) the same maximize: Some(true) ❌ (expected Some(false); the WM refused Super+Up)

    Screenshots confirm that both the keyboard and the drags tiled the window to the correct half. Only the side edge is missing from tiled_edges().

    3. Window menu: unchanged, every check passes on both backends.

    • On the borderless window, a right-click on the bare band opens GNOME's menu at the pointer, and a right-click on the band's button opens none.
    • A left-click on the button still runs its press.
    • Maximize, Move (Right ×10, Return), Resize (Right ×10, Return) and Close all work.
    • In custom_titlebar with GNOME's frame kept, a right-click on the app's band opens the menu.
  15. Hona commented on Nov 25, 2026

    @Hona
    Member

    Thanks again for the thorough Wayland and X11 tables — every X11 fix from #2283 held on live Mutter because of them. The follow-up fixes for the five remaining items are now on dev in #2293 (cb2f50056, with no vendor/winit.patch change).

    Cause and status for each of the five items

    1. Wayland half-tiles (Super+Left/Right or edge drag) missing left/right — documented protocol limit:
      • Mutter's src/wayland/meta-wayland-xdg-shell.c (fill_states) emits XDG_TOPLEVEL_STATE_TILED_* directly from window->edge_constraints (and Wayland maximize already reported all four edges through the same sctk/winit path, confirming TILED_LEFT/TILED_RIGHT are not dropped).
      • On Ubuntu 26.04, ubuntu-tiling-assistant (tilingWindowManager.js) handles half-tiles by calling window.set_maximize_flags(VERTICAL) while skipping override_constraints, so Mutter only sets top and bottom constraints and never sends TILED_LEFT or TILED_RIGHT.
      • Because Wayland intentionally hides global window position, both GTK4 (gdk/wayland/gdktoplevel-wayland.c) and Chromium (ui/ozone/platform/wayland/host/xdg_toplevel_wrapper_impl.cc) pass through the compositor's TILED_* states verbatim with no guess. Rune documents this limit on Cx::tiled_edges().
    2. Wayland window_actions().maximize on a non-resizable window — fixed:
      • Mutter sends all four xdg_toplevel.wm_capabilities unconditionally before initial configure (compositor support, not per-window resizability).
      • Rune now combines WM_CAPABILITIES_MAXIMIZE with window.is_resizable() && window.enabled_buttons().contains(WindowButtons::MAXIMIZE) (matching GTK4's gtk/gtkwindowcontrols.c), so non-resizable Wayland windows report maximize: Some(false) while fullscreen remains Some(true) where Mutter allows it.
    3. Wayland window_actions().close — fixed:
      • xdg-shell has no close capability because a Wayland client can always close its own toplevel. Following GTK4's deletable property (gtk/gtkwindowcontrols.c), Rune now reports close: Some(true) once a Wayland toplevel is configured (and Some(false) only if the close button is disabled; None pre-configure or on overlays), matching X11 so one title bar works on both backends.
    4. X11 titled window decoration_mode() in full screen and 1 frame after leaving — fixed:
      • In full screen on X11, mutter-x11-frames collapses frame borders to [0, 0, 0, 0], and on exit _NET_WM_STATE_FULLSCREEN clears before _NET_FRAME_EXTENTS is asynchronously restored to [0, 0, 37, 0].
      • Rune now preserves the last confirmed non-fullscreen DecorationMode during full screen and across the 1-frame restore window while the titled window remains reparented in its WM frame (keeping window_actions().maximize == Some(false) in full screen as Mutter reports).
    5. X11 titled window tiled_edges() while maximized — fixed:
      • Always reads _GTK_EDGE_CONSTRAINTS from the reparented parent frame (priv->frame->xwindow) when has_wm_frame is true (preferring it over any stale pre-frame client property) and reports Some(TiledEdges::ALL) when _NET_WM_STATE has both MAXIMIZED_HORZ and MAXIMIZED_VERT, matching GTK4, Mutter's update_edge_constraints, Chromium's X11Window::GetTiledState, borderless X11, and Wayland.

    (No live GNOME Wayland or X11 desktop was run here — verified via cross-platform unit tests, doctests, wasm32/WebGL2 + strict lints, Windows, macOS, and Linux container builds only.)

    Short repeat on dev (cb2f50056)

    1. Wayland half-tile row: if you can grab one line of WAYLAND_DEBUG=1 showing xdg_toplevel@*.configure's states array for a left tile (with Ubuntu Tiling Assistant on, and if convenient, off), that will confirm item 1 completely.
    2. Wayland window_actions(): confirm close: Some(true) on every window, and on the non-resizable window maximize: Some(false) with fullscreen: Some(true).
    3. X11 titled full screen (F, twice): confirm decoration_mode() stays Server throughout full screen and immediately after leaving (no 1-frame Client), with maximize: Some(false) while full screen.
    4. Maximized row (Super+Up / Super+Down): confirm X11 titled, X11 borderless, and Wayland all report all four edges while maximized and NONE after restore.

    Leaving #313 open until those confirm live.

  16. rock3r commented on Nov 25, 2026

    @rock3r
    Author

    Repeated on dev at cb2f50056: GNOME Shell 50.1, Ubuntu 26.04, scale 1. The setup is the same as in the last table. Every check passes.

    1. Wayland left tile, WAYLAND_DEBUG=1. The debug log prints the state array's size, not its values.

    • With the tiling assistant on ([email protected], Ubuntu's default):
      • log: xdg_toplevel#34.configure(926, 1048, array[12]), which is 3 states;
      • tiled_edges(): top and bottom.
    • With the tiling assistant off:
      • log: xdg_toplevel#34.configure(927, 1048, array[16]), which is 4 states;
      • tiled_edges(): top, bottom and left ✅.
    • So Rune reports what the compositor sends, and the missing side edge comes from the tiling assistant, as you said. We turned the assistant back on after the test.

    2. Wayland window_actions().

    • close: Some(true) on the titled, borderless and non-resizable windows ✅.
    • The non-resizable window gives maximize: Some(false) ✅ and fullscreen: Some(true) ✅.

    3. X11 titled full screen (F twice).

    • decoration_mode() stays Server throughout, with no Client frame on entering or leaving ✅.
    • maximize: Some(false) while in full screen, and Some(true) after ✅.

    4. Maximize with Super+Up, then restore with Super+Down. X11 titled, X11 borderless, Wayland titled and Wayland borderless all report all four edges and is_maximized() while maximized, then NONE after the restore ✅.

    Thanks, #313 looks complete from our side.

  17. Hona commented on Nov 25, 2026

    @Hona
    Member

    Everything requested in this issue is now on current dev: Cx::decoration_mode(), Cx::tiled_edges(), Cx::window_actions(), and the Linux window menu on bare .window_drag() regions for both X11 (_GTK_SHOW_WINDOW_MENU) and Wayland (xdg_toplevel.show_window_menu).

    cargo run -p rune --example custom_titlebar shows the live readout. Apps pinning dev should update their [patch.crates-io] winit rev to 6bee31712 or newer.

    All of these were confirmed live on a GNOME desktop on both X11 and Wayland by a reporter in this thread—thank you for three rounds of tables in one day, which got both backends right. One documented limit: on Wayland, Ubuntu's default tiling assistant extension sends only top and bottom states on half tiles, so Rune reports top and bottom verbatim; with the extension off, the compositor sends the side edge too and Rune reports it.

    Not yet tested live: other desktops and window managers (KDE, Sway, Hyprland, or a tiling X11 WM), a Wayland server-side decoration compositor, and display scales other than 1. Please reopen or file a new issue if anything misbehaves on another desktop or scale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions