From 26e1743815bcdad187c20d45a2c02a06f50642ef Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sun, 16 Dec 2012 18:20:16 +0100 Subject: [PATCH] - updated to 1.7.3 - removed obsolete wayland patch --- ecore-wayland.patch | 474 -------------------------------------------- ecore.spec | 11 +- 2 files changed, 7 insertions(+), 478 deletions(-) delete mode 100644 ecore-wayland.patch diff --git a/ecore-wayland.patch b/ecore-wayland.patch deleted file mode 100644 index e6d0d6b..0000000 --- a/ecore-wayland.patch +++ /dev/null @@ -1,474 +0,0 @@ -#Index: /trunk/ecore/src/lib/ecore_evas/ecore_evas_wayland_common.c -#=================================================================== -#--- /trunk/ecore/src/lib/ecore_evas/ecore_evas_wayland_common.c (revision 78047) -#+++ /trunk/ecore/src/lib/ecore_evas/ecore_evas_wayland_common.c (revision 78048) -#@@ -351,5 +351,4 @@ -# -# sd->frame = evas_object_rectangle_add(evas); -#- evas_object_is_frame_object_set(sd->frame, EINA_TRUE); -# evas_object_color_set(sd->frame, 249, 249, 249, 255); -# evas_object_smart_member_add(sd->frame, obj); -#@@ -360,4 +359,5 @@ -# evas_object_text_font_set(sd->text, "Sans", 10); -# evas_object_text_text_set(sd->text, "Smart Test"); -#+ evas_object_smart_member_add(sd->text, obj); -# -# evas_object_smart_data_set(obj, sd); -Index: /trunk/ecore/src/lib/ecore_wayland/Ecore_Wayland.h -=================================================================== ---- /trunk/ecore/src/lib/ecore_wayland/Ecore_Wayland.h (revision 78048) -+++ /trunk/ecore/src/lib/ecore_wayland/Ecore_Wayland.h (revision 78049) -@@ -76,4 +76,5 @@ - { - struct wl_display *display; -+ struct wl_registry *registry; - struct wl_compositor *compositor; - struct wl_shell *shell; -Index: /trunk/ecore/src/lib/ecore_wayland/ecore_wl.c -=================================================================== ---- /trunk/ecore/src/lib/ecore_wayland/ecore_wl.c (revision 78049) -+++ /trunk/ecore/src/lib/ecore_wayland/ecore_wl.c (revision 78050) -@@ -8,7 +8,6 @@ - /* local function prototypes */ - static Eina_Bool _ecore_wl_shutdown(Eina_Bool close); --static int _ecore_wl_cb_event_mask_update(unsigned int mask, void *data); --static Eina_Bool _ecore_wl_cb_handle_data(void *data, Ecore_Fd_Handler *hdl __UNUSED__); --static void _ecore_wl_cb_handle_global(struct wl_display *disp, unsigned int id, const char *interface, unsigned int version __UNUSED__, void *data); -+static Eina_Bool _ecore_wl_cb_handle_data(void *data, Ecore_Fd_Handler *hdl); -+static void _ecore_wl_cb_handle_global(void *data, struct wl_registry *registry, unsigned int id, const char *interface, unsigned int version __UNUSED__); - static Eina_Bool _ecore_wl_xkb_init(Ecore_Wl_Display *ewd); - static Eina_Bool _ecore_wl_xkb_shutdown(Ecore_Wl_Display *ewd); -@@ -16,4 +15,9 @@ - /* local variables */ - static int _ecore_wl_init_count = 0; -+static const struct wl_registry_listener _ecore_wl_registry_listener = -+{ -+ _ecore_wl_cb_handle_global, -+ NULL // handle_global_remove -+}; - - /* external variables */ -@@ -131,10 +135,9 @@ - } - -- _ecore_wl_disp->fd = -- wl_display_get_fd(_ecore_wl_disp->wl.display, -- _ecore_wl_cb_event_mask_update, _ecore_wl_disp); -+ _ecore_wl_disp->fd = wl_display_get_fd(_ecore_wl_disp->wl.display); - - _ecore_wl_disp->fd_hdl = -- ecore_main_fd_handler_add(_ecore_wl_disp->fd, ECORE_FD_READ, -+ ecore_main_fd_handler_add(_ecore_wl_disp->fd, -+ ECORE_FD_READ | ECORE_FD_WRITE, - _ecore_wl_cb_handle_data, _ecore_wl_disp, - NULL, NULL); -@@ -143,11 +146,10 @@ - wl_list_init(&_ecore_wl_disp->outputs); - -- wl_display_add_global_listener(_ecore_wl_disp->wl.display, -- _ecore_wl_cb_handle_global, _ecore_wl_disp); -- -- /* Init egl */ -- -- /* FIXME: Process connection events ?? */ -- /* wl_display_iterate(_ecore_wl_disp->wl.display, WL_DISPLAY_READABLE); */ -+ _ecore_wl_disp->wl.registry = -+ wl_display_get_registry(_ecore_wl_disp->wl.display); -+ wl_registry_add_listener(_ecore_wl_disp->wl.registry, -+ &_ecore_wl_registry_listener, _ecore_wl_disp); -+ -+ wl_display_dispatch(_ecore_wl_disp->wl.display); - - /* TODO: create pointer surfaces */ -@@ -207,6 +209,5 @@ - // LOGFN(__FILE__, __LINE__, __FUNCTION__); - -- while (_ecore_wl_disp->mask & WL_DISPLAY_WRITABLE) -- wl_display_iterate(_ecore_wl_disp->wl.display, WL_DISPLAY_WRITABLE); -+ wl_display_flush(_ecore_wl_disp->wl.display); - } - -@@ -324,5 +325,5 @@ - ecore_wl_display_iterate(void) - { -- wl_display_iterate(_ecore_wl_disp->wl.display, WL_DISPLAY_READABLE); -+ wl_display_dispatch(_ecore_wl_disp->wl.display); - } - -@@ -397,41 +398,37 @@ - } - --static int --_ecore_wl_cb_event_mask_update(unsigned int mask, void *data) -+static Eina_Bool -+_ecore_wl_cb_handle_data(void *data, Ecore_Fd_Handler *hdl) - { - Ecore_Wl_Display *ewd; - -+ /* LOGFN(__FILE__, __LINE__, __FUNCTION__); */ -+ -+ if (!(ewd = data)) return ECORE_CALLBACK_RENEW; -+ -+ /* FIXME: This should also catch ECORE_FD_ERROR and exit */ -+ -+ if (ecore_main_fd_handler_active_get(hdl, ECORE_FD_READ)) -+ wl_display_dispatch(ewd->wl.display); -+ else if (ecore_main_fd_handler_active_get(hdl, ECORE_FD_WRITE)) -+ wl_display_flush(ewd->wl.display); -+ -+ return ECORE_CALLBACK_RENEW; -+} -+ -+static void -+_ecore_wl_cb_handle_global(void *data, struct wl_registry *registry, unsigned int id, const char *interface, unsigned int version __UNUSED__) -+{ -+ Ecore_Wl_Display *ewd; -+ - // LOGFN(__FILE__, __LINE__, __FUNCTION__); - - ewd = data; -- ewd->mask = mask; -- return 0; --} -- --static Eina_Bool --_ecore_wl_cb_handle_data(void *data, Ecore_Fd_Handler *hdl __UNUSED__) --{ -- Ecore_Wl_Display *ewd; -- -- /* LOGFN(__FILE__, __LINE__, __FUNCTION__); */ -- -- if (!(ewd = data)) return ECORE_CALLBACK_RENEW; -- wl_display_iterate(ewd->wl.display, ewd->mask); -- return ECORE_CALLBACK_RENEW; --} -- --static void --_ecore_wl_cb_handle_global(struct wl_display *disp, unsigned int id, const char *interface, unsigned int version __UNUSED__, void *data) --{ -- Ecore_Wl_Display *ewd; -- --// LOGFN(__FILE__, __LINE__, __FUNCTION__); -- -- ewd = data; -- -- /* TODO: Add listener for wl_display so we can catch fatal errors !! */ - - if (!strcmp(interface, "wl_compositor")) -- ewd->wl.compositor = wl_display_bind(disp, id, &wl_compositor_interface); -+ { -+ ewd->wl.compositor = -+ wl_registry_bind(registry, id, &wl_compositor_interface, 1); -+ } - else if (!strcmp(interface, "wl_output")) - _ecore_wl_output_add(ewd, id); -@@ -439,10 +436,11 @@ - _ecore_wl_input_add(ewd, id); - else if (!strcmp(interface, "wl_shell")) -- ewd->wl.shell = wl_display_bind(disp, id, &wl_shell_interface); -- /* else if (!strcmp(interface, "desktop_shell")) */ -- /* ewd->wl.desktop_shell = wl_display_bind(disp, id, &wl_shell_interface); */ -+ { -+ ewd->wl.shell = -+ wl_registry_bind(registry, id, &wl_shell_interface, 1); -+ } - else if (!strcmp(interface, "wl_shm")) - { -- ewd->wl.shm = wl_display_bind(disp, id, &wl_shm_interface); -+ ewd->wl.shm = wl_registry_bind(registry, id, &wl_shm_interface, 1); - - /* FIXME: We should not hard-code a cursor size here, and we should -@@ -453,5 +451,5 @@ - { - ewd->wl.data_device_manager = -- wl_display_bind(disp, id, &wl_data_device_manager_interface); -+ wl_registry_bind(registry, id, &wl_data_device_manager_interface, 1); - } - -Index: /trunk/ecore/src/lib/ecore_wayland/ecore_wl_window.c -=================================================================== ---- /trunk/ecore/src/lib/ecore_wayland/ecore_wl_window.c (revision 78050) -+++ /trunk/ecore/src/lib/ecore_wayland/ecore_wl_window.c (revision 78051) -@@ -252,5 +252,8 @@ - if (!win) return; - if (win->surface) -- wl_surface_damage(win->surface, x, y, w, h); -+ { -+ wl_surface_damage(win->surface, x, y, w, h); -+ wl_surface_commit(win->surface); -+ } - } - -@@ -287,4 +290,5 @@ - wl_surface_damage(win->surface, 0, 0, - win->allocation.w, win->allocation.h); -+ wl_surface_commit(win->surface); - - win->server_allocation = win->allocation; -Index: /trunk/ecore/src/lib/ecore_wayland/ecore_wl_output.c -=================================================================== ---- /trunk/ecore/src/lib/ecore_wayland/ecore_wl_output.c (revision 78051) -+++ /trunk/ecore/src/lib/ecore_wayland/ecore_wl_output.c (revision 78052) -@@ -36,5 +36,7 @@ - output->display = ewd; - -- output->output = wl_display_bind(ewd->wl.display, id, &wl_output_interface); -+ output->output = -+ wl_registry_bind(ewd->wl.registry, id, &wl_output_interface, 1); -+ - wl_list_insert(ewd->outputs.prev, &output->link); - wl_output_add_listener(output->output, &_ecore_wl_output_listener, output); -#Index: /trunk/ecore/src/lib/ecore_evas/ecore_evas_wayland_common.c -#=================================================================== -#--- /trunk/ecore/src/lib/ecore_evas/ecore_evas_wayland_common.c (revision 78052) -#+++ /trunk/ecore/src/lib/ecore_evas/ecore_evas_wayland_common.c (revision 78053) -#@@ -452,6 +452,6 @@ -# EE_Wl_Smart_Data *sd; -# -#- if (!(sd = evas_object_smart_data_get(ee->engine.wl.frame))) return; -#- evas_object_text_text_set(sd->text, ee->prop.title); -#+ if ((sd = evas_object_smart_data_get(ee->engine.wl.frame))) -#+ evas_object_text_text_set(sd->text, ee->prop.title); -# } -# -Index: /trunk/ecore/src/lib/ecore_wayland/ecore_wl_input.c -=================================================================== ---- /trunk/ecore/src/lib/ecore_wayland/ecore_wl_input.c (revision 78053) -+++ /trunk/ecore/src/lib/ecore_wayland/ecore_wl_input.c (revision 78054) -@@ -177,11 +177,16 @@ - if (!(cursor = ecore_wl_cursor_get(input->cursor_name))) - { -+ printf("No Cursor %s in Theme\n", input->cursor_name); - /* if the theme does not have this cursor, default to left pointer */ - if (!(cursor = ecore_wl_cursor_get("left_ptr"))) -- return; -+ { -+ printf("Failed to get Left Pointer Cursor\n"); -+ return; -+ } - } - - if ((!cursor->images) || (!cursor->images[0])) - { -+ printf("Cursor %s has no images\n", input->cursor_name); - ecore_wl_input_pointer_set(input, NULL, 0, 0); - return; -@@ -197,8 +202,11 @@ - wl_surface_damage(input->cursor_surface, 0, 0, - cursor_image->width, cursor_image->height); -+ wl_surface_commit(input->cursor_surface); - - if (!input->cursor_frame_cb) - _ecore_wl_input_cb_pointer_frame(input, NULL, 0); - } -+ else -+ printf("No Buffer from Cursor Image\n"); - } - -@@ -231,6 +239,7 @@ - - input->seat = -- wl_display_bind(ewd->wl.display, id, &wl_seat_interface); -+ wl_registry_bind(ewd->wl.registry, id, &wl_seat_interface, 1); - wl_list_insert(ewd->inputs.prev, &input->link); -+ - wl_seat_add_listener(input->seat, - &_ecore_wl_seat_listener, input); -@@ -322,7 +331,10 @@ - Ecore_Wl_Input *input; - -- if (!(input = data)) return; -+ printf("Seat Handle Capabilities\n"); -+ if (!(input = data)) return; -+ printf("\tInput Valid\n"); - if ((caps & WL_SEAT_CAPABILITY_POINTER) && (!input->pointer)) - { -+ printf("\tCreate New Pointer\n"); - input->pointer = wl_seat_get_pointer(seat); - wl_pointer_set_user_data(input->pointer, input); -@@ -331,4 +343,5 @@ - else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && (input->pointer)) - { -+ printf("\tDestroy POinter\n"); - wl_pointer_destroy(input->pointer); - input->pointer = NULL; -@@ -367,4 +380,6 @@ - - /* LOGFN(__FILE__, __LINE__, __FUNCTION__); */ -+ -+ printf("Input Cb Pointer Motion\n"); - - if (!(input = data)) return; -@@ -675,4 +690,6 @@ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - -+ printf("Input Cb Pointer Enter\n"); -+ - if (!surface) return; - if (!(input = data)) return; -@@ -691,14 +708,14 @@ - input->pointer_enter_serial = serial; - -- if (!(win = wl_surface_get_user_data(surface))) return; -- -- win->pointer_device = input; -- input->pointer_focus = win; -- -- /* _ecore_wl_input_mouse_move_send(input, win, input->timestamp); */ -- _ecore_wl_input_mouse_in_send(input, win, input->timestamp); -- - /* The cursor on the surface is undefined until we set it */ - ecore_wl_input_cursor_from_name_set(input, "left_ptr"); -+ -+ if ((win = wl_surface_get_user_data(surface))) -+ { -+ win->pointer_device = input; -+ input->pointer_focus = win; -+ -+ _ecore_wl_input_mouse_in_send(input, win, input->timestamp); -+ } - - /* NB: This whole 'if' below is a major HACK due to wayland's stupidness -@@ -742,4 +759,6 @@ - Ecore_Wl_Window *win; - -+ printf("Input Cb Pointer Leave\n"); -+ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - -@@ -771,4 +790,6 @@ - Ecore_Wl_Input *input; - Ecore_Wl_Window *win = NULL; -+ -+ printf("Keyboard Enter Event\n"); - - LOGFN(__FILE__, __LINE__, __FUNCTION__); -Index: /trunk/ecore/src/lib/ecore_wayland/ecore_wl.c -=================================================================== ---- /trunk/ecore/src/lib/ecore_wayland/ecore_wl.c (revision 78054) -+++ /trunk/ecore/src/lib/ecore_wayland/ecore_wl.c (revision 78055) -@@ -139,5 +139,5 @@ - _ecore_wl_disp->fd_hdl = - ecore_main_fd_handler_add(_ecore_wl_disp->fd, -- ECORE_FD_READ | ECORE_FD_WRITE, -+ ECORE_FD_READ | ECORE_FD_WRITE, - _ecore_wl_cb_handle_data, _ecore_wl_disp, - NULL, NULL); -@@ -152,6 +152,4 @@ - - wl_display_dispatch(_ecore_wl_disp->wl.display); -- -- /* TODO: create pointer surfaces */ - - if (!_ecore_wl_xkb_init(_ecore_wl_disp)) -@@ -409,4 +407,6 @@ - /* FIXME: This should also catch ECORE_FD_ERROR and exit */ - -+ /* wl_display_dispatch_pending(ewd->wl.display); */ -+ - if (ecore_main_fd_handler_active_get(hdl, ECORE_FD_READ)) - wl_display_dispatch(ewd->wl.display); -@@ -422,5 +422,5 @@ - Ecore_Wl_Display *ewd; - --// LOGFN(__FILE__, __LINE__, __FUNCTION__); -+ LOGFN(__FILE__, __LINE__, __FUNCTION__); - - ewd = data; -Index: /trunk/ecore/src/lib/ecore_wayland/ecore_wl_input.c -=================================================================== ---- /trunk/ecore/src/lib/ecore_wayland/ecore_wl_input.c (revision 78055) -+++ /trunk/ecore/src/lib/ecore_wayland/ecore_wl_input.c (revision 78056) -@@ -177,16 +177,11 @@ - if (!(cursor = ecore_wl_cursor_get(input->cursor_name))) - { -- printf("No Cursor %s in Theme\n", input->cursor_name); - /* if the theme does not have this cursor, default to left pointer */ - if (!(cursor = ecore_wl_cursor_get("left_ptr"))) -- { -- printf("Failed to get Left Pointer Cursor\n"); -- return; -- } -+ return; - } - - if ((!cursor->images) || (!cursor->images[0])) - { -- printf("Cursor %s has no images\n", input->cursor_name); - ecore_wl_input_pointer_set(input, NULL, 0, 0); - return; -@@ -207,6 +202,4 @@ - _ecore_wl_input_cb_pointer_frame(input, NULL, 0); - } -- else -- printf("No Buffer from Cursor Image\n"); - } - -@@ -331,10 +324,8 @@ - Ecore_Wl_Input *input; - -- printf("Seat Handle Capabilities\n"); -- if (!(input = data)) return; -- printf("\tInput Valid\n"); -+ if (!(input = data)) return; -+ - if ((caps & WL_SEAT_CAPABILITY_POINTER) && (!input->pointer)) - { -- printf("\tCreate New Pointer\n"); - input->pointer = wl_seat_get_pointer(seat); - wl_pointer_set_user_data(input->pointer, input); -@@ -343,5 +334,4 @@ - else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && (input->pointer)) - { -- printf("\tDestroy POinter\n"); - wl_pointer_destroy(input->pointer); - input->pointer = NULL; -@@ -380,6 +370,4 @@ - - /* LOGFN(__FILE__, __LINE__, __FUNCTION__); */ -- -- printf("Input Cb Pointer Motion\n"); - - if (!(input = data)) return; -@@ -690,6 +678,4 @@ - LOGFN(__FILE__, __LINE__, __FUNCTION__); - -- printf("Input Cb Pointer Enter\n"); -- - if (!surface) return; - if (!(input = data)) return; -@@ -759,6 +745,4 @@ - Ecore_Wl_Window *win; - -- printf("Input Cb Pointer Leave\n"); -- - LOGFN(__FILE__, __LINE__, __FUNCTION__); - -@@ -790,6 +774,4 @@ - Ecore_Wl_Input *input; - Ecore_Wl_Window *win = NULL; -- -- printf("Keyboard Enter Event\n"); - - LOGFN(__FILE__, __LINE__, __FUNCTION__); -Index: /trunk/ecore/ChangeLog -=================================================================== ---- /trunk/ecore/ChangeLog (revision 78056) -+++ /trunk/ecore/ChangeLog (revision 78057) -@@ -1012,2 +1012,5 @@ - * Since evas has 8bit engines removed, remove support from ecore-evas. - -+2012-10-16 Christopher Michael -+ -+ * Update Ecore_Wayland to build & work with newest wayland (0.99) from git -Index: /trunk/ecore/NEWS -=================================================================== ---- /trunk/ecore/NEWS (revision 78057) -+++ /trunk/ecore/NEWS (revision 78058) -@@ -39,4 +39,6 @@ - - ecore_x_randr to actually return crtcs outputs properly. - - send ECORE_X_EVENT_SELECTION_NOTIFY even if there is no data. -+ * ecore_wayland: -+ - Update to work with latest wayland (0.99) from git. - - Removal: diff --git a/ecore.spec b/ecore.spec index 88159df..ec30f0b 100644 --- a/ecore.spec +++ b/ecore.spec @@ -22,13 +22,12 @@ Summary: Enlightened Core X interface library Summary(pl.UTF-8): Biblioteka interfejsu X Enlightened Core Name: ecore -Version: 1.7.2 +Version: 1.7.3 Release: 1 License: BSD Group: X11/Libraries Source0: http://download.enlightenment.org/releases/%{name}-%{version}.tar.bz2 -# Source0-md5: bcd3d4be2dfa597b54e75aa1dd91b054 -Patch0: %{name}-wayland.patch +# Source0-md5: 40f47d3beb02fd762bfd9f6fcf01e6dd URL: http://trac.enlightenment.org/e/wiki/Ecore BuildRequires: DirectFB-devel >= 0.9.16 BuildRequires: SDL-devel >= 1.2.0 @@ -74,6 +73,8 @@ BuildRequires: xorg-lib-libXtst-devel # xorg-lib-libXgesture-devel %endif %if %{with wayland} +BuildRequires: Mesa-libEGL-devel >= 7.10 +BuildRequires: Mesa-libwayland-egl-devel BuildRequires: wayland-devel >= 1.0.0 BuildRequires: xorg-lib-libxkbcommon-devel %endif @@ -263,6 +264,7 @@ Requires: %{name}-ipc = %{version}-%{release} Requires: %{name}-sdl = %{version}-%{release} %if %{with wayland} Requires: %{name}-wayland = %{version}-%{release} +Requires: Mesa-libEGL >= 7.10 %endif Requires: %{name}-x = %{version}-%{release} Requires: evas >= 1.7.0 @@ -287,6 +289,8 @@ Requires: %{name}-ipc-devel = %{version}-%{release} Requires: %{name}-sdl-devel = %{version}-%{release} %if %{with wayland} Requires: %{name}-wayland-devel = %{version}-%{release} +Requires: Mesa-libEGL-devel >= 7.10 +Requires: Mesa-libwayland-egl-devel %endif Requires: %{name}-x-devel = %{version}-%{release} Requires: evas-devel >= 1.7.0 @@ -772,7 +776,6 @@ Ecore - moduł metody wprowadzania znaków XIM. %prep %setup -q -%patch0 -p3 %build %{__libtoolize} -- 2.44.0