summaryrefslogtreecommitdiff
path: root/src/lib/ecore_win32
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2018-01-14 22:33:10 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-01-14 22:33:34 +0900
commit487f2a5f81c4c05cc5cd30f7c3630f772623d0f8 (patch)
treedbc3de65ddcbc639a26613b654d07f97df0af19d /src/lib/ecore_win32
parent0179d34f0fe1ca879906c24d56ad717f23587431 (diff)
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
Diffstat (limited to 'src/lib/ecore_win32')
-rw-r--r--src/lib/ecore_win32/ecore_win32.c8
-rw-r--r--src/lib/ecore_win32/ecore_win32_event.c6
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()
527 goto shutdown_ecore_event; 527 goto shutdown_ecore_event;
528 } 528 }
529 529
530 ecore_win32_monitor_init();
531
530 icon = LoadImage(_ecore_win32_instance, 532 icon = LoadImage(_ecore_win32_instance,
531 MAKEINTRESOURCE(IDI_ICON), 533 MAKEINTRESOURCE(IDI_ICON),
532 IMAGE_ICON, 534 IMAGE_ICON,
@@ -589,8 +591,6 @@ ecore_win32_init()
589 for (i = 0; i < 77; i++) 591 for (i = 0; i < 77; i++)
590 _ecore_win32_cursor_x[i] = _ecore_win32_cursor_x11_shaped_new(i); 592 _ecore_win32_cursor_x[i] = _ecore_win32_cursor_x11_shaped_new(i);
591 593
592 ecore_win32_monitor_init();
593
594 return _ecore_win32_init_count; 594 return _ecore_win32_init_count;
595 595
596 unregister_class: 596 unregister_class:
@@ -625,8 +625,6 @@ ecore_win32_shutdown()
625 if (--_ecore_win32_init_count != 0) 625 if (--_ecore_win32_init_count != 0)
626 return _ecore_win32_init_count; 626 return _ecore_win32_init_count;
627 627
628 ecore_win32_monitor_shutdown();
629
630 for (i = 0; i < 77; i++) 628 for (i = 0; i < 77; i++)
631 ecore_win32_cursor_free(_ecore_win32_cursor_x[i]); 629 ecore_win32_cursor_free(_ecore_win32_cursor_x[i]);
632 630
@@ -651,6 +649,8 @@ ecore_win32_shutdown()
651 if (!UnregisterClass(ECORE_WIN32_WINDOW_CLASS, _ecore_win32_instance)) 649 if (!UnregisterClass(ECORE_WIN32_WINDOW_CLASS, _ecore_win32_instance))
652 INF("UnregisterClass() failed"); 650 INF("UnregisterClass() failed");
653 651
652 ecore_win32_monitor_shutdown();
653
654 if (!FreeLibrary(_ecore_win32_instance)) 654 if (!FreeLibrary(_ecore_win32_instance))
655 INF("FreeLibrary() failed"); 655 INF("FreeLibrary() failed");
656 656
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)
1776{ 1776{
1777 Ecore_Win32_Event_Window_Create *e; 1777 Ecore_Win32_Event_Window_Create *e;
1778 1778
1779 if (msg->window == ecore_win32_monitor_window)
1780 return;
1781
1779 INF("window create notify"); 1782 INF("window create notify");
1780 1783
1781 e = calloc(1, sizeof(Ecore_Win32_Event_Window_Create)); 1784 e = calloc(1, sizeof(Ecore_Win32_Event_Window_Create));
@@ -1793,6 +1796,9 @@ _ecore_win32_event_handle_destroy_notify(Ecore_Win32_Callback_Data *msg)
1793{ 1796{
1794 Ecore_Win32_Event_Window_Destroy *e; 1797 Ecore_Win32_Event_Window_Destroy *e;
1795 1798
1799 if (msg->window == ecore_win32_monitor_window)
1800 return;
1801
1796 INF("window destroy notify"); 1802 INF("window destroy notify");
1797 1803
1798 e = calloc(1, sizeof(Ecore_Win32_Event_Window_Destroy)); 1804 e = calloc(1, sizeof(Ecore_Win32_Event_Window_Destroy));