forked from enlightenment/efl
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
This commit is contained in:
parent
0179d34f0f
commit
487f2a5f81
|
@ -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");
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue