Small change : container focus handling



Hi!
   
I would like to change a little detail in gtk_container_focus_move.
The checking order of GTK_WIDGET_CAN_FOCUS and GTK_IS_CONTAINER
should be reverted :
  

[...]
      else if (GTK_WIDGET_VISIBLE (child))
        {
          if (GTK_IS_CONTAINER (child))
            {
              if (gtk_container_focus (GTK_CONTAINER (child), direction))
                return TRUE;
            }
          else if (GTK_WIDGET_CAN_FOCUS (child))
            {
              gtk_widget_grab_focus (child);
              return TRUE;
            }
        }
[...]  

This fix wouldn't change much for most widgets, except for containers
with GTK_WIDGET_CAN_FOCUS flag set and an own focus handling. For
those focus handling will become much more consistent, because they'll
receive the focus via gtk_container_focus instead of an random mix of
gtk_widget_focus_in and gtk_container_focus.

If nobody objects, I'll change it within the next few days.

bye,
  Lars



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]