Overview (Exposé): every window side by side when the launcher opens, or alone on Super+W
CI / test (push) Successful in 1m35s
CI / test (push) Successful in 1m35s
Opening the launcher (Super tap or its panel button) now also shows every window of the workspace scaled down beside it, over the dimmed wallpaper, like GNOME's Activities overview: a natural layout (rows, one scale, aspect ratios kept, never enlarged), minimized windows dimmed, windows gliding in and out over 220 ms. Hover lights a window and shows a close button; click brings it forward and closes the overview and launcher; middle-click closes the window; Escape or a click on empty space closes it. Typing in the launcher's search fades the windows whose title and app id don't match. - compositor/host/overview.mbt: layout, area beside the launcher, hit testing, easing, input and draw ops; previews reuse the Alt+Tab thumbnails (10 fps refresh, nothing redrawn once settled). - New shortcut "overview" (Super+W) in the shortcut table, rebindable in Settings > Shortcuts. - chandra-ctl / control socket: "shortcut ID" runs any shortcut by id. - Both renderers keep only one large scaled copy per image (a gliding preview is drawn at a new size every frame) and draw images up to 4096 px. - Tests: layout packing and aspect ratio, balance, hit testing, animation, Super tap + click, Super+W + Escape/empty click, search filter, middle click, inspector, control command; screenshots of 1/4/9 windows in dark and light. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hgo3PfGPY8wwv21ZZS
This commit is contained in:
15 files changed
+1321
-10
No files matched your search
@@ -677,6 +677,31 @@ pub fn DesktopShell::toggle_launcher(self : DesktopShell) -> Unit {
|
||||
}
|
||||
}
|
||||
|
||||
///| Where the launcher's popup is while it is open (the overview lays windows out beside it).
|
||||
pub fn DesktopShell::launcher_rect(self : DesktopShell) -> @scene.Rect? {
|
||||
for w in self.widgets {
|
||||
if w.module_id == launcher_module && w.popup_rect.w > 0 {
|
||||
return Some(w.popup_rect)
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
///| True while the launcher's popup is open.
|
||||
pub fn DesktopShell::launcher_open(self : DesktopShell) -> Bool {
|
||||
self.launcher_rect() is Some(_)
|
||||
}
|
||||
|
||||
///| Close the launcher's popup if it is open.
|
||||
pub fn DesktopShell::close_launcher(self : DesktopShell) -> Unit {
|
||||
for w in self.widgets {
|
||||
if w.module_id == launcher_module && w.popup_rect.w > 0 {
|
||||
ignore(self.deliver(w, false, FocusLost))
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///| True if (x, y) is over the panel, an open popup or the menu (so windows don't see it).
|
||||
pub fn DesktopShell::hit(self : DesktopShell, x : Int, y : Int) -> Bool {
|
||||
inside(self.panel_rect, x, y) ||
|
||||
|
||||
@@ -38,6 +38,8 @@ pub(all) enum ShortcutAction {
|
||||
Launcher
|
||||
/// Minimize every window, or bring them back (showdesktop.mbt).
|
||||
ShowDesktop
|
||||
/// Show every window side by side, scaled down, to pick one (overview.mbt).
|
||||
Overview
|
||||
/// Hold the combo's modifiers and press its key to step through the windows (switcher.mbt);
|
||||
/// with Shift added it steps backwards.
|
||||
SwitchWindows
|
||||
@@ -82,6 +84,7 @@ pub let shortcut_table : Array[ShortcutDef] = [
|
||||
{ id: "record-screen", label: "Record the screen", action: RecordScreen, default_text: "Super+Alt+R" },
|
||||
{ id: "record-window", label: "Record a window", action: RecordWindow, default_text: "Super+Ctrl+R" },
|
||||
{ id: "dock-apps", label: "Open dock app 1-9", action: DockApps, default_text: "Super+1" },
|
||||
{ id: "overview", label: "Overview of all windows", action: Overview, default_text: "Super+W" },
|
||||
]
|
||||
|
||||
///| evdev code -> key name, for the keys a combo can end in (US layout names).
|
||||
|
||||
Reference in new issue
Block a user