@@ -40,6 +40,12 @@ void EmbeddedProcess::_notification(int p_what) {
4040 case NOTIFICATION_ENTER_TREE: {
4141 window = get_window ();
4242 } break ;
43+ case NOTIFICATION_PROCESS: {
44+ if (updated_embedded_process_queued) {
45+ updated_embedded_process_queued = false ;
46+ _update_embedded_process ();
47+ }
48+ } break ;
4349 case NOTIFICATION_DRAW: {
4450 _draw ();
4551 } break ;
@@ -179,6 +185,7 @@ void EmbeddedProcess::embed_process(OS::ProcessID p_pid) {
179185 start_embedding_time = OS::get_singleton ()->get_ticks_msec ();
180186 embedding_grab_focus = has_focus ();
181187 timer_update_embedded_process->start ();
188+ set_process (true );
182189 set_notify_transform (true );
183190
184191 // Attempt to embed the process, but if it has just started and the window is not ready yet,
@@ -196,6 +203,7 @@ void EmbeddedProcess::reset() {
196203 embedding_grab_focus = false ;
197204 timer_embedding->stop ();
198205 timer_update_embedded_process->stop ();
206+ set_process (false );
199207 set_notify_transform (false );
200208 queue_redraw ();
201209}
@@ -251,11 +259,6 @@ void EmbeddedProcess::_timer_update_embedded_process_timeout() {
251259 queue_update_embedded_process ();
252260 }
253261 }
254-
255- if (updated_embedded_process_queued) {
256- updated_embedded_process_queued = false ;
257- _update_embedded_process ();
258- }
259262}
260263
261264void EmbeddedProcess::_update_embedded_process () {
0 commit comments