Merge from TIZEN 2.3 11/31211/1 tizen
authorMun, Gwan-gyeong <kk.moon@samsung.com>
Mon, 1 Dec 2014 12:39:07 +0000 (21:39 +0900)
committerMun, Gwan-gyeong <kk.moon@samsung.com>
Mon, 1 Dec 2014 14:22:43 +0000 (23:22 +0900)
Apply build option to tizen 3.0

Change-Id: Ic55982288f90505a53ed04a91a25421837d66d27

14 files changed:
Makefile.am
configure.ac
data/themes/samsung.edc
e17-data.manifest [new file with mode: 0644]
e17.manifest [new file with mode: 0644]
e17.rule [new file with mode: 0644]
packaging/e17.changes [deleted file]
packaging/e17.service
packaging/e17.spec
src/bin/Makefile.am
src/bin/e_border.c
src/bin/e_border.h
src/bin/e_config.c
src/bin/e_zone.c

index e6ec938..248742c 100644 (file)
@@ -75,6 +75,8 @@ ACLOCAL_AMFLAGS = -I m4
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = enlightenment.pc
 
+smackdir = /etc/smack/accesses2.d/
+smack_DATA = e17.rule
 
 .PHONY: doc
 
index 0b8969e..c0dfa9a 100644 (file)
@@ -631,7 +631,7 @@ e_extra_features+="-D_F_SHELF_INPUT_CONTROL_ "
 # add extended iconify
 e_extra_features+="-D_F_USE_EXTENDED_ICONIFY_ "
 # enable window rotation management per zone
-e_extra_features+="-D_F_ZONE_WINDOW_ROTATION_ "
+#e_extra_features+="-D_F_ZONE_WINDOW_ROTATION_ "
 # add e logging buffer for debugging purpose
 e_extra_features+="-D_F_E_LOGBUF_ "
 # enable the resist effect and add the magnetic effect
@@ -648,8 +648,8 @@ e_extra_features+="-D_F_BORDER_HOOK_PATCH_ "
 e_extra_features+="-D_F_COMP_LAYER_ "
 # add use dlog
 e_extra_features+="-D_F_USE_DLOG_ "
-# enable to copy the directory for configuration files
-e_extra_features+="-D_F_COPY_FROM_DATA_DIR_ "
+# enable patch to handling except case that a client will do consecutively the Map and Unmap repeatedly.
+e_extra_features+="-D_F_FIX_POSITION_PROBLEM_ "
 
 have_extra_features=no
 AC_ARG_ENABLE(extra_features,
index ef76564..50e23ef 100755 (executable)
@@ -318,32 +318,6 @@ collections {
          }
       }
    }
-   group {
-      name: "e/desktop/background/scrollframe";
-      parts {
-         part {
-            name: "clipper";
-            type: RECT;
-            mouse_events: 0;
-            description {
-               state: "default" 0.0;
-            }
-         }
-         part {
-            name: "e.swallow.content";
-            clip_to: "clipper";
-            type: SWALLOW;
-            description {
-               state: "default" 0.0;
-               rel1.offset: 0 0;
-               rel2 {
-                  relative: 0.0  0.0;
-                  offset: -1   -1;
-               }
-            }
-         }
-      }
-   }
 
 /////////////////////////////////////////////////////////////////////////////
 /*** DEFAULT WINDOW BORDER ***/
diff --git a/e17-data.manifest b/e17-data.manifest
new file mode 100644 (file)
index 0000000..e361a4c
--- /dev/null
@@ -0,0 +1,8 @@
+<manifest>
+   <define>
+      <domain name="e17-data" />
+   </define>
+   <request>
+      <domain name="e17-data" />
+   </request>
+</manifest>
diff --git a/e17.manifest b/e17.manifest
new file mode 100644 (file)
index 0000000..02c6321
--- /dev/null
@@ -0,0 +1,22 @@
+<manifest>
+   <define>
+      <domain name="e17" policy="restricted" plist="e17-misc,e17-misc-redwood,e17-misc-baltic,e17-data,e17-extra-modules,e17-extra-config-modules" />
+      <provide>
+         <label name="e17::config"/>
+      </provide>
+      <request>
+         <smack request="dbus" type="rwx"/>
+         <smack request="pulseaudio" type="rwxat"/>
+         <smack request="e17::config" type="rwxat"/>
+      </request>
+      <permit>
+         <smack permit="dbus" type="rwx"/>
+      </permit>
+   </define>
+   <request>
+      <domain name="e17" />
+   </request>
+   <assign>
+      <filesystem path="/usr/bin/enlightenment_remote" label="_" exec_label="none" />
+   </assign>
+</manifest>
diff --git a/e17.rule b/e17.rule
new file mode 100644 (file)
index 0000000..64f26ee
--- /dev/null
+++ b/e17.rule
@@ -0,0 +1,20 @@
+e17 system::vconf rwxat
+e17 system::vconf_misc r
+e17 system::homedir rwxat
+e17 xorg rw
+e17 xorg::screencapture r
+e17 isf r
+e17 com.samsung.virtual-controller r
+e17 pkgmgr r
+e17 e17-data r
+e17 system rx
+e17 efreet rx
+e17 connman r
+e17 aul rwx
+e17 e17-data rwx
+e17 isf rwx
+e17 system::use_internet r
+e17 device::app_logging w
+e17 device::sys_logging w
+e17 sys-assert::core awxrt
+xorg e17 rx
diff --git a/packaging/e17.changes b/packaging/e17.changes
deleted file mode 100644 (file)
index ff35070..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-* Tue Jun 25 2013 Anas Nashif <anas.nashif@intel.com> submit/tizen/20130625.072021@6ea0ce6
-- Fixed build and remove files instead of excluding them
-
-* Fri Jun 07 2013 Anas Nashif <anas.nashif@intel.com> accepted/tizen/20130520.101345@8b3bdd3
-- reset to floor domain
-
index 0867a1d..494d203 100644 (file)
@@ -5,10 +5,16 @@
 
 [Unit]
 Description=Enlightenment WM/Compositor
