fix e_alert build with wayland only

This commit is contained in:
Mike Blumenkrantz 2017-07-14 18:44:23 -04:00
parent 94633fbde1
commit a57e39a5ea
3 changed files with 20 additions and 23 deletions

View File

@ -904,36 +904,29 @@ AM_CONDITIONAL([HAVE_WAYLAND_ONLY], [test "x${have_wayland_only}" = "xyes"])
e_alert_requires="\
evas >= $efl_version \
ecore >= $efl_version \
xcb \
xcb-shape \
xcb-keysyms \
eina >= ${efl_version} \
ecore >= ${efl_version} \
ecore-ipc >= ${efl_version}"
if test "x${have_wayland}" = "xyes"; then
if test "x${HAVE_WL_DRM}" = "xyes"; then
if test "x${have_ecore_drm2}" = "xyes"; then
e_alert_requires="\
$e_alert_requires \
ecore-input >= ${efl_version} \
ecore-drm2 >= ${efl_ecore_drm2_version} \
evas >= ${efl_version}"
else
e_alert_requires="\
$e_alert_requires \
ecore-input >= ${efl_version} \
ecore-drm >= ${efl_version} \
evas >= ${efl_version}"
fi
ecore-drm2 >= ${efl_ecore_drm2_version}"
fi
fi
if test "x${have_wayland_only}" != "xyes"; then
PKG_CHECK_MODULES(E_ALERT, [$e_alert_requires])
e_alert_requires="\
$e_alert_requires \
xcb \
xcb-shape \
xcb-keysyms"
fi
PKG_CHECK_MODULES(E_ALERT, [$e_alert_requires])
if test "x${have_wayland_only}" != "xyes"; then
e_requires="$e_requires ecore-x >= $efl_version"
fi

View File

@ -49,11 +49,9 @@ src/bin/enlightenment_fm_op \
src/bin/enlightenment_sys \
src/bin/enlightenment_thumb \
src/bin/enlightenment_elm_cfgtool \
src/bin/enlightenment_static_grabber
src/bin/enlightenment_static_grabber \
src/bin/enlightenment_alert
if ! HAVE_WAYLAND_ONLY
internal_bin_PROGRAMS += src/bin/enlightenment_alert
endif
if HAVE_FREEBSD
internal_bin_PROGRAMS += src/bin/enlightenment_ckpasswd
endif

View File

@ -15,11 +15,12 @@
#include <Eina.h>
#include <Ecore.h>
#include <Ecore_Ipc.h>
#ifndef HAVE_WAYLAND_ONLY
#include <xcb/xcb.h>
#include <xcb/xcb_keysyms.h>
#include <xcb/shape.h>
#include <X11/keysym.h>
#endif
#ifdef HAVE_WL_DRM
# include <Ecore_Input.h>
# ifdef HAVE_DRM2
@ -67,6 +68,7 @@
#define WINDOW_WIDTH 320
#define WINDOW_HEIGHT 240
#ifndef HAVE_WAYLAND_ONLY
#ifndef XCB_ATOM_NONE
# define XCB_ATOM_NONE 0
#endif
@ -100,9 +102,9 @@ static xcb_window_t btn2 = 0;
static xcb_font_t font = 0;
static xcb_gcontext_t gc = 0;
static int fa = 0, fw = 0;
#endif
static int sw = 0, sh = 0;
static int fh = 0;
static const char *title = NULL, *str1 = NULL, *str2 = NULL;
static int ret = 0, sig = 0;
static pid_t pid;
@ -724,8 +726,11 @@ main(int argc, char **argv)
_e_alert_drm_run();
_e_alert_drm_shutdown();
}
#endif
#if defined(HAVE_WL_DRM) && !defined(HAVE_WAYLAND_ONLY)
else
#endif
#ifndef HAVE_WAYLAND_ONLY
{
if (!_e_alert_connect())
{
@ -738,14 +743,14 @@ main(int argc, char **argv)
_e_alert_run();
_e_alert_shutdown();
}
#endif
ecore_shutdown();
/* ret == 1 => restart e => exit code 1 */
/* ret == 2 => exit e => any code will do that */
return ret;
}
#ifndef HAVE_WAYLAND_ONLY
/* local functions */
static int
_e_alert_connect(void)
@ -1296,3 +1301,4 @@ _e_alert_draw_button_text(void)
xcb_image_text_8(conn, strlen(str2), btn2, gc, x, (10 + fa), str2);
}
#endif