mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
Convert fallthrough comments to G_GNUC_FALLTHROUGH
This way it's very obvious that fallthrough is indeed what we want. Also bump the glib requirement to 2.59 which introduced G_GNUC_FALLTHROUGH.
This commit is contained in:
parent
90870194ff
commit
0791924bf7
@ -386,7 +386,8 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
_gdk_frame_clock_emit_before_paint (clock);
|
||||
priv->phase = GDK_FRAME_CLOCK_PHASE_UPDATE;
|
||||
}
|
||||
/* fallthrough */
|
||||
G_GNUC_FALLTHROUGH;
|
||||
|
||||
case GDK_FRAME_CLOCK_PHASE_UPDATE:
|
||||
if (priv->freeze_count == 0)
|
||||
{
|
||||
@ -397,7 +398,8 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
_gdk_frame_clock_emit_update (clock);
|
||||
}
|
||||
}
|
||||
/* fallthrough */
|
||||
G_GNUC_FALLTHROUGH;
|
||||
|
||||
case GDK_FRAME_CLOCK_PHASE_LAYOUT:
|
||||
if (priv->freeze_count == 0)
|
||||
{
|
||||
@ -427,7 +429,8 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
if (iter == 5)
|
||||
g_warning ("gdk-frame-clock: layout continuously requested, giving up after 4 tries");
|
||||
}
|
||||
/* fallthrough */
|
||||
G_GNUC_FALLTHROUGH;
|
||||
|
||||
case GDK_FRAME_CLOCK_PHASE_PAINT:
|
||||
if (priv->freeze_count == 0)
|
||||
{
|
||||
@ -447,7 +450,8 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
_gdk_frame_clock_emit_paint (clock);
|
||||
}
|
||||
}
|
||||
/* fallthrough */
|
||||
G_GNUC_FALLTHROUGH;
|
||||
|
||||
case GDK_FRAME_CLOCK_PHASE_AFTER_PAINT:
|
||||
if (priv->freeze_count == 0)
|
||||
{
|
||||
@ -462,7 +466,8 @@ gdk_frame_clock_paint_idle (void *data)
|
||||
timings->frame_end_time = g_get_monotonic_time ();
|
||||
#endif /* G_ENABLE_DEBUG */
|
||||
}
|
||||
/* fallthrough */
|
||||
G_GNUC_FALLTHROUGH;
|
||||
|
||||
case GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS:
|
||||
default:
|
||||
;
|
||||
|
@ -2830,8 +2830,8 @@ gdk_event_translate (MSG *msg,
|
||||
{
|
||||
generate_grab_broken_event (_gdk_device_manager, keyboard_grab->surface, TRUE, NULL);
|
||||
}
|
||||
G_GNUC_FALLTHROUGH;
|
||||
|
||||
/* fallthrough */
|
||||
case WM_SETFOCUS:
|
||||
if (keyboard_grab != NULL &&
|
||||
!keyboard_grab->owner_events)
|
||||
|
@ -775,8 +775,8 @@ _gdk_device_manager_core_handle_focus (GdkSurface *surface,
|
||||
#endif /* XINPUT_2 */
|
||||
mode != NotifyUngrab)
|
||||
toplevel->has_pointer_focus = (focus_in) ? FALSE : TRUE;
|
||||
G_GNUC_FALLTHROUGH;
|
||||
|
||||
/* fall through */
|
||||
case NotifyNonlinear:
|
||||
case NotifyNonlinearVirtual:
|
||||
if (mode != NotifyGrab &&
|
||||
|
@ -2238,7 +2238,7 @@ gtk_combo_box_real_move_active (GtkComboBox *combo_box,
|
||||
&iter, &new_iter);
|
||||
break;
|
||||
}
|
||||
/* else fall through */
|
||||
G_GNUC_FALLTHROUGH;
|
||||
|
||||
case GTK_SCROLL_PAGE_FORWARD:
|
||||
case GTK_SCROLL_PAGE_DOWN:
|
||||
@ -2256,7 +2256,7 @@ gtk_combo_box_real_move_active (GtkComboBox *combo_box,
|
||||
&iter, &new_iter);
|
||||
break;
|
||||
}
|
||||
/* else fall through */
|
||||
G_GNUC_FALLTHROUGH;
|
||||
|
||||
case GTK_SCROLL_PAGE_BACKWARD:
|
||||
case GTK_SCROLL_PAGE_UP:
|
||||
|
@ -104,7 +104,7 @@ gtk_css_value_dimension_compute (GtkCssValue *number,
|
||||
{
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
/* fall through */
|
||||
G_GNUC_FALLTHROUGH;
|
||||
case GTK_CSS_PERCENT:
|
||||
/* percentages for font sizes are computed, other percentages aren't */
|
||||
if (property_id == GTK_CSS_PROPERTY_FONT_SIZE)
|
||||
|
@ -605,7 +605,7 @@ completion_store_set (GtkFileSystemModel *model,
|
||||
{
|
||||
case FULL_PATH_COLUMN:
|
||||
prefix = chooser_entry->dir_part;
|
||||
/* fall through */
|
||||
G_GNUC_FALLTHROUGH;
|
||||
case DISPLAY_NAME_COLUMN:
|
||||
if (_gtk_file_info_consider_as_directory (info))
|
||||
suffix = G_DIR_SEPARATOR_S;
|
||||
|
@ -1981,7 +1981,8 @@ gtk_main_do_event (GdkEvent *event)
|
||||
gtk_window_set_mnemonics_visible (GTK_WINDOW (window), FALSE);
|
||||
}
|
||||
}
|
||||
/* else fall through */
|
||||
G_GNUC_FALLTHROUGH;
|
||||
|
||||
case GDK_SCROLL:
|
||||
case GDK_BUTTON_PRESS:
|
||||
case GDK_TOUCH_BEGIN:
|
||||
|
@ -3027,7 +3027,7 @@ update_arrow_nodes (GtkNotebook *notebook)
|
||||
next_widget = priv->arrow_widget[1];
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
G_GNUC_FALLTHROUGH;
|
||||
case 1:
|
||||
if (priv->children)
|
||||
{
|
||||
@ -3040,14 +3040,14 @@ update_arrow_nodes (GtkNotebook *notebook)
|
||||
next_widget = priv->arrow_widget[2];
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
G_GNUC_FALLTHROUGH;
|
||||
case 2:
|
||||
if (priv->arrow_widget[3])
|
||||
{
|
||||
next_widget = priv->arrow_widget[3];
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
G_GNUC_FALLTHROUGH;
|
||||
case 3:
|
||||
next_widget = NULL;
|
||||
break;
|
||||
|
@ -5861,7 +5861,7 @@ gtk_text_view_move_cursor (GtkTextView *text_view,
|
||||
{
|
||||
case GTK_MOVEMENT_VISUAL_POSITIONS:
|
||||
leave_direction = count > 0 ? GTK_DIR_RIGHT : GTK_DIR_LEFT;
|
||||
/* fall through */
|
||||
G_GNUC_FALLTHROUGH;
|
||||
case GTK_MOVEMENT_LOGICAL_POSITIONS:
|
||||
case GTK_MOVEMENT_WORDS:
|
||||
scroll_step = GTK_SCROLL_HORIZONTAL_STEPS;
|
||||
@ -5871,7 +5871,7 @@ gtk_text_view_move_cursor (GtkTextView *text_view,
|
||||
break;
|
||||
case GTK_MOVEMENT_DISPLAY_LINES:
|
||||
leave_direction = count > 0 ? GTK_DIR_DOWN : GTK_DIR_UP;
|
||||
/* fall through */
|
||||
G_GNUC_FALLTHROUGH;
|
||||
case GTK_MOVEMENT_PARAGRAPHS:
|
||||
case GTK_MOVEMENT_PARAGRAPH_ENDS:
|
||||
scroll_step = GTK_SCROLL_STEPS;
|
||||
|
@ -1434,7 +1434,7 @@ multipress_gesture_pressed_cb (GtkGestureMultiPress *gesture,
|
||||
sequence, GTK_EVENT_SEQUENCE_DENIED);
|
||||
return;
|
||||
}
|
||||
/* fall through */
|
||||
G_GNUC_FALLTHROUGH;
|
||||
|
||||
case GTK_WINDOW_REGION_TITLE:
|
||||
if (n_press == 2)
|
||||
|
@ -11,7 +11,7 @@ project('gtk', 'c',
|
||||
license: 'LGPLv2.1+')
|
||||
|
||||
glib_major_req = 2
|
||||
glib_minor_req = 55
|
||||
glib_minor_req = 59
|
||||
glib_micro_req = 0
|
||||
|
||||
if glib_minor_req.is_odd()
|
||||
|
Loading…
Reference in New Issue
Block a user