mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
build: Make libcanberra no longer optional
This is not the case anymore with MetaSoundPlayer in place, and also important to get keyboard bell right.
This commit is contained in:
parent
58b5dee869
commit
956ab4bd58
@ -28,9 +28,6 @@
|
||||
/* Defined if EGLStream support is enabled */
|
||||
#mesondefine HAVE_WAYLAND_EGLSTREAM
|
||||
|
||||
/* Building with libcanberra for playing sounds */
|
||||
#mesondefine HAVE_LIBCANBERRA
|
||||
|
||||
/* Building with gudev for device type detection */
|
||||
#mesondefine HAVE_LIBGUDEV
|
||||
|
||||
|
26
configure.ac
26
configure.ac
@ -128,11 +128,6 @@ AC_ARG_ENABLE(startup-notification,
|
||||
[disable mutter's startup notification support, for embedded/size-sensitive custom non-GNOME builds]),,
|
||||
enable_startup_notification=auto)
|
||||
|
||||
AC_ARG_WITH(libcanberra,
|
||||
AC_HELP_STRING([--without-libcanberra],
|
||||
[disable the use of libcanberra for playing sounds]),,
|
||||
with_libcanberra=auto)
|
||||
|
||||
AC_ARG_WITH(libwacom,
|
||||
AC_HELP_STRING([--without-libwacom],
|
||||
[disable the use of libwacom for advanced tablet management]),,
|
||||
@ -186,22 +181,12 @@ else
|
||||
echo "Building without libstartup-notification"
|
||||
fi
|
||||
|
||||
have_libcanberra=no
|
||||
AC_MSG_CHECKING([libcanberra-gtk])
|
||||
if test x$with_libcanberra = xno ; then
|
||||
AC_MSG_RESULT([disabled])
|
||||
if $PKG_CONFIG --exists $CANBERRA_GTK '>=' $CANBERRA_GTK_VERSION; then
|
||||
AC_MSG_RESULT(yes)
|
||||
MUTTER_PC_MODULES="$MUTTER_PC_MODULES $CANBERRA_GTK"
|
||||
else
|
||||
if $PKG_CONFIG --exists $CANBERRA_GTK '>=' $CANBERRA_GTK_VERSION; then
|
||||
have_libcanberra=yes
|
||||
AC_MSG_RESULT(yes)
|
||||
MUTTER_PC_MODULES="$MUTTER_PC_MODULES $CANBERRA_GTK"
|
||||
AC_DEFINE([HAVE_LIBCANBERRA], 1, [Building with libcanberra for playing sounds])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test x$with_libcanberra = xyes ; then
|
||||
AC_MSG_ERROR([libcanberra forced and libcanberra-gtk was not found])
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_ERROR([libcanberra was not found])
|
||||
fi
|
||||
|
||||
have_libwacom=no
|
||||
@ -544,7 +529,6 @@ mutter-$VERSION
|
||||
compiler: ${CC}
|
||||
|
||||
Startup notification: ${have_startup_notification}
|
||||
libcanberra: ${have_libcanberra}
|
||||
libwacom: ${have_libwacom}
|
||||
gudev ${have_gudev}
|
||||
Introspection: ${found_introspection}
|
||||
|
@ -117,6 +117,7 @@ xcb_res_dep = dependency('xcb-res')
|
||||
xinerama_dep = dependency('xinerama')
|
||||
ice_dep = dependency('ice')
|
||||
atk_dep = dependency('atk', version: atk_req)
|
||||
libcanberra_gtk3_dep = dependency('libcanberra-gtk3', version: libcanberra_gtk3_req)
|
||||
|
||||
# For now always require X11 support
|
||||
have_x11 = true
|
||||
@ -212,11 +213,6 @@ if have_sm
|
||||
sm_dep = dependency('sm')
|
||||
endif
|
||||
|
||||
have_libcanberra = get_option('libcanberra')
|
||||
if have_libcanberra
|
||||
libcanberra_gtk3_dep = dependency('libcanberra-gtk3', version: libcanberra_gtk3_req)
|
||||
endif
|
||||
|
||||
have_libwacom = get_option('libwacom')
|
||||
if have_libwacom
|
||||
libwacom_dep = dependency('libwacom', version: libwacom_req)
|
||||
@ -292,7 +288,6 @@ cdata.set('HAVE_REMOTE_DESKTOP', have_remote_desktop)
|
||||
cdata.set('HAVE_EGL_DEVICE', have_egl_device)
|
||||
cdata.set('HAVE_WAYLAND_EGLSTREAM', have_wayland_eglstream)
|
||||
cdata.set('HAVE_LIBGUDEV', have_libgudev)
|
||||
cdata.set('HAVE_LIBCANBERRA', have_libcanberra)
|
||||
cdata.set('HAVE_LIBWACOM', have_libwacom)
|
||||
cdata.set('HAVE_SM', have_sm)
|
||||
cdata.set('HAVE_STARTUP_NOTIFICATION', have_startup_notification)
|
||||
@ -358,7 +353,6 @@ output = [
|
||||
' EGL Device............... ' + have_egl_device.to_string(),
|
||||
' Remote desktop........... ' + have_remote_desktop.to_string(),
|
||||
' gudev.................... ' + have_libgudev.to_string(),
|
||||
' canberra................. ' + have_libcanberra.to_string(),
|
||||
' Wacom.................... ' + have_libwacom.to_string(),
|
||||
' SM....................... ' + have_sm.to_string(),
|
||||
' Startup notification..... ' + have_startup_notification.to_string(),
|
||||
|
@ -81,12 +81,6 @@ option('pango_ft2',
|
||||
description: 'Enable PangoFt2 support'
|
||||
)
|
||||
|
||||
option('libcanberra',
|
||||
type: 'boolean',
|
||||
value: true,
|
||||
description: 'Enable libcanberra support'
|
||||
)
|
||||
|
||||
option('startup_notification',
|
||||
type: 'boolean',
|
||||
value: true,
|
||||
|
@ -51,9 +51,7 @@
|
||||
|
||||
#include "core/bell.h"
|
||||
|
||||
#ifdef HAVE_LIBCANBERRA
|
||||
#include <canberra-gtk.h>
|
||||
#endif
|
||||
|
||||
#include "compositor/compositor-private.h"
|
||||
#include "core/util-private.h"
|
||||
@ -248,7 +246,6 @@ static gboolean
|
||||
bell_audible_notify (MetaDisplay *display,
|
||||
MetaWindow *window)
|
||||
{
|
||||
#ifdef HAVE_LIBCANBERRA
|
||||
ca_proplist *p;
|
||||
int res;
|
||||
|
||||
@ -270,9 +267,6 @@ bell_audible_notify (MetaDisplay *display,
|
||||
ca_proplist_destroy (p);
|
||||
|
||||
return res == CA_SUCCESS || res == CA_ERROR_DISABLED;
|
||||
#endif /* HAVE_LIBCANBERRA */
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
@ -37,9 +37,7 @@
|
||||
|
||||
#include <X11/Xatom.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_LIBCANBERRA
|
||||
#include <canberra-gtk.h>
|
||||
#endif
|
||||
|
||||
#include "backends/meta-backend-private.h"
|
||||
#include "backends/meta-logical-monitor.h"
|
||||
@ -441,7 +439,6 @@ static void
|
||||
workspace_switch_sound(MetaWorkspace *from,
|
||||
MetaWorkspace *to)
|
||||
{
|
||||
#ifdef HAVE_LIBCANBERRA
|
||||
MetaWorkspaceLayout layout;
|
||||
int i, nw, x, y, fi, ti;
|
||||
const char *e;
|
||||
@ -497,7 +494,6 @@ workspace_switch_sound(MetaWorkspace *from,
|
||||
|
||||
finish:
|
||||
meta_workspace_manager_free_workspace_layout (&layout);
|
||||
#endif /* HAVE_LIBCANBERRA */
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -23,6 +23,7 @@ mutter_pkg_deps = [
|
||||
json_glib_dep,
|
||||
pango_dep,
|
||||
xkbcommon_dep,
|
||||
libcanberra_gtk3_dep,
|
||||
]
|
||||
|
||||
if have_gl
|
||||
@ -56,12 +57,6 @@ if have_startup_notification
|
||||
]
|
||||
endif
|
||||
|
||||
if have_libcanberra
|
||||
mutter_pkg_deps += [
|
||||
libcanberra_gtk3_dep,
|
||||
]
|
||||
endif
|
||||
|
||||
if have_libwacom
|
||||
mutter_pkg_deps += [
|
||||
libwacom_dep,
|
||||
|
@ -488,13 +488,9 @@ static void
|
||||
set_x11_bell_is_audible (MetaX11Display *x11_display,
|
||||
gboolean is_audible)
|
||||
{
|
||||
#ifdef HAVE_LIBCANBERRA
|
||||
/* When we are playing sounds using libcanberra support, we handle the
|
||||
* bell whether its an audible bell or a visible bell */
|
||||
gboolean enable_system_bell = FALSE;
|
||||
#else
|
||||
gboolean enable_system_bell = is_audible;
|
||||
#endif /* HAVE_LIBCANBERRA */
|
||||
|
||||
XkbChangeEnabledControls (x11_display->xdisplay,
|
||||
XkbUseCoreKbd,
|
||||
|
Loading…
Reference in New Issue
Block a user