From 44db042840ac091639f8bee5342fc7aefedb50d8 Mon Sep 17 00:00:00 2001 From: caro Date: Tue, 20 Mar 2012 04:41:24 +0000 Subject: [PATCH] Elm: fix compilation on OS that are not using X git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@69516 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/examples/win_example.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/examples/win_example.c b/src/examples/win_example.c index d942c3b..8923af3 100644 --- a/src/examples/win_example.c +++ b/src/examples/win_example.c @@ -1,8 +1,6 @@ /* * gcc -o win_example win_example.c `pkg-config --cflags --libs elementary ecore-x` */ -#include -#include #ifdef HAVE_CONFIG_H # include "elementary_config.h" #else @@ -10,6 +8,12 @@ # define PACKAGE_DATA_DIR "../../data" #endif +#ifdef HAVE_ELEMENTARY_X +# include +#endif + +#include + static void _btn_activate_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) { @@ -158,8 +162,10 @@ _main_win_del_cb(void *data __UNUSED__, Evas_Object *obj, void *event __UNUSED__ static void _force_focus_cb(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) { +#ifdef HAVE_ELEMENTARY_X Ecore_X_Window xwin = elm_win_xwindow_get(data); ecore_x_window_focus(xwin); +#endif } static void -- 2.7.4