raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=487f2a5f81c4c05cc5cd30f7c3630f772623d0f8

commit 487f2a5f81c4c05cc5cd30f7c3630f772623d0f8
Author: Vincent Torri <vincent.to...@gmail.com>
Date:   Sun Jan 14 22:33:10 2018 +0900

    Ecore_Win32: move monitor window initialization to earlier in init func
    
    Summary: This monitor window is just used to receive events when mutiple
    monitors are available. it should not be managed by the ecore loop
    (creation and destruction events), so initting it earlier means
    ecore_win32 attaches less memory/overhead to it as it's just being
    used for notifications for devices.
    
    Test Plan: DrMemory to check used memory
    
    Reviewers: cedric
    
    Subscribers: jpeg
    
    Differential Revision: https://phab.enlightenment.org/D5736
---
 src/lib/ecore_win32/ecore_win32.c       | 8 ++++----
 src/lib/ecore_win32/ecore_win32_event.c | 6 ++++++
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/lib/ecore_win32/ecore_win32.c 
b/src/lib/ecore_win32/ecore_win32.c
index ec9738ee1b..3801015b8f 100644
--- a/src/lib/ecore_win32/ecore_win32.c
+++ b/src/lib/ecore_win32/ecore_win32.c
@@ -527,6 +527,8 @@ ecore_win32_init()
         goto shutdown_ecore_event;
      }
 
+   ecore_win32_monitor_init();
+
    icon = LoadImage(_ecore_win32_instance,
                     MAKEINTRESOURCE(IDI_ICON),
                     IMAGE_ICON,
@@ -589,8 +591,6 @@ ecore_win32_init()
    for (i = 0; i < 77; i++)
      _ecore_win32_cursor_x[i] = _ecore_win32_cursor_x11_shaped_new(i);
 
-   ecore_win32_monitor_init();
-
    return _ecore_win32_init_count;
 
  unregister_class:
@@ -625,8 +625,6 @@ ecore_win32_shutdown()
    if (--_ecore_win32_init_count != 0)
      return _ecore_win32_init_count;
 
-   ecore_win32_monitor_shutdown();
-
    for (i = 0; i < 77; i++)
      ecore_win32_cursor_free(_ecore_win32_cursor_x[i]);
 
@@ -651,6 +649,8 @@ ecore_win32_shutdown()
    if (!UnregisterClass(ECORE_WIN32_WINDOW_CLASS, _ecore_win32_instance))
      INF("UnregisterClass() failed");
 
+   ecore_win32_monitor_shutdown();
+
    if (!FreeLibrary(_ecore_win32_instance))
      INF("FreeLibrary() failed");
 
diff --git a/src/lib/ecore_win32/ecore_win32_event.c 
b/src/lib/ecore_win32/ecore_win32_event.c
index a22fbed992..e6ab091945 100644
--- a/src/lib/ecore_win32/ecore_win32_event.c
+++ b/src/lib/ecore_win32/ecore_win32_event.c
@@ -1776,6 +1776,9 @@ 
_ecore_win32_event_handle_create_notify(Ecore_Win32_Callback_Data *msg)
 {
    Ecore_Win32_Event_Window_Create *e;
 
+   if (msg->window == ecore_win32_monitor_window)
+     return;
+
    INF("window create notify");
 
    e = calloc(1, sizeof(Ecore_Win32_Event_Window_Create));
@@ -1793,6 +1796,9 @@ 
_ecore_win32_event_handle_destroy_notify(Ecore_Win32_Callback_Data *msg)
 {
    Ecore_Win32_Event_Window_Destroy *e;
 
+   if (msg->window == ecore_win32_monitor_window)
+     return;
+
    INF("window destroy notify");
 
    e = calloc(1, sizeof(Ecore_Win32_Event_Window_Destroy));

-- 


Reply via email to