kwo pushed a commit to branch master.

http://git.enlightenment.org/e16/e16.git/commit/?id=77c9525cea3e671141abd2a0120768922d2f1ed5

commit 77c9525cea3e671141abd2a0120768922d2f1ed5
Author: Kim Woelders <k...@woelders.dk>
Date:   Tue Jul 20 19:41:17 2021 +0200

    extinitwin: Fix parent/client synchronization
    
    1) Clear ENLIGHTENMENT_RESTART_SCREEN property on start so we properly
       detect the client init condition.
    2) Use SleepUs() instead of time() to properly force a delay.
       time() was interrupted by signals (SIGCHLDs) cutting the delay short.
---
 src/extinitwin.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/extinitwin.c b/src/extinitwin.c
index 7f7b8826..ec718dc9 100644
--- a/src/extinitwin.c
+++ b/src/extinitwin.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various 
contributors
- * Copyright (C) 2004-2020 Kim Woelders
+ * Copyright (C) 2004-2021 Kim Woelders
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to
@@ -259,6 +259,7 @@ ExtInitWinCreate(void)
       Eprintf("%s\n", __func__);
 
    a = ex_atom_get("ENLIGHTENMENT_RESTART_SCREEN");
+   ex_window_prop_window_set(WinGetXwin(RROOT), a, NULL, 0);
    ESync(0);
 
    if (fork())
@@ -272,7 +273,7 @@ ExtInitWinCreate(void)
                Eprintf("%s: parent\n", __func__);
 
             /* Hack to give the child some space. Not foolproof. */
-            sleep(1);
+            SleepUs(500000);
 
             if (ex_window_prop_window_get
                 (WinGetXwin(RROOT), a, &win_ex, 1) > 0)

-- 


Reply via email to