core/context: Fix if/else cascade for disabled native backend
If the native backend is disabled but X11 and wayland are enabled, there is a free standing else. Fix this by relying on the returns for control flow. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4123>
This commit is contained in:

committed by
Marge Bot

parent
55910e467f
commit
6b72184173
@@ -511,12 +511,11 @@ meta_context_main_create_backend (MetaContext *context,
|
|||||||
#ifdef HAVE_X11
|
#ifdef HAVE_X11
|
||||||
if (context_main->options.nested)
|
if (context_main->options.nested)
|
||||||
return create_nested_backend (context, error);
|
return create_nested_backend (context, error);
|
||||||
else
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_NATIVE_BACKEND
|
#ifdef HAVE_NATIVE_BACKEND
|
||||||
if (context_main->options.headless)
|
if (context_main->options.headless)
|
||||||
return create_headless_backend (context, error);
|
return create_headless_backend (context, error);
|
||||||
else
|
|
||||||
return create_native_backend (context, error);
|
return create_native_backend (context, error);
|
||||||
#endif /* HAVE_NATIVE_BACKEND */
|
#endif /* HAVE_NATIVE_BACKEND */
|
||||||
#else /* HAVE_WAYLAND */
|
#else /* HAVE_WAYLAND */
|
||||||
|
Reference in New Issue
Block a user