summaryrefslogtreecommitdiff
path: root/src/periodic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/periodic.c')
-rw-r--r--src/periodic.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/periodic.c b/src/periodic.c
index 068f2a1e..ef3d8033 100644
--- a/src/periodic.c
+++ b/src/periodic.c
@@ -91,9 +91,11 @@ iBool dispatchCommands_Periodic(iPeriodic *d) {
91 .data1 = (void *) cstr_String(&pc->command), 91 .data1 = (void *) cstr_String(&pc->command),
92 .data2 = findRoot_Window(get_Window(), pc->context) 92 .data2 = findRoot_Window(get_Window(), pc->context)
93 }; 93 };
94 setCurrent_Root(ev.data2); 94 if (ev.data2) {
95 dispatchEvent_Widget(pc->context, (const SDL_Event *) &ev); 95 setCurrent_Root(ev.data2);
96 wasPosted = iTrue; 96 dispatchEvent_Widget(pc->context, (const SDL_Event *) &ev);
97 wasPosted = iTrue;
98 }
97 } 99 }
98 removePending_Periodic_(d); 100 removePending_Periodic_(d);
99 setCurrent_Root(NULL); 101 setCurrent_Root(NULL);