Skip to content

Commit aef1ab2

Browse files
committed
[[ Bug 19420 ]] Initialise event queue on startup
1 parent d612429 commit aef1ab2

5 files changed

Lines changed: 22 additions & 0 deletions

File tree

engine/src/dskmain.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
3939
#include "font.h"
4040
#include "stacksecurity.h"
4141
#include "system.h"
42+
#include "eventqueue.h"
4243

4344
////////////////////////////////////////////////////////////////////////////////
4445

@@ -114,6 +115,9 @@ bool X_init(int argc, MCStringRef argv[], MCStringRef envp[])
114115
// MW-2012-02-23: [[ FontRefs ]] Initialize the logical font table module.
115116
MCLogicalFontTableInitialize();
116117

118+
// Initialize the event queue
119+
MCEventQueueInitialize();
120+
117121
////
118122

119123
MCswapbytes = byte_swapped();

engine/src/em-dc-mainloop.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
3030
#include "system.h"
3131
#include "font.h"
3232
#include "util.h"
33+
#include "eventqueue.h"
3334

3435
#include <arpa/inet.h>
3536

@@ -143,6 +144,12 @@ X_init(int argc,
143144
goto error_cleanup;
144145
}
145146

147+
// Initialize the event queue
148+
if (!MCEventQueueInitialize())
149+
{
150+
goto error_cleanup;
151+
}
152+
146153
/* ---------- More globals */
147154

148155
/* executable file name */

engine/src/globals.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,6 +1471,9 @@ int X_close(void)
14711471
// Cleanup the parentscript stuff
14721472
MCParentScript::Cleanup();
14731473

1474+
// Finalize the event queue
1475+
MCEventQueueFinalize();
1476+
14741477
// MW-2012-02-23: [[ LogFonts ]] Finalize the font table module.
14751478
MCLogicalFontTableFinalize();
14761479
// MW-2012-02-23: [[ FontRefs ]] Finalize the font module.

engine/src/mblmain.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
3737
#include "redraw.h"
3838
#include "system.h"
3939
#include "font.h"
40+
#include "eventqueue.h"
4041

4142
////////////////////////////////////////////////////////////////////////////////
4243

@@ -105,6 +106,9 @@ bool X_init(int argc, MCStringRef argv[], int envc, MCStringRef envp[])
105106
// MW-2012-02-23: [[ FontRefs ]] Initialize the logical font table module.
106107
MCLogicalFontTableInitialize();
107108

109+
// Initialize the event queue
110+
MCEventQueueInitialize();
111+
108112
// MM-2014-02-10: [[ LipOpenSSL 1.0.1e ]] Attempt load revsecurity library on Java side.
109113
#if defined(TARGET_SUBPLATFORM_ANDROID)
110114
extern bool revandroid_loadExternalLibrary(MCStringRef p_external, MCStringRef& r_filename);

engine/src/srvmain.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
4040
#include "uidc.h"
4141
#include "font.h"
4242
#include "libscript/script.h"
43+
#include "eventqueue.h"
4344

4445
////////////////////////////////////////////////////////////////////////////////
4546

@@ -377,6 +378,9 @@ bool X_init(int argc, MCStringRef argv[], MCStringRef envp[])
377378
// MW-2012-02-23: [[ FontRefs ]] Initialize the logical font table module.
378379
MCLogicalFontTableInitialize();
379380

381+
// Initialize the event queue
382+
MCEventQueueInitialize();
383+
380384
////
381385

382386
// Create the basic locale and the system locale

0 commit comments

Comments
 (0)