55 * Authored by: Leonhard Kargl <leo.kargl@proton.me>
66 */
77
8- public class Gala.Focusable : Clutter . Actor {
8+ public class Gala.Widget : ActorTarget {
99 public bool can_focus { get ; set ; default = false ; }
1010 public bool has_visible_focus { get ; private set ; default = false ; }
1111
@@ -18,9 +18,9 @@ public class Gala.Focusable : Clutter.Actor {
1818 has_visible_focus = has_key_focus () && get_root (). get_qdata< bool > (FocusController . focus_visible_quark);
1919 }
2020
21- private Focusable get_root () {
21+ private Widget get_root () {
2222 var parent = get_parent ();
23- if (parent is Focusable ) {
23+ if (parent is Widget ) {
2424 return parent. get_root ();
2525 }
2626
@@ -41,7 +41,7 @@ public class Gala.Focusable : Clutter.Actor {
4141
4242 // A child of us (or subchild) has focus, try to move it to the next one.
4343 // If that doesn't work and we are moving backwards focus us
44- if (focus_actor != null && focus_actor is Focusable && focus_actor in this ) {
44+ if (focus_actor != null && focus_actor is Widget && focus_actor in this ) {
4545 if (move_focus (direction)) {
4646 return true ;
4747 }
@@ -80,7 +80,7 @@ public class Gala.Focusable : Clutter.Actor {
8080 }
8181
8282 protected virtual bool move_focus (FocusDirection direction ) {
83- var children = get_focusable_children ();
83+ var children = get_widget_children ();
8484
8585 FocusUtils . filter_children_for_direction (children, get_stage (). key_focus, direction);
8686 FocusUtils . sort_children_for_direction (children, direction);
@@ -94,13 +94,13 @@ public class Gala.Focusable : Clutter.Actor {
9494 return false ;
9595 }
9696
97- private Gee .List<Focusable > get_focusable_children () {
98- var focusable_children = new Gee .ArrayList<Focusable > ();
97+ private Gee .List<Widget > get_widget_children () {
98+ var widget_children = new Gee .ArrayList<Widget > ();
9999 for (var child = get_first_child (); child != null ; child = child. get_next_sibling ()) {
100- if (child is Focusable && child. visible) {
101- focusable_children . add ((Focusable ) child);
100+ if (child is Widget && child. visible) {
101+ widget_children . add ((Widget ) child);
102102 }
103103 }
104- return focusable_children ;
104+ return widget_children ;
105105 }
106106}
0 commit comments