+%bcond_with x
+
Name: e17
Summary: The Enlightenment window manager
-Version: 1.0.0.001+svn.76808slp2+build47
-Release: 2
+Version: 1.0.1.001+svn.76808slp2+build49
+Release: 1
Group: System/GUI/Other
-License: BSD
+License: BSD-2-Clause
URL: http://www.enlightenment.org/
Source0: %{name}-%{version}.tar.gz
Source2: packaging/e17.service
-Source3: packaging/e17_early.service
-Source1001: e17.manifest
-Source1002: e17-data.manifest
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(ecore)
BuildRequires: pkgconfig(ecore-con)
BuildRequires: pkgconfig(ecore-evas)
-BuildRequires: pkgconfig(ecore-fb)
BuildRequires: pkgconfig(ecore-file)
BuildRequires: pkgconfig(ecore-imf)
BuildRequires: pkgconfig(ecore-imf-evas)
BuildRequires: pkgconfig(eet)
BuildRequires: pkgconfig(efreet)
BuildRequires: pkgconfig(efreet-mime)
-BuildRequires: pkgconfig(efreet-trash)
BuildRequires: pkgconfig(ehal)
BuildRequires: pkgconfig(eina)
BuildRequires: pkgconfig(evas)
BuildRequires: embryo-bin
BuildRequires: eet-bin
BuildRequires: gettext-devel
+Requires(post): e17-data
+Requires(post): sys-assert
%description
%build
-
-cp %{SOURCE1001} .
-cp %{SOURCE1002} .
+export CFLAGS+=" -fvisibility=hidden -fPIC "
+export LDFLAGS+=" -fvisibility=hidden -Wl,--hash-style=both -Wl,--as-needed"
+export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
%autogen --disable-static
LIBS='-ledbus' ./configure --prefix=/usr --disable-static \
--disable-tiling \
--disable-xkbswitch \
--disable-access \
+ --disable-clock \
+ --disable-gadman \
+ --disable-ibar \
+ --disable-ibox \
+ --disable-conf-applications \
+ --disable-conf-theme \
+ --disable-ephysics \
--enable-extra-features
make %{?jobs:-j%jobs}
%install
+rm -rf %{buildroot}
%make_install
+# for license notification
+mkdir -p %{buildroot}/usr/share/license
+cp -a %{_builddir}/%{buildsubdir}/COPYING %{buildroot}/usr/share/license/%{name}
+cp -a %{_builddir}/%{buildsubdir}/COPYING %{buildroot}/usr/share/license/%{name}-data
#systemd setup
-mkdir -p %{buildroot}/usr/lib/systemd/user/core-efl.target.wants
-install -m 0644 %SOURCE2 %{buildroot}/usr/lib/systemd/user/
-ln -s ../e17.service %{buildroot}/usr/lib/systemd/user/core-efl.target.wants/e17.service
-install -m 0644 %SOURCE3 %{buildroot}/usr/lib/systemd/user/
-ln -s ../e17_early.service %{buildroot}/usr/lib/systemd/user/core-efl.target.wants/e17_early.service
-rm -rf %{buildroot}/usr/etc/xdg/*
-rm -rf %{buildroot}/usr/lib/enlightenment/utils/*
-rm -rf %{buildroot}/usr/share/enlightenment/AUTHORS
-rm -rf %{buildroot}/usr/share/enlightenment/COPYING
-rm -rf %{buildroot}/usr/share/enlightenment/data/backgrounds/*
-rm -rf %{buildroot}/usr/share/enlightenment/data/config/*
-rm -rf %{buildroot}/usr/share/enlightenment/data/icons/*
-rm -rf %{buildroot}/usr/share/enlightenment/data/images/enlightenment.png
-rm -rf %{buildroot}/usr/share/enlightenment/data/input_methods/*
-rm -rf %{buildroot}/usr/share/locale/*
-rm -rf %{buildroot}/usr/share/xsessions/*
-rm -rf %{buildroot}/usr/share/applications/enlightenment_filemanager.desktop
-rm -rf %{buildroot}/usr/share/enlightenment/data/flags/*
-rm -rf %{buildroot}/usr/share/enlightenment/data/favorites/*
-rm -rf %{buildroot}/usr/share/enlightenment/data/favorites/.order
+mkdir -p %{buildroot}%{_libdir}/systemd/user/core-efl.target.wants
+install -m 0644 %SOURCE2 %{buildroot}%{_libdir}/systemd/user/
+ln -s ../e17.service %{buildroot}%{_libdir}/systemd/user/core-efl.target.wants/e17.service
%files
%manifest e17.manifest
-%license COPYING
%defattr(-,root,root,-)
/usr/bin/enlightenment
/usr/bin/enlightenment_imc
/usr/bin/enlightenment_remote
/usr/bin/enlightenment_start
-/usr/bin/enlightenment_filemanager
-/usr/bin/enlightenment_open
+%if 0%{?sec_product_feature_uifw_wm_use_desktopmode}
/usr/lib/enlightenment/modules
+%endif
/usr/lib/enlightenment/preload/*
%config /usr/etc/enlightenment/sysactions.conf
/usr/lib/systemd/user/e17.service
/usr/lib/systemd/user/core-efl.target.wants/e17.service
-/usr/lib/systemd/user/e17_early.service
-/usr/lib/systemd/user/core-efl.target.wants/e17_early.service
+/usr/share/license/%{name}
%files devel
%defattr(-,root,root,-)
%files data
%manifest e17-data.manifest
%defattr(-,root,root,-)
-/usr/share/enlightenment/data/themes
-
-/usr/share/enlightenment/data/images/test.edj
-/usr/share/enlightenment/data/images/test.png
-/usr/share/enlightenment/data/images/test.svg
-/usr/share/enlightenment/data/images/test.jpg
+/etc/smack/accesses2.d/e17.rule
+/usr/share/license/%{name}-data
+%exclude /usr/etc/xdg/*
+%exclude /usr/lib/enlightenment/utils/*
+%exclude /usr/share/enlightenment/AUTHORS
+%exclude /usr/share/enlightenment/COPYING
+%exclude /usr/share/enlightenment/data/themes/*
+%exclude /usr/share/enlightenment/data/backgrounds/*
+%exclude /usr/share/enlightenment/data/config/*
+%exclude /usr/share/enlightenment/data/icons/*
+%exclude /usr/share/enlightenment/data/images/*
+%exclude /usr/share/enlightenment/data/input_methods/*
+%exclude /usr/share/locale/*
+%exclude /usr/share/xsessions/*
+%exclude /usr/share/applications/enlightenment_filemanager.desktop
+%exclude /usr/share/enlightenment/data/flags/*
+%exclude /usr/share/enlightenment/data/favorites/*
+%exclude /usr/share/enlightenment/data/favorites/.order
+%exclude /usr/bin/enlightenment_open
+%exclude /usr/bin/enlightenment_filemanager
+
+%define _unpackaged_files_terminate_build 0
#if _F_BORDER_CLIP_TO_ZONE_
static void _e_border_shape_input_clip_to_zone(E_Border *bd);
#endif /* _F_BORDER_CLIP_TO_ZONE_ */
+
+#ifdef _F_DEICONIFY_APPROVE_
+static void _e_border_msg_handler(void *data,
+ const char *name,
+ const char *info,
+ int val,
+ E_Object *obj,
+ void *msgdata);
+#endif
+
/* local subsystem globals */
static Eina_List *handlers = NULL;
static Eina_List *borders = NULL;
static Ecore_X_Window warp_to_win;
static Ecore_Timer *warp_timer = NULL;
+#ifdef _F_DEICONIFY_APPROVE_
+static E_Msg_Handler *_msg_handler = NULL;
+#endif
+
#ifdef _F_ZONE_WINDOW_ROTATION_
typedef struct _E_Border_Rotation E_Border_Rotation;
typedef struct _E_Border_Rotation_Info E_Border_Rotation_Info;
handlers = eina_list_append(handlers, ecore_event_handler_add(E_EVENT_ZONE_ROTATION_CHANGE_BEGIN, _e_border_cb_zone_rotation_change_begin, NULL));
#endif
+#ifdef _F_DEICONIFY_APPROVE_
+ _msg_handler = e_msg_handler_add(_e_border_msg_handler, NULL);
+#endif
+
if (!borders_hash) borders_hash = eina_hash_string_superfast_new(NULL);
E_EVENT_BORDER_ADD = ecore_event_type_new();
bd->client.w = att->w;
bd->client.h = att->h;
+#ifdef _F_FIX_POSITION_PROBLEM_
+ bd->x = att->x;
+ bd->y = att->y;
+#endif
bd->w = bd->client.w;
bd->h = bd->client.h;
bd = e_border_find_by_client_window(e->win);
if (!bd) return ECORE_CALLBACK_PASS_ON;
+#ifdef _F_ZONE_WINDOW_ROTATION_
if ((e_config->wm_win_rotation) &&
(rot.vkbd_ctrl_win) && (rot.vkbd) &&
(bd == rot.vkbd) &&
con = bd->zone->container;
bd = e_border_new(con, e->win, 0, 0);
}
+#endif
if (bd->iconic)
{
}
}
#endif
+
+#ifdef _F_DEICONIFY_APPROVE_
+ if (e_config->deiconify_approve)
+ {
+ if (bd->client.e.state.pending_event.pending)
+ {
+ bd->client.e.state.pending_event.destroy.pending = 1;
+ bd->client.e.state.pending_event.destroy.win = e->win;
+ bd->client.e.state.pending_event.destroy.event_win = e->event_win;
+ ELB(ELBT_BD, "PENDING destroy event", bd->client.win);
+ return ECORE_CALLBACK_CANCEL;
+ }
+ }
+
+ ELB(ELBT_BD, "Real Destroy", bd->client.win);
+#endif
+
e_border_hide(bd, 0);
e_object_del(E_OBJECT(bd));
return ECORE_CALLBACK_PASS_ON;
}
+#ifdef _F_DEICONIFY_APPROVE_
+static E_Border *
+_e_border_find_below_win(E_Border* bd)
+{
+ Eina_List *l;
+ int i, pos;
+ Eina_Bool passed;
+ E_Border *temp_bd;
+ E_Border *below_bd;
+
+ passed = EINA_FALSE;
+ below_bd = NULL;
+
+ E_Border_List *bl;
+ bl = e_container_border_list_last(bd->zone->container);
+ while ((temp_bd = e_container_border_list_prev(bl)))
+ {
+ /* skip if it's the same border */
+ if (temp_bd == bd)
+ {
+ passed = EINA_TRUE;
+ continue;
+ }
+
+ if (e_object_is_del(E_OBJECT(temp_bd))) continue;
+
+ /* skip if it's not on this zone */
+ if (temp_bd->zone != bd->zone) continue;
+
+ if (E_CONTAINS(temp_bd->x, temp_bd->y, temp_bd->w, temp_bd->h, bd->zone->x, bd->zone->y, bd->zone->w, bd->zone->h))
+ {
+ if (!temp_bd->client.argb && temp_bd->visible)
+ {
+ below_bd = NULL;
+ break;
+ }
+ }
+
+ if (!passed) continue;
+
+ if ((!temp_bd->client.argb) &&
+ (temp_bd->x == temp_bd->zone->x) &&
+ (temp_bd->y == temp_bd->zone->y) &&
+ (temp_bd->w == temp_bd->zone->w) &&
+ (temp_bd->h == temp_bd->zone->h))
+ {
+ if (temp_bd->visible)
+ {
+ below_bd = NULL;
+ break;
+ }
+
+ if (ecore_x_window_visible_get(temp_bd->client.win))
+ {
+ below_bd = temp_bd;
+ break;
+ }
+ }
+ }
+ e_container_border_list_free(bl);
+
+ return below_bd;
+}
+#endif
+
static Eina_Bool
_e_border_cb_window_hide(void *data __UNUSED__,
int ev_type __UNUSED__,
return ECORE_CALLBACK_PASS_ON;
}
+#ifdef _F_DEICONIFY_APPROVE_
+ if (e_config->deiconify_approve)
+ {
+ if (bd->client.e.state.pending_event.done)
+ goto do_hide;
+
+ if (bd->client.e.state.pending_event.pending)
+ {
+ return ECORE_CALLBACK_CANCEL;
+ }
+
+ if (!E_CONTAINS(bd->x, bd->y, bd->w, bd->h, bd->zone->x, bd->zone->y, bd->zone->w, bd->zone->h))
+ goto do_hide;
+
+ E_Border *below_bd;
+ // 1. find below non-alpha full size win
+ below_bd = _e_border_find_below_win(bd);
+
+ if (below_bd)
+ {
+ // 2. check those rotation
+ bd->client.e.state.pending_event.pending = 1;
+ bd->client.e.state.pending_event.hold_bd = below_bd;
+
+ bd->client.e.state.pending_event.hide.pending = 1;
+ bd->client.e.state.pending_event.hide.win = e->win;
+ bd->client.e.state.pending_event.hide.event_win = e->event_win;
+ bd->client.e.state.pending_event.hide.send_event = e->send_event;
+
+ below_bd->client.e.state.deiconify_approve.pending_bd = bd;
+ ELBF(ELBT_ROT, 0, bd->client.win, "below_win:%x, below_win's wait_bd:%x", below_bd->client.win, below_bd->client.e.state.deiconify_approve.pending_bd->client.win);
+
+ // 3. if not same then uniconify
+ e_border_uniconify(below_bd);
+
+ ELB(ELBT_BD, "PENDING hide event", bd->client.win);
+ return ECORE_CALLBACK_CANCEL;
+ }
+ }
+
+do_hide:
+ bd->client.e.state.pending_event.done = 0;
+ bd->client.e.state.pending_event.pending = 0;
+ ELB(ELBT_BD, "Real hide", bd->client.win);
+#endif
+
// printf(" bd->ignore_first_unmap = %i\n", bd->ignore_first_unmap);
if (bd->ignore_first_unmap > 0)
{
Eina_List *l;
E_Border_Rotation_Info *info = NULL;
- ELB(ELBT_ROT, "DO ROTATION SYNC_JOB", zone->id);
-
+ ELBF(ELBT_ROT, 0, zone->id, "DO ROTATION SYNC_JOB rot.list:%p(%d) wait_prepare_done:%d zone_block_count:%d",
+ rot.list, eina_list_count(rot.list), rot.wait_prepare_done, zone->rot.block_count);
if (rot.list)
{
EINA_LIST_FOREACH(rot.list, l, info)
_e_border_hook_call(E_BORDER_HOOK_ROTATION_LIST_ADD, info->bd);
+
+ ELBF(ELBT_ROT, 0, zone->id, "SYNC_JOB list(%d) wait_prepare_done:%d zone_block_count:%d",
+ eina_list_count(rot.list), rot.wait_prepare_done, zone->rot.block_count);
+
if (!rot.wait_prepare_done)
{
_e_border_rotation_change_request(zone);
if (!e_config->wm_win_rotation) return;
if (!rot.list) return;
if (eina_list_count(rot.list) <= 0) return;
- if (zone->rot.block_count) return;
+ /* pending rotation problem occurred while launching app by the tray */
+ //if (zone->rot.block_count) return;
if (rot.prepare_timer) ecore_timer_del(rot.prepare_timer);
rot.prepare_timer = NULL;
// the window with "ECORE_X_WINDOW_TYPE_NORMAL" type
// should follow the state of rotation of zone.
if ((bd->parent) &&
+ (bd->parent->visible) &&
(bd->client.netwm.type != ECORE_X_WINDOW_TYPE_NORMAL))
will_ang = bd->parent->client.e.state.rot.curr;
else will_ang = zone->rot.curr;
* rotation of the transient_for window.
*/
if ((bd->parent) &&
+ (bd->parent->visible) &&
(bd->client.netwm.type == ECORE_X_WINDOW_TYPE_UTILITY))
{
will_ang = bd->parent->client.e.state.rot.curr;
/* step 2. add to async/sync list */
if ((!zone->rot.block_count) &&
+ (!bd->client.e.state.deiconify_approve.pending_bd) &&
((!bd->visible) ||
(!E_INTERSECTS(bd->x, bd->y, bd->w, bd->h, zone->x, zone->y, zone->w, zone->h))))
{
&_x, &_y, &_w, &_h, &move);
if (hint)
{
- _e_border_move_resize_internal(bd, _x, _y, _w, _h, EINA_TRUE, move);
- resize = EINA_TRUE;
- ELBF(ELBT_ROT, 0, bd->client.win, "RESIZE_BY_HINT name:%s (%d,%d) %dx%d",
- bd->client.icccm.name, _x, _y, _w, _h);
+ if (((move) && ((bd->x !=_x) || (bd->y !=_y))) ||
+ (bd->w != _w) || (bd->h != _h))
+ {
+ resize = EINA_TRUE;
+ _e_border_move_resize_internal(bd, _x, _y, _w, _h, EINA_TRUE, move);
+ ELBF(ELBT_ROT, 0, bd->client.win, "RESIZE_BY_HINT name:%s (%d,%d) %dx%d resize:%d",
+ bd->client.icccm.name, _x, _y, _w, _h, resize);
+ }
}
else
{
if ((bd->client.e.state.rot.wait_for_done) &&
(bd->client.e.state.rot.wait_done_ang == bd->client.e.state.rot.curr)) goto end;
- // if this window is rotation dependent window and zone is blocked to rotate,
- // then skip here, request will be sent after cancel block.
- if ((bd->client.e.state.rot.type == E_BORDER_ROTATION_TYPE_DEPENDENT) &&
- (bd->zone->rot.block_count)) goto end;
-
EINA_LIST_FOREACH(rot.list, l, info)
if (info->bd == bd) found = EINA_TRUE;
// send request message if it's async rotation window,
bd->client.illume.win_state.state =
ecore_x_e_illume_window_state_get(bd->client.win);
bd->client.illume.win_state.fetch.state = 0;
+#ifdef _F_ZONE_WINDOW_ROTATION_
+ /* E should rotate the window if the property "win_state" of window is
+ * changed to "ECORE_X_ILLUME_WINDOW_STATE_NORMAL".
+ * FIXME: To move below code into illume seems to better.
+ */
+ if (e_config->wm_win_rotation)
+ {
+ if (bd->client.illume.win_state.state == ECORE_X_ILLUME_WINDOW_STATE_NORMAL)
+ {
+ bd->client.e.state.rot.type = E_BORDER_ROTATION_TYPE_NORMAL;
+ need_rotation_set = EINA_TRUE;
+ }
+ }
+#endif
}
if (bd->changes.shape)
{
bd->changes.stack = 0;
bd->changes.prop = 0;
+#ifdef _F_ZONE_WINDOW_ROTATION_
if (bd->client.e.state.rot.changes != -1)
{
e_border_rotation_set(bd, bd->client.e.state.rot.changes);
bd->client.e.state.rot.changes = -1;
}
+#endif
if ((bd->take_focus) || (bd->want_focus))
{
}
}
}
+
+#ifdef _F_DEICONIFY_APPROVE_
+static void
+_e_border_window_pending_destroy_event_free(void *data __UNUSED__,
+ void *ev)
+{
+ Ecore_X_Event_Window_Destroy *e;
+
+ e = ev;
+ E_FREE(e);
+}
+
+static void
+_e_border_window_pending_hide_event_free(void *data __UNUSED__,
+ void *ev)
+{
+ Ecore_X_Event_Window_Hide *e;
+
+ e = ev;
+ E_FREE(e);
+}
+
+static void
+_e_border_window_pending_hide_event_send(E_Border *bd)
+{
+ Ecore_X_Event_Window_Hide *e;
+
+ if (!bd) return;
+
+ e = E_NEW(Ecore_X_Event_Window_Hide, 1);
+ if (e)
+ {
+ e->win = bd->client.e.state.pending_event.hide.win;
+ e->event_win = bd->client.e.state.pending_event.hide.event_win;
+ e->time = ecore_x_current_time_get();
+ e->send_event = bd->client.e.state.pending_event.hide.send_event;
+
+ ecore_event_add(ECORE_X_EVENT_WINDOW_HIDE, e,
+ _e_border_window_pending_hide_event_free, NULL);
+
+ ELB(ELBT_BD, "Send pended HIDE event", e->win);
+ }
+}
+
+static void
+_e_border_window_pending_destroy_event_send(E_Border *bd)
+{
+ Ecore_X_Event_Window_Destroy *e;
+
+ if (!bd) return;
+
+ e = E_NEW(Ecore_X_Event_Window_Destroy, 1);
+ if (e)
+ {
+ e->win = bd->client.e.state.pending_event.destroy.win;
+ e->event_win = bd->client.e.state.pending_event.destroy.event_win;
+ e->time = ecore_x_current_time_get();
+
+ ecore_event_add(ECORE_X_EVENT_WINDOW_DESTROY, e,
+ _e_border_window_pending_destroy_event_free, NULL);
+
+ ELB(ELBT_BD, "Send pended DESTROY event", e->win);
+ }
+}
+
+static void
+_e_border_msg_handler(void *data,
+ const char *name,
+ const char *info,
+ int val,
+ E_Object *obj,
+ void *msgdata)
+{
+ E_Manager *man = (E_Manager *)obj;
+ E_Manager_Comp_Source *src = (E_Manager_Comp_Source *)msgdata;
+
+ // handle only comp.manager msg
+ if (strncmp(name, "comp.manager", sizeof("comp.manager"))) return;
+
+ if (!strncmp(info, "visibility.src", sizeof("visibility.src")))
+ {
+ Ecore_X_Window win;
+ E_Border *bd;
+ Eina_Bool visible;
+
+ win = e_manager_comp_src_window_get(man, src);
+ bd = e_border_find_by_window(win);
+
+ if (!bd) return;
+ if (!bd->client.e.state.deiconify_approve.pending_bd) return;
+
+ visible = e_manager_comp_src_visible_get(man, src);
+ if (visible)
+ {
+ E_Border *pending_bd = bd->client.e.state.deiconify_approve.pending_bd;
+ if (!pending_bd->client.e.state.pending_event.pending)
+ {
+ bd->client.e.state.deiconify_approve.pending_bd = NULL;
+ return;
+ }
+
+ pending_bd->client.e.state.pending_event.done = 1;
+ pending_bd->client.e.state.pending_event.hold_bd = NULL;
+
+ if (pending_bd->client.e.state.pending_event.hide.pending)
+ {
+ _e_border_window_pending_hide_event_send(pending_bd);
+
+ // clear hide event data
+ pending_bd->client.e.state.pending_event.hide.pending = 0;
+ pending_bd->client.e.state.pending_event.hide.win = 0;
+ pending_bd->client.e.state.pending_event.hide.event_win = 0;
+ pending_bd->client.e.state.pending_event.hide.send_event = 0;
+ }
+
+ if (pending_bd->client.e.state.pending_event.destroy.pending)
+ {
+ _e_border_window_pending_destroy_event_send(pending_bd);
+
+ // clear destroy event data
+ pending_bd->client.e.state.pending_event.destroy.pending = 0;
+ pending_bd->client.e.state.pending_event.destroy.win = 0;
+ pending_bd->client.e.state.pending_event.destroy.event_win = 0;
+ }
+
+ bd->client.e.state.deiconify_approve.pending_bd = NULL;
+ ELBF(ELBT_ROT, 0, bd->client.win, "RESET pending_bd:%x", bd->client.e.state.deiconify_approve.pending_bd);
+ }
+ }
+}
+#endif
/*vim:ts=8 sw=3 sts=3 expandtab cino=>5n-3f0^-2{2(0W1st0*/