diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index b5c1fecbea003d15e336738d7e68e1c4ec59f14f..efb0bf9a1e5c8a7704eb776e050bc36b4539a99e 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -1422,7 +1422,11 @@ impl EditorElement { layouts.push(layout); } - let player = editor.current_user_player_color(cx); + let mut player = editor.current_user_player_color(cx); + if !editor.is_focused(window) { + const UNFOCUS_EDITOR_SELECTION_OPACITY: f32 = 0.5; + player.selection = player.selection.opacity(UNFOCUS_EDITOR_SELECTION_OPACITY); + } selections.push((player, layouts)); if let SelectionDragState::Dragging {