-#Before=core-efl.target
-After=e17_early.service
+Before=core-efl.target
 
 [Service]
-Type=oneshot
-ExecStart=/bin/sh -c 'while test ! -e /tmp/.wm_ready; do sleep 0.1; done;'
+Type=notify
+NotifyAccess=all
+EnvironmentFile=-/etc/sysconfig/e17
+OOMScoreAdjust=-1000
+ExecStart=/usr/bin/enlightenment_start $OPTIONS
+ExecStartPost=-/bin/sh -c 'while test ! -e /tmp/.wm_ready; do sleep 0.1; done; systemd-notify --ready'
+
+[Install]
+WantedBy=tizen-mobile.target
 
index 6890823..f4fcda4 100644 (file)
@@ -1,20 +1,18 @@
+%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)
@@ -28,7 +26,6 @@ BuildRequires:  pkgconfig(edje)
 BuildRequires:  pkgconfig(eet)
 BuildRequires:  pkgconfig(efreet)
 BuildRequires:  pkgconfig(efreet-mime)
-BuildRequires:  pkgconfig(efreet-trash)
 BuildRequires:  pkgconfig(ehal)
 BuildRequires:  pkgconfig(eina)
 BuildRequires:  pkgconfig(evas)
@@ -41,6 +38,8 @@ BuildRequires:  edje-bin
 BuildRequires:  embryo-bin
 BuildRequires:  eet-bin
 BuildRequires:  gettext-devel
+Requires(post): e17-data
+Requires(post): sys-assert
 
 
 %description
@@ -75,9 +74,9 @@ The Enlightenment window manager (data)
 
 
 %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 \
@@ -169,53 +168,46 @@ 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,-)
@@ -225,9 +217,25 @@ rm -rf %{buildroot}/usr/share/enlightenment/data/favorites/.order
 %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
index 8109821..104c458 100644 (file)
@@ -417,11 +417,11 @@ enlightenment_init_LDADD = @E_INIT_LIBS@
 #enlightenment_alert_CFLAGS = @E_ALERT_CFLAGS@
 
 enlightenment_filemanager_SOURCES = e_fm_cmdline.c
-enlightenment_filemanager_LDADD = @E_FM_CMDLINE_LIBS@
+enlightenment_filemanager_LDADD = @E_FM_CMDLINE_LIBS@ @e_libs@
 enlightenment_filemanager_CFLAGS = @E_FM_CMDLINE_CFLAGS@
 
 enlightenment_open_SOURCES = e_open.c
-enlightenment_open_LDADD = @E_OPEN_LIBS@
+enlightenment_open_LDADD = @E_OPEN_LIBS@ @e_libs@
 enlightenment_open_CFLAGS = @E_OPEN_CFLAGS@
 
 # HACK! why install-data-hook? install-exec-hook is run after bin_PROGRAMS
index 4b0c188..23ac2d2 100644 (file)
@@ -295,6 +295,16 @@ static void _e_border_focus_top_stack_set (E_Border* bd);
 #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;
@@ -326,6 +336,10 @@ static int warp_y = 0;
 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;
@@ -494,6 +508,10 @@ e_border_init(void)
    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();
