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