mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
Use G_GNUC_FALLTHROUGH instead of comments
Get the same task done in a bit more C:y way. https://gitlab.gnome.org/GNOME/mutter/merge_requests/998
This commit is contained in:
parent
17e20619ec
commit
6e5ac0b585
@ -1523,7 +1523,7 @@ event_click_count_generate (ClutterEvent *event)
|
|||||||
previous_y = event->button.y;
|
previous_y = event->button.y;
|
||||||
previous_time = event->button.time;
|
previous_time = event->button.time;
|
||||||
|
|
||||||
/* fallthrough */
|
G_GNUC_FALLTHROUGH;
|
||||||
case CLUTTER_BUTTON_RELEASE:
|
case CLUTTER_BUTTON_RELEASE:
|
||||||
event->button.click_count = click_count;
|
event->button.click_count = click_count;
|
||||||
break;
|
break;
|
||||||
@ -1871,7 +1871,7 @@ _clutter_process_event_details (ClutterActor *stage,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fallthrough from motion */
|
G_GNUC_FALLTHROUGH;
|
||||||
case CLUTTER_BUTTON_PRESS:
|
case CLUTTER_BUTTON_PRESS:
|
||||||
case CLUTTER_BUTTON_RELEASE:
|
case CLUTTER_BUTTON_RELEASE:
|
||||||
#ifdef CLUTTER_WINDOWING_X11
|
#ifdef CLUTTER_WINDOWING_X11
|
||||||
@ -2016,7 +2016,7 @@ _clutter_process_event_details (ClutterActor *stage,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fallthrough from motion */
|
G_GNUC_FALLTHROUGH;
|
||||||
case CLUTTER_TOUCH_BEGIN:
|
case CLUTTER_TOUCH_BEGIN:
|
||||||
case CLUTTER_TOUCH_CANCEL:
|
case CLUTTER_TOUCH_CANCEL:
|
||||||
case CLUTTER_TOUCH_END:
|
case CLUTTER_TOUCH_END:
|
||||||
|
@ -509,7 +509,7 @@ parse_argument (const char *string, /* original user string */
|
|||||||
if (parsing_factor)
|
if (parsing_factor)
|
||||||
arg->factor.is_color = TRUE;
|
arg->factor.is_color = TRUE;
|
||||||
|
|
||||||
/* fall through */
|
G_GNUC_FALLTHROUGH;
|
||||||
case PARSER_ARG_STATE_SCRAPING_COLOR_SRC_NAME:
|
case PARSER_ARG_STATE_SCRAPING_COLOR_SRC_NAME:
|
||||||
if (!is_symbol_char (*p))
|
if (!is_symbol_char (*p))
|
||||||
{
|
{
|
||||||
@ -540,7 +540,7 @@ parse_argument (const char *string, /* original user string */
|
|||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* fall through */
|
G_GNUC_FALLTHROUGH;
|
||||||
case PARSER_ARG_STATE_MAYBE_COLOR_MASK:
|
case PARSER_ARG_STATE_MAYBE_COLOR_MASK:
|
||||||
if (*p != '[')
|
if (*p != '[')
|
||||||
{
|
{
|
||||||
@ -554,7 +554,7 @@ parse_argument (const char *string, /* original user string */
|
|||||||
state = PARSER_ARG_STATE_SCRAPING_MASK;
|
state = PARSER_ARG_STATE_SCRAPING_MASK;
|
||||||
mark = p;
|
mark = p;
|
||||||
|
|
||||||
/* fall through */
|
G_GNUC_FALLTHROUGH;
|
||||||
case PARSER_ARG_STATE_SCRAPING_MASK:
|
case PARSER_ARG_STATE_SCRAPING_MASK:
|
||||||
if (*p == ']')
|
if (*p == ']')
|
||||||
{
|
{
|
||||||
@ -687,7 +687,7 @@ parse_argument (const char *string, /* original user string */
|
|||||||
arg->factor.is_one = TRUE;
|
arg->factor.is_one = TRUE;
|
||||||
state = PARSER_ARG_STATE_EXPECT_END;
|
state = PARSER_ARG_STATE_EXPECT_END;
|
||||||
|
|
||||||
/* fall through */
|
G_GNUC_FALLTHROUGH;
|
||||||
case PARSER_ARG_STATE_EXPECT_END:
|
case PARSER_ARG_STATE_EXPECT_END:
|
||||||
if (*p != ',' && *p != ')')
|
if (*p != ',' && *p != ')')
|
||||||
{
|
{
|
||||||
@ -787,7 +787,7 @@ _cogl_blend_string_compile (const char *string,
|
|||||||
mark = p;
|
mark = p;
|
||||||
state = PARSER_STATE_SCRAPING_DEST_CHANNELS;
|
state = PARSER_STATE_SCRAPING_DEST_CHANNELS;
|
||||||
|
|
||||||
/* fall through */
|
G_GNUC_FALLTHROUGH;
|
||||||
case PARSER_STATE_SCRAPING_DEST_CHANNELS:
|
case PARSER_STATE_SCRAPING_DEST_CHANNELS:
|
||||||
if (*p != '=')
|
if (*p != '=')
|
||||||
continue;
|
continue;
|
||||||
@ -810,7 +810,7 @@ _cogl_blend_string_compile (const char *string,
|
|||||||
mark = p;
|
mark = p;
|
||||||
state = PARSER_STATE_SCRAPING_FUNCTION_NAME;
|
state = PARSER_STATE_SCRAPING_FUNCTION_NAME;
|
||||||
|
|
||||||
/* fall through */
|
G_GNUC_FALLTHROUGH;
|
||||||
case PARSER_STATE_SCRAPING_FUNCTION_NAME:
|
case PARSER_STATE_SCRAPING_FUNCTION_NAME:
|
||||||
if (*p != '(')
|
if (*p != '(')
|
||||||
{
|
{
|
||||||
@ -832,7 +832,7 @@ _cogl_blend_string_compile (const char *string,
|
|||||||
current_arg = 0;
|
current_arg = 0;
|
||||||
state = PARSER_STATE_EXPECT_ARG_START;
|
state = PARSER_STATE_EXPECT_ARG_START;
|
||||||
|
|
||||||
/* fall through */
|
G_GNUC_FALLTHROUGH;
|
||||||
case PARSER_STATE_EXPECT_ARG_START:
|
case PARSER_STATE_EXPECT_ARG_START:
|
||||||
if (*p != '(' && *p != ',')
|
if (*p != '(' && *p != ',')
|
||||||
continue;
|
continue;
|
||||||
|
@ -282,7 +282,7 @@ meta_screen_cast_monitor_stream_src_enable (MetaScreenCastStreamSrc *src)
|
|||||||
g_signal_connect_after (cursor_tracker, "cursor-changed",
|
g_signal_connect_after (cursor_tracker, "cursor-changed",
|
||||||
G_CALLBACK (cursor_changed),
|
G_CALLBACK (cursor_changed),
|
||||||
monitor_src);
|
monitor_src);
|
||||||
/* Intentional fall-through */
|
G_GNUC_FALLTHROUGH;
|
||||||
case META_SCREEN_CAST_CURSOR_MODE_HIDDEN:
|
case META_SCREEN_CAST_CURSOR_MODE_HIDDEN:
|
||||||
monitor_src->paint_watch =
|
monitor_src->paint_watch =
|
||||||
meta_stage_watch_view (meta_stage,
|
meta_stage_watch_view (meta_stage,
|
||||||
|
@ -367,7 +367,7 @@ emit_barrier_event (MetaBarrierImplNative *self,
|
|||||||
case META_BARRIER_STATE_LEFT:
|
case META_BARRIER_STATE_LEFT:
|
||||||
self->state = META_BARRIER_STATE_ACTIVE;
|
self->state = META_BARRIER_STATE_ACTIVE;
|
||||||
|
|
||||||
/* Intentional fall-through. */
|
G_GNUC_FALLTHROUGH;
|
||||||
case META_BARRIER_STATE_HELD:
|
case META_BARRIER_STATE_HELD:
|
||||||
event->dt = time - self->last_event_time;
|
event->dt = time - self->last_event_time;
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ maybe_spoof_event_as_stage_event (MetaBackendX11 *x11,
|
|||||||
case XI_ButtonRelease:
|
case XI_ButtonRelease:
|
||||||
maybe_translate_touch_replay_pointer_event (x11,
|
maybe_translate_touch_replay_pointer_event (x11,
|
||||||
(XIDeviceEvent *) input_event);
|
(XIDeviceEvent *) input_event);
|
||||||
/* Intentional fall-through */
|
G_GNUC_FALLTHROUGH;
|
||||||
case XI_KeyPress:
|
case XI_KeyPress:
|
||||||
case XI_KeyRelease:
|
case XI_KeyRelease:
|
||||||
case XI_TouchBegin:
|
case XI_TouchBegin:
|
||||||
|
@ -394,7 +394,7 @@ meta_sync_free (MetaSync *self)
|
|||||||
XIfEvent (self->xdisplay, &event, alarm_event_predicate, (XPointer) self);
|
XIfEvent (self->xdisplay, &event, alarm_event_predicate, (XPointer) self);
|
||||||
meta_sync_handle_event (self, (XSyncAlarmNotifyEvent *) &event);
|
meta_sync_handle_event (self, (XSyncAlarmNotifyEvent *) &event);
|
||||||
}
|
}
|
||||||
/* fall through */
|
G_GNUC_FALLTHROUGH;
|
||||||
case META_SYNC_STATE_READY:
|
case META_SYNC_STATE_READY:
|
||||||
XSyncTriggerFence (self->xdisplay, self->xfence);
|
XSyncTriggerFence (self->xdisplay, self->xfence);
|
||||||
XFlush (self->xdisplay);
|
XFlush (self->xdisplay);
|
||||||
|
@ -637,7 +637,7 @@ gesture_tracker_state_changed (MetaGestureTracker *tracker,
|
|||||||
case META_SEQUENCE_ACCEPTED:
|
case META_SEQUENCE_ACCEPTED:
|
||||||
meta_display_cancel_touch (display);
|
meta_display_cancel_touch (display);
|
||||||
|
|
||||||
/* Intentional fall-through */
|
G_GNUC_FALLTHROUGH;
|
||||||
case META_SEQUENCE_REJECTED:
|
case META_SEQUENCE_REJECTED:
|
||||||
{
|
{
|
||||||
MetaBackend *backend;
|
MetaBackend *backend;
|
||||||
|
@ -1597,7 +1597,7 @@ meta_window_x11_update_struts (MetaWindow *window)
|
|||||||
{
|
{
|
||||||
case META_SIDE_RIGHT:
|
case META_SIDE_RIGHT:
|
||||||
temp->rect.x = BOX_RIGHT(temp->rect) - thickness;
|
temp->rect.x = BOX_RIGHT(temp->rect) - thickness;
|
||||||
/* Intentionally fall through without breaking */
|
G_GNUC_FALLTHROUGH;
|
||||||
case META_SIDE_LEFT:
|
case META_SIDE_LEFT:
|
||||||
temp->rect.width = thickness;
|
temp->rect.width = thickness;
|
||||||
temp->rect.y = strut_begin;
|
temp->rect.y = strut_begin;
|
||||||
@ -1605,7 +1605,7 @@ meta_window_x11_update_struts (MetaWindow *window)
|
|||||||
break;
|
break;
|
||||||
case META_SIDE_BOTTOM:
|
case META_SIDE_BOTTOM:
|
||||||
temp->rect.y = BOX_BOTTOM(temp->rect) - thickness;
|
temp->rect.y = BOX_BOTTOM(temp->rect) - thickness;
|
||||||
/* Intentionally fall through without breaking */
|
G_GNUC_FALLTHROUGH;
|
||||||
case META_SIDE_TOP:
|
case META_SIDE_TOP:
|
||||||
temp->rect.height = thickness;
|
temp->rect.height = thickness;
|
||||||
temp->rect.x = strut_begin;
|
temp->rect.x = strut_begin;
|
||||||
@ -1661,13 +1661,13 @@ meta_window_x11_update_struts (MetaWindow *window)
|
|||||||
{
|
{
|
||||||
case META_SIDE_RIGHT:
|
case META_SIDE_RIGHT:
|
||||||
temp->rect.x = BOX_RIGHT(temp->rect) - thickness;
|
temp->rect.x = BOX_RIGHT(temp->rect) - thickness;
|
||||||
/* Intentionally fall through without breaking */
|
G_GNUC_FALLTHROUGH;
|
||||||
case META_SIDE_LEFT:
|
case META_SIDE_LEFT:
|
||||||
temp->rect.width = thickness;
|
temp->rect.width = thickness;
|
||||||
break;
|
break;
|
||||||
case META_SIDE_BOTTOM:
|
case META_SIDE_BOTTOM:
|
||||||
temp->rect.y = BOX_BOTTOM(temp->rect) - thickness;
|
temp->rect.y = BOX_BOTTOM(temp->rect) - thickness;
|
||||||
/* Intentionally fall through without breaking */
|
G_GNUC_FALLTHROUGH;
|
||||||
case META_SIDE_TOP:
|
case META_SIDE_TOP:
|
||||||
temp->rect.height = thickness;
|
temp->rect.height = thickness;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user