e_scale: make an internal header
[platform/upstream/enlightenment.git] / src / bin / e_main.c
index 6c4ab3d..6b15f81 100644 (file)
@@ -1,4 +1,14 @@
 #include "e.h"
+#include "e_actions_intern.h"
+#include "e_test_helper_intern.h"
+#include "e_user_intern.h"
+#include "e_utils_intern.h"
+#include "e_theme_intern.h"
+#include "e_signals_intern.h"
+#include "e_security_intern.h"
+#include "e_screensaver_intern.h"
+#include "e_scale_intern.h"
+
 #ifdef __linux__
 # include <sys/prctl.h>
 #endif
@@ -122,7 +132,8 @@ static int _e_main_hooks_walking = 0;
 static Eina_Inlist *_e_main_hooks[] =
 {
    [E_MAIN_HOOK_MODULE_LOAD_DONE] = NULL,
-   [E_MAIN_HOOK_E_INFO_READY] = NULL
+   [E_MAIN_HOOK_E_INFO_READY] = NULL,
+   [E_MAIN_HOOK_POST_CLIENT_IDLER_BEFORE] = NULL
 };
 
 /* external variables */
@@ -239,14 +250,6 @@ _e_main_subsystem_defer(void *data EINA_UNUSED)
    TSE("[DEFERRED] DPMS Init Done");
    _e_main_shutdown_push(e_dpms_shutdown);
 
-   TSB("[DEFERRED] Screens Init: win");
-   if (!e_win_init())
-     {
-        e_error_message_show(_("Enlightenment cannot setup elementary trap!\n"));
-        goto failed;
-     }
-   TSE("[DEFERRED] Screens Init: win Done");
-
    TSB("[DEFERRED] E_Dnd Init");
    if (!e_dnd_init())
      {
@@ -587,7 +590,6 @@ main(int argc, char **argv)
    e_screensaver_preinit();
    e_zone_init();
    e_desk_init();
-   e_slot_init();
    e_magnifier_init();
 
    TRACE_DS_BEGIN(MAIN:WAIT /dev/dri/card0);
@@ -1125,12 +1127,10 @@ _e_main_screens_init(void)
 static int
 _e_main_screens_shutdown(void)
 {
-   e_win_shutdown();
    e_comp_shutdown();
    e_client_shutdown();
 
    e_magnifier_shutdown();
-   e_slot_shutdown();
    e_desk_shutdown();
    e_zone_shutdown();
    return 1;
@@ -1155,20 +1155,26 @@ static void
 _e_main_desk_restore(void)
 {
    E_Client *ec;
+   E_Zone *zone;
 
    E_CLIENT_REVERSE_FOREACH(ec)
-     if ((!e_client_util_ignored_get(ec)) && e_client_util_desk_visible(ec, e_desk_current_get(ec->zone)))
-       {
-          ec->want_focus = ec->take_focus = 1;
-          break;
-       }
+     {
+        zone = e_comp_zone_find_by_ec(ec);
+        if ((!e_client_util_ignored_get(ec)) && e_desk_has_ec(e_desk_current_get(zone), ec))
+          {
+             ec->want_focus = ec->take_focus = 1;
+             break;
+          }
+     }
 }
 
 static Eina_Bool
 _e_main_cb_idle_before(void *data EINA_UNUSED)
 {
-   e_client_idler_before();
+   e_comp_idler_before();
+   _e_main_hook_call(E_MAIN_HOOK_POST_CLIENT_IDLER_BEFORE, NULL);
    edje_thaw();
+
    return ECORE_CALLBACK_RENEW;
 }