mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 14:10:30 +00:00
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:
parent
15004e5930
commit
efb4f2db50
@ -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])
|
||||
|
Loading…
Reference in New Issue
Block a user