@@ -864,6 +882,10 @@ e_border_new(E_Container   *con,
    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;
 
@@ -5994,6 +6016,7 @@ _e_border_cb_window_show_request(void *data  __UNUSED__,
    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) &&
@@ -6002,6 +6025,7 @@ _e_border_cb_window_show_request(void *data  __UNUSED__,
         con = bd->zone->container;
         bd = e_border_new(con, e->win, 0, 0);
      }
+#endif
 
    if (bd->iconic)
      {
@@ -6050,11 +6074,93 @@ _e_border_cb_window_destroy(void *data  __UNUSED__,
           }
      }
 #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__,
@@ -6090,6 +6196,52 @@ _e_border_cb_window_hide(void *data  __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)
      {
@@ -8077,12 +8229,16 @@ _e_border_cb_rotation_sync_job(void *data)
    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);
@@ -8151,7 +8307,8 @@ _e_border_rotation_change_request(E_Zone *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;
@@ -8433,6 +8590,7 @@ _e_border_rotation_angle_get(E_Border *bd)
    // 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;
@@ -8478,6 +8636,7 @@ _e_border_rotation_angle_get(E_Border *bd)
          * 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;
@@ -8587,6 +8746,7 @@ _e_border_rotation_set_internal(E_Border *bd, int rotation, Eina_Bool *pending)
 
    /* 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))))
      {
@@ -8921,10 +9081,14 @@ _e_border_rotation_pre_resize(E_Border *bd, int rotation, int *x, int *y, int *w
                                       &_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
      {
@@ -8995,11 +9159,6 @@ _e_border_cb_window_configure(void *data    __UNUSED__,
              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,
@@ -10014,6 +10173,20 @@ _e_border_eval0(E_Border *bd)
         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)
      {
@@ -11579,11 +11752,13 @@ _e_border_eval(E_Border *bd)
    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))
      {
@@ -12855,4 +13030,135 @@ e_border_activate(E_Border *bd, Eina_Bool just_do_it)
           }
      }
 }
+
+#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*/
index 2095efa..81c9c89 100644 (file)
@@ -50,7 +50,7 @@ typedef enum _E_Focus_Setting
    E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED,
 #ifdef _F_FOCUS_WINDOW_IF_TOP_STACK_
    E_FOCUS_NEW_WINDOW_IF_TOP_STACK
-#endif   
+#endif
 } E_Focus_Setting;
 
 typedef enum _E_Maximize
@@ -432,7 +432,37 @@ struct _E_Border
                Eina_List *req_list;
                E_Border *ancestor;
                Ecore_Job *pending_job;
+               E_Border *pending_bd;
             } deiconify_approve;
+
+            struct
+            {
+               struct
+               {
+                  unsigned char pending;
+                  Ecore_X_Window win;
+                  Ecore_X_Window event_win;
+               } destroy;
+               struct
+               {
+                  unsigned char pending;
+                  Ecore_X_Window win;
+                  Ecore_X_Window event_win;
+                  Eina_Bool send_event;
+               } hide;
+               struct
+               {
+                  unsigned char pending;
+                  Ecore_X_Window win;
+                  Ecore_X_Window parent_win;
+                  Ecore_X_Window above_win;
+                  Ecore_X_Window_Stack_Mode detail;
+                  unsigned long value_mask;
+               } lower;
+               unsigned char done : 1; 
+               unsigned char pending: 1; 
+               E_Border *hold_bd;
+            } pending_event;
 #endif
 #ifdef _F_USE_DESK_WINDOW_PROFILE_
             unsigned char  profile_list : 1;
index 79dfe2b..c6127dc 100644 (file)
@@ -155,9 +155,6 @@ e_config_init(void)
                {
                   /* use system if no user profile config */
                   e_prefix_data_concat_static(buf, "data/config/profile.cfg");
-#ifdef _F_COPY_FROM_DATA_DIR_
-                  e_prefix_data_concat_static(buf, "config/e/config/profile.cfg");
-#endif
                   ef = eet_open(buf, EET_FILE_MODE_READ);
                }
           }
@@ -1658,18 +1655,6 @@ e_config_domain_load(const char *domain, E_Config_DD *edd)
              if (data) return data;
           }
      }
-#ifdef _F_COPY_FROM_DATA_DIR_
-   if(data = e_config_domain_system_load(domain, edd))
-     {
-        char cmd[PATH_MAX];
-        e_prefix_data_snprintf(buf, sizeof(buf), "config");
-
-        snprintf(cmd, sizeof(cmd), "/bin/cp -rf %s/* %s/.e", buf, getenv("HOME"));
-        system(cmd);
-
-        return e_config_domain_load(domain, edd);
-     }
-#endif
    return e_config_domain_system_load(domain, edd);
 }
 
@@ -1682,10 +1667,6 @@ e_config_domain_system_load(const char *domain, E_Config_DD *edd)
 
    e_prefix_data_snprintf(buf, sizeof(buf), "data/config/%s/%s.cfg",
                           _e_config_profile, domain);
-#ifdef _F_COPY_FROM_DATA_DIR_
-   e_prefix_data_snprintf(buf, sizeof(buf), "config/e/config/%s/%s.cfg",
-                          _e_config_profile, domain);
-#endif
    ef = eet_open(buf, EET_FILE_MODE_READ);
    if (ef)
      {
index a3e50b5..c975b16 100644 (file)
@@ -1502,7 +1502,7 @@ e_zone_rotation_block_set(E_Zone *zone, const char *name_hint, Eina_Bool set)
      {
         zone->rot.block_count = 0;
 
-        e_border_rotation_list_clear(zone, EINA_TRUE);
+//        e_border_rotation_list_clear(zone, EINA_FALSE);
         if (zone->rot.pending)
           {
              zone->rot.prev = zone->rot.curr;