Presenter View takes unfocused keys; Select All in the thumbnails pane follows the board's target

The presenter window turns on ViewportWindow::takes_unfocused_keys, so G with nothing
focused toggles the Presenter View's own grid. The thumbnails pane selects every slide
when the board delivers Select All to it (the pane declares the command and holds the
focus), instead of comparing against the innermost pane instance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Dylan M. TaylorandClaude Opus 5.5 committed 2026-11-28 00:34:12 +00:00
1 parent 5ca353dfbc
commit 0811adbfa7
2 files changed
+5 -4

No files matched your search

+4 -4
View File
@@ -9,7 +9,7 @@ use craft::ui::contract::{
use craft::ui::display::Divider;
use craft::ui::list::{List, ListRow, ThumbAspect, ThumbSize};
use craft::ui::menu::{Menu, MenuItem};
use craft::ui::runtime::commands::{CommandAccess as _, CommandRef, CommandState, Commands as _, EditCommands};
use craft::ui::runtime::commands::{CommandRef, CommandState, Commands as _, EditCommands};
use craft::ui::runtime::env::Env;
use craft::ui::tile_grid::{CaptionPlace, ColumnRule, GridEvent, TailRow, Tile, TileGrid, TileGroup, TileMark};
use deckcraft_engine::Target;
@@ -142,10 +142,10 @@ pub(crate) fn body(app: &mut SlideApp, ui: &mut Ui, cx: &mut BodyCx<'_>) {
_ => {}
}
}
// The board drains commands once. Only the command targeted at this pane changes its selection scope;
// app commands fall through to the same run path the editor root uses.
// The board drains commands once. A Select All with the focus in the pane is delivered to the pane, which
// declares it, and selects slides; app commands fall through to the same run path the editor root uses.
while let Some((command, fired)) = cx.take_command::<EditCommands>() {
if command == EditCommands::SelectAll && fired.target.is_some() && fired.target == cx.command_chain().innermost("pane") {
if command == EditCommands::SelectAll && fired.target.is_some() {
let _ = app.run("edit.selectAll", json!({"scope": "slides"}));
} else {
app.fire(ui.ctx(), &fired);
+1
View File
@@ -136,6 +136,7 @@ pub(super) fn presenter_pass(ui: &mut Ui, app: &mut crate::SlideApp, show: &mut
};
ViewportWindow::new(Word::plain("Presenter View — DeckCraft"))
.overlay(|overlay| overlay.size(egui::vec2(1100.0, 700.0)))
.takes_unfocused_keys()
.show(ui, |ui, cx| {
if !craft::ui::runtime::measure::active(ui.ctx()) {
viewport = Some(ui.ctx().viewport_id());