summaryrefslogtreecommitdiff
path: root/src/periodic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/periodic.c')
-rw-r--r--src/periodic.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/periodic.c b/src/periodic.c
index eb4fb98d..0291ff98 100644
--- a/src/periodic.c
+++ b/src/periodic.c
@@ -70,10 +70,11 @@ iBool dispatchCommands_Periodic(iPeriodic *d) {
70 const SDL_UserEvent ev = { 70 const SDL_UserEvent ev = {
71 .type = SDL_USEREVENT, 71 .type = SDL_USEREVENT,
72 .code = command_UserEventCode, 72 .code = command_UserEventCode,
73 .data1 = (void *) cstr_String(&pc->command) 73 .data1 = (void *) cstr_String(&pc->command),
74 .data2 = findRoot_Window(get_Window(), pc->context)
74 }; 75 };
75 iAssert(isInstance_Object(pc->context, &Class_Widget)); 76 iAssert(isInstance_Object(pc->context, &Class_Widget));
76 setCurrent_Root(findRoot_Window(get_Window(), pc->context)); 77 setCurrent_Root(ev.data2);
77 dispatchEvent_Widget(pc->context, (const SDL_Event *) &ev); 78 dispatchEvent_Widget(pc->context, (const SDL_Event *) &ev);
78 wasPosted = iTrue; 79 wasPosted = iTrue;
79 } 80 }