Skip to content

Commit 763f4a2

Browse files
authored
WindowSwitcher: use Clutter.Stage.set_key_focus () (#2338)
1 parent d9713d1 commit 763f4a2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Widgets/WindowSwitcher/WindowSwitcher.vala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ public class Gala.WindowSwitcher : CanvasActor, GestureTarget {
4242
_current_icon = value;
4343
if (_current_icon != null) {
4444
_current_icon.selected = true;
45-
_current_icon.grab_key_focus ();
45+
46+
// _current_icon.grab_key_focus () sometimes results in a crash
47+
// https://github.com/elementary/gala/issues/2308
48+
get_stage ().set_key_focus (_current_icon);
4649
}
4750

4851
update_caption_text ();

0 commit comments

Comments
 (0)