From 06f4827935a75001b775782709168aecc72a45fc Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Wed, 10 Dec 2008 06:43:21 +0000 Subject: [PATCH] and now it actually buidls and runs without x support. SVN revision: 38078 --- configure.in | 3 +++ src/lib/elm_entry.c | 39 +++++++++++++++++++++++++++++---------- src/lib/elm_main.c | 4 +++- src/lib/elm_win.c | 2 -- 4 files changed, 35 insertions(+), 13 deletions(-) diff --git a/configure.in b/configure.in index b821176..e4041e0 100644 --- a/configure.in +++ b/configure.in @@ -51,6 +51,9 @@ PKG_CHECK_MODULES([ELEMENTARY_X], [ecore-x], [ have_elementary_x="no" ]) +AC_SUBST(ELEMENTARY_X_CFLAGS) +AC_SUBST(ELEMENTARY_X_LIBS) + have_elementary_fb="no" PKG_CHECK_MODULES([ELEMENTARY_FB], [ecore-fb], [ AC_DEFINE(HAVE_ELEMENTARY_FB, 1, [FB support for Elementary]) diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index 9f596b9..bfe6d32 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -368,9 +368,12 @@ _signal_selection_start(void *data, Evas_Object *obj, const char *emission, cons char *txt = _mkup_to_text(elm_entry_selection_get(data)); if (txt) { - ecore_x_selection_primary_set - (elm_win_xwindow_get(elm_widget_top_get(data)), - txt, strlen(txt)); +#ifdef HAVE_ELEMENTARY_X + if (elm_win_xwindow_get(elm_widget_top_get(data))) + ecore_x_selection_primary_set + (elm_win_xwindow_get(elm_widget_top_get(data)), + txt, strlen(txt)); +#endif free(txt); } } @@ -387,9 +390,12 @@ _signal_selection_changed(void *data, Evas_Object *obj, const char *emission, co char *txt = _mkup_to_text(elm_entry_selection_get(data)); if (txt) { - ecore_x_selection_primary_set +#ifdef HAVE_ELEMENTARY_X + if (elm_win_xwindow_get(elm_widget_top_get(data))) + ecore_x_selection_primary_set (elm_win_xwindow_get(elm_widget_top_get(data)), txt, strlen(txt)); +#endif free(txt); } } @@ -406,14 +412,22 @@ _signal_selection_cleared(void *data, Evas_Object *obj, const char *emission, co { if (wd->cut_sel) { - ecore_x_selection_primary_set +#ifdef HAVE_ELEMENTARY_X + if (elm_win_xwindow_get(elm_widget_top_get(data))) + ecore_x_selection_primary_set (elm_win_xwindow_get(elm_widget_top_get(data)), wd->cut_sel, strlen(wd->cut_sel)); +#endif eina_stringshare_del(wd->cut_sel); wd->cut_sel = NULL; } else - ecore_x_selection_primary_clear(); + { +#ifdef HAVE_ELEMENTARY_X + if (elm_win_xwindow_get(elm_widget_top_get(data))) + ecore_x_selection_primary_clear(); +#endif + } } } @@ -424,10 +438,15 @@ _signal_entry_paste_request(void *data, Evas_Object *obj, const char *emission, evas_object_smart_callback_call(data, "selection,paste", NULL); if (wd->sel_notify_handler) { - ecore_x_selection_primary_request - (elm_win_xwindow_get(elm_widget_top_get(data)), - ECORE_X_SELECTION_TARGET_UTF8_STRING); - wd->selection_asked = 1; +#ifdef HAVE_ELEMENTARY_X + if (elm_win_xwindow_get(elm_widget_top_get(data))) + { + ecore_x_selection_primary_request + (elm_win_xwindow_get(elm_widget_top_get(data)), + ECORE_X_SELECTION_TARGET_UTF8_STRING); + wd->selection_asked = 1; + } +#endif } } diff --git a/src/lib/elm_main.c b/src/lib/elm_main.c index a90ee04..bf34b2a 100644 --- a/src/lib/elm_main.c +++ b/src/lib/elm_main.c @@ -10,8 +10,10 @@ static void _elm_rescale(void); char *_elm_appname = NULL; Elm_Config *_elm_config = NULL; Ecore_Event_Handler *_elm_event_property_change = NULL; +#ifdef HAVE_ELEMENTARY_X Ecore_X_Atom _elm_atom_enlightenment_scale = 0; - +#endif + static int _elm_signal_exit(void *data, int ev_type, void *ev) { diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index 8a3801c..3309ab9 100644 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -10,9 +10,7 @@ struct _Elm_Win Evas_Object *parent; Evas_Object *win_obj; Eina_List *subobjs; -#ifdef HAVE_ELEMENTARY_X Ecore_X_Window xwin; -#endif Ecore_Job *deferred_resize_job; Ecore_Job *deferred_child_eval_job; -- 2.7.4