frametop

Floating windows

Any desktop app can float in VR in a panel of its own, like SteamVR’s floating windows, while it stays part of the Frametop desktop. Drag and drop, the clipboard, and focus keep working between floating windows and the screens.

How KWin behaves underneath all this, and what the KWin script does about it, is in design.md.

Not built

These were decided (see the table) but aren’t built:

Decisions

The numbers are cited in the code, so they stay as they are. Struck-out text was replaced by a later decision.

# Question Decision
1 How many windows can float at once 16 spare outputs by default (also the most), configurable with FLOAT_SLOTS; a change needs a desktop restart. A Display Settings control isn’t built
2 Menus and dropdowns Each floating output has a margin around the window. The panel shows only the window, and each open popup gets a small overlay of its own, cut from the same buffer
3 Tearing off Drag the title bar past a screen’s edge and let go in the air, with a small dead zone past the edge Replaced (2026-10-30): while KWin moves the window by its title bar on a screen, pull the wheel. The window floats and the laser keeps carrying it; if floating it takes more than a second, it stays floating where it came up
4 Docking by dragging Carry a floating window (any input: lasers, the 3D mouse, a hand) until the point you hold it by is on a shown screen within 10 cm of its surface (FLOAT_DOCK_DISTANCE). The screen lights up, and letting go docks the window there, the held point under the laser
5 Visibility Floating windows follow the same rules as the screens: the hide hotkey, the visibility modes, and the games rule
6 Windows a floating app opens They float too
7 Launching floating from the headset One “Frametop Apps” launcher entry with a picker Replaced by 26 and profiles (27)
8 Build order Not kept here: it only set the order of the work
9 Show Desktop (Meta+D) Floating windows stay. Not built
10 Frametop Apps and visibility The entry starts the desktop with each screen hidden on its own, so only floating windows show Replaced: a profile can hide screens (27)
11 Window frame KWin’s title bar and border stay. Frametop’s bar, close, and “back to desktop” are extras
12 Resizing The window’s own edges and Frametop’s corner tab both change the size in pixels at the same density; the output follows
13 Margin 300 px on each side, configurable (FLOAT_MARGIN)
14 All spares in use The window stays on the screens, with a notification
15 Where a floating app’s new windows go Not built: where that app’s windows went last time, otherwise to the parent’s right, curving around you. For now, a new window that opens on a floating window’s output floats a little in front of it
16 Where the code is written Not kept here: it was about the work, not about Frametop
17 Size when docked by dragging The current floating size in pixels, shrunk to fit the screen, all of it on the screen
18 Bigger text A scale for each window (KWin’s output scale): Meta+scroll over the window. Remembered for each app. +/- buttons on its bar aren’t built
19 Switching to a window you can’t see It’s focused. Not built: a glow at the edge of your view that points to it, and a setting that moves it in front of you
20 Full screen The window fills its own panel. The margin drops to zero while it’s full screen, and the panel keeps its size and place
21 Named layouts They cover the screens only Replaced by profiles (27). Outside a profile, floating windows use the placement remembered for each app
22 The float key One toggle: it floats a window, or docks it if it already floats. The input relay owns it (float_toggle), Meta+Shift+F by default, rebindable in Frametop Input Settings and mappable to mouse and controller buttons. KWin has no shortcut of its own for it, so one press can’t fire twice
23 Which window the key acts on The window under the desktop’s pointer; the active window if there’s none there (the wallpaper, the taskbar)
24 Docking everything A dock_all action, with no default binding
25 A button on every window A float button left of Close in the title bar, from Frametop’s own QML window decoration, made to look like Breeze. It shows a dock icon on floating windows. Apps that draw their own title bar (Chromium, Electron, GTK) use the key
26 Launching one app floating “Launch as Standalone” in the right-click menu of every app in the Application Launcher and the taskbar, from copies of the apps’ desktop files that only the Frametop desktop reads. It replaces the Frametop Apps entry (7, 10)
27 Profiles Named layouts become profiles: the screens’ places, which screens show, and the apps and their windows, floating or not. See docs/profiles.md
28 Panel size at the same pixels (2026-10-30) Scroll on the corner tab: 5% a notch, from half to twice the screen’s density. Remembered for each app; the float key and the title bar button float an app at the density it last had

Also: floating windows get the wrist pin, the head pin, and pass-through (pointer-ignore) like screens. Every gesture works with the controllers as well as the 3D mouse. A window launched floating uses the primary screen’s density. VNC shows only the primary screen.

The approach: each floating window gets a KWin output of its own

Drag and drop and the clipboard only work between windows of the same compositor. A Wayland window can’t move from one compositor to another. So a floating window has to stay a KWin window.

ft-screens already shows each KWin output as a panel. It sets the output’s size with an xdg_toplevel configure, and KWin resizes the output to match. So a floating window gets an output of its own, sized to fit it, and ft-screens shows that output as a panel with its own controls. To KWin this is an ordinary desktop with more monitors. Dragging between two floating windows is the same as dragging between two monitors, which KWin already handles. ft-screens moves the pointer between panels in the middle of a drag: handle_vr_event moves pointer focus to another KWin window even while a button is held.

Alternatives considered:

Where the extra outputs come from: spare outputs

KWin’s nested backend opens its outputs at start (--output-count). The session starts KWin with the screen count plus FLOAT_SLOTS outputs (default and most 16). ft-floatd turns off the spares nothing floats on with kscreen-doctor once it starts. Floating a window enables a spare, and docking the window disables it again. FLOAT_SLOTS limits how many windows can float at once, and changing it means restarting the desktop. How KWin’s nested backend treats disabled outputs, and why its virtual outputs can’t be used instead, is in design.md.

ft-screens creates a screen for each toplevel in the order they appear, and indexes its settings by that order. Spares come after the screens, so they get indices SCREENS and up. Their panels are hidden while their output is disabled.

How the parts fit together

  KWin script "frametop-float"                ft-floatd (host, Python)                 ft-screens
  window events, moves, menus  ── D-Bus ──▶   window ↔ output ↔ panel table   ── @ft_screens ──▶   panels, controls,
  runs commands                ◀─ long poll ─  spare outputs (kscreen-doctor)  ◀─ @frametop_float ─  lasers, catcher

Program names stay within 15 characters (ft-floatd). Overlay keys are frametop.float.N and frametop.float.N.bar, and so on; a floating window’s popups and dialogs are frametop.float.N.sub.K.

A floating window

Tearing a window off a screen

Decision 3, built 2026-10-30:

  1. Press a desktop window’s title bar on a screen and move it. KWin starts an interactive move, the script reports it (screen-move), and ft-floatd passes it on to ft-screens (moving <window> 1, and 0 when the move ends).
  2. Pull the wheel (scroll toward you) during that move. ft-screens releases the button in KWin where the pointer is, which ends the move, and asks ft-floatd to float the window (tear <window> <x> <y>, the pointer’s place on the screen in its pixels). The button stays held in ft-screens, and its release doesn’t go to KWin.
  3. ft-floatd has the script float the window as the float key would, its panel in front of where the window was, and answers torn <panel> <gx> <gy>: where in the window the laser held it.
  4. ft-screens moves the panel so that point is on the laser and carries it with the laser that tore it, as by its title bar: the wheel pushes and pulls it, and carried onto a screen it docks there (see “Putting it back”). Letting go leaves it floating.
  5. If the answer takes more than a second, or the button is already up, the window stays floating where it came up.

A hand’s pinch doesn’t tear: hands have no wheel. Only a real KWin move counts, so a pull while selecting text or dragging a file scrolls as usual.

Putting it back

Getting at it: the float key and the title bar button

Decisions 22 to 25.

Launching an app floating

Drag and drop between panels

KWin handles the protocols: Wayland, X11 through Xwayland, and the portal’s file transfer. Frametop has to get the pointer right between panels.

Things that must keep working

Risks