calendar: grab focus first, emit signals after

It may be unusual, but handlers of day-selected may want to transfer
focus somewhere else, without getting it reset back right after by/to
the calendar. This makes popovers demo work on the calendar again, for
one...
This commit is contained in:
Carlos Garnacho 2014-03-07 02:35:30 +01:00
parent 15004e5930
commit efb4f2db50

View File

@ -3001,12 +3001,12 @@ gtk_calendar_button_press (GtkWidget *widget,
GtkCalendarPrivate *priv = calendar->priv;
gint arrow = -1;
if (event->window == priv->main_win)
calendar_main_button_press (calendar, event);
if (!gtk_widget_has_focus (widget))
gtk_widget_grab_focus (widget);
if (event->window == priv->main_win)
calendar_main_button_press (calendar, event);
for (arrow = ARROW_YEAR_LEFT; arrow <= ARROW_MONTH_RIGHT; arrow++)
{
if (event->window == priv->arrow_win[arrow])