gtk: don't always invalidate spinbuttons on each leave_notify()
but only when an arrow was prelighted. Also, chain up unconditonally in enter_notify() and leave_notify() because GtkEntry implements them too.
This commit is contained in:
		@ -1115,10 +1115,7 @@ gtk_spin_button_enter_notify (GtkWidget        *widget,
 | 
			
		||||
      gtk_widget_queue_draw (GTK_WIDGET (spin));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  if (GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->enter_notify_event)
 | 
			
		||||
  return GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->enter_notify_event (widget, event);
 | 
			
		||||
 | 
			
		||||
  return FALSE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static gint
 | 
			
		||||
@ -1128,13 +1125,13 @@ gtk_spin_button_leave_notify (GtkWidget        *widget,
 | 
			
		||||
  GtkSpinButton *spin = GTK_SPIN_BUTTON (widget);
 | 
			
		||||
  GtkSpinButtonPrivate *priv = spin->priv;
 | 
			
		||||
 | 
			
		||||
  if (priv->in_child != NO_ARROW)
 | 
			
		||||
    {
 | 
			
		||||
      priv->in_child = NO_ARROW;
 | 
			
		||||
      gtk_widget_queue_draw (GTK_WIDGET (spin));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  if (GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->leave_notify_event)
 | 
			
		||||
  return GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->leave_notify_event (widget, event);
 | 
			
		||||
 | 
			
		||||
  return FALSE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static gint
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user