forked from enlightenment/enlightenment
fix e_alert build with wayland only
This commit is contained in:
parent
94633fbde1
commit
a57e39a5ea
23
configure.ac
23
configure.ac
|
@ -904,36 +904,29 @@ AM_CONDITIONAL([HAVE_WAYLAND_ONLY], [test "x${have_wayland_only}" = "xyes"])
|
||||||
|
|
||||||
e_alert_requires="\
|
e_alert_requires="\
|
||||||
evas >= $efl_version \
|
evas >= $efl_version \
|
||||||
ecore >= $efl_version \
|
|
||||||
xcb \
|
|
||||||
xcb-shape \
|
|
||||||
xcb-keysyms \
|
|
||||||
eina >= ${efl_version} \
|
eina >= ${efl_version} \
|
||||||
ecore >= ${efl_version} \
|
ecore >= ${efl_version} \
|
||||||
ecore-ipc >= ${efl_version}"
|
ecore-ipc >= ${efl_version}"
|
||||||
|
|
||||||
if test "x${have_wayland}" = "xyes"; then
|
if test "x${have_wayland}" = "xyes"; then
|
||||||
if test "x${HAVE_WL_DRM}" = "xyes"; then
|
if test "x${HAVE_WL_DRM}" = "xyes"; then
|
||||||
if test "x${have_ecore_drm2}" = "xyes"; then
|
|
||||||
e_alert_requires="\
|
e_alert_requires="\
|
||||||
$e_alert_requires \
|
$e_alert_requires \
|
||||||
ecore-input >= ${efl_version} \
|
ecore-input >= ${efl_version} \
|
||||||
ecore-drm2 >= ${efl_ecore_drm2_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
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x${have_wayland_only}" != "xyes"; then
|
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
|
fi
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES(E_ALERT, [$e_alert_requires])
|
||||||
|
|
||||||
if test "x${have_wayland_only}" != "xyes"; then
|
if test "x${have_wayland_only}" != "xyes"; then
|
||||||
e_requires="$e_requires ecore-x >= $efl_version"
|
e_requires="$e_requires ecore-x >= $efl_version"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -49,11 +49,9 @@ src/bin/enlightenment_fm_op \
|
||||||
src/bin/enlightenment_sys \
|
src/bin/enlightenment_sys \
|
||||||
src/bin/enlightenment_thumb \
|
src/bin/enlightenment_thumb \
|
||||||
src/bin/enlightenment_elm_cfgtool \
|
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
|
if HAVE_FREEBSD
|
||||||
internal_bin_PROGRAMS += src/bin/enlightenment_ckpasswd
|
internal_bin_PROGRAMS += src/bin/enlightenment_ckpasswd
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -15,11 +15,12 @@
|
||||||
#include <Eina.h>
|
#include <Eina.h>
|
||||||
#include <Ecore.h>
|
#include <Ecore.h>
|
||||||
#include <Ecore_Ipc.h>
|
#include <Ecore_Ipc.h>
|
||||||
|
#ifndef HAVE_WAYLAND_ONLY
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
#include <xcb/xcb_keysyms.h>
|
#include <xcb/xcb_keysyms.h>
|
||||||
#include <xcb/shape.h>
|
#include <xcb/shape.h>
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
|
#endif
|
||||||
#ifdef HAVE_WL_DRM
|
#ifdef HAVE_WL_DRM
|
||||||
# include <Ecore_Input.h>
|
# include <Ecore_Input.h>
|
||||||
# ifdef HAVE_DRM2
|
# ifdef HAVE_DRM2
|
||||||
|
@ -67,6 +68,7 @@
|
||||||
#define WINDOW_WIDTH 320
|
#define WINDOW_WIDTH 320
|
||||||
#define WINDOW_HEIGHT 240
|
#define WINDOW_HEIGHT 240
|
||||||
|
|
||||||
|
#ifndef HAVE_WAYLAND_ONLY
|
||||||
#ifndef XCB_ATOM_NONE
|
#ifndef XCB_ATOM_NONE
|
||||||
# define XCB_ATOM_NONE 0
|
# define XCB_ATOM_NONE 0
|
||||||
#endif
|
#endif
|
||||||
|
@ -100,9 +102,9 @@ static xcb_window_t btn2 = 0;
|
||||||
static xcb_font_t font = 0;
|
static xcb_font_t font = 0;
|
||||||
static xcb_gcontext_t gc = 0;
|
static xcb_gcontext_t gc = 0;
|
||||||
static int fa = 0, fw = 0;
|
static int fa = 0, fw = 0;
|
||||||
|
#endif
|
||||||
static int sw = 0, sh = 0;
|
static int sw = 0, sh = 0;
|
||||||
static int fh = 0;
|
static int fh = 0;
|
||||||
|
|
||||||
static const char *title = NULL, *str1 = NULL, *str2 = NULL;
|
static const char *title = NULL, *str1 = NULL, *str2 = NULL;
|
||||||
static int ret = 0, sig = 0;
|
static int ret = 0, sig = 0;
|
||||||
static pid_t pid;
|
static pid_t pid;
|
||||||
|
@ -724,8 +726,11 @@ main(int argc, char **argv)
|
||||||
_e_alert_drm_run();
|
_e_alert_drm_run();
|
||||||
_e_alert_drm_shutdown();
|
_e_alert_drm_shutdown();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#if defined(HAVE_WL_DRM) && !defined(HAVE_WAYLAND_ONLY)
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef HAVE_WAYLAND_ONLY
|
||||||
{
|
{
|
||||||
if (!_e_alert_connect())
|
if (!_e_alert_connect())
|
||||||
{
|
{
|
||||||
|
@ -738,14 +743,14 @@ main(int argc, char **argv)
|
||||||
_e_alert_run();
|
_e_alert_run();
|
||||||
_e_alert_shutdown();
|
_e_alert_shutdown();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
ecore_shutdown();
|
ecore_shutdown();
|
||||||
|
|
||||||
/* ret == 1 => restart e => exit code 1 */
|
/* ret == 1 => restart e => exit code 1 */
|
||||||
/* ret == 2 => exit e => any code will do that */
|
/* ret == 2 => exit e => any code will do that */
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#ifndef HAVE_WAYLAND_ONLY
|
||||||
/* local functions */
|
/* local functions */
|
||||||
static int
|
static int
|
||||||
_e_alert_connect(void)
|
_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);
|
xcb_image_text_8(conn, strlen(str2), btn2, gc, x, (10 + fa), str2);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue