Sun Oct 10 01:43:18 PDT 1999

(Raster)

cleaned up a possible race condition when setting up IPC (discovered it
coudl be a possible race condition whilsyt testign epplets starting on login)


SVN revision: 747
This commit is contained in:
Carsten Haitzler 1999-10-10 04:46:45 +00:00
parent 3bfe9cbcc4
commit 34399dbccd
7 changed files with 88 additions and 23 deletions

View File

@ -3381,3 +3381,11 @@ Sun Oct 10 01:32:17 PDT 1999
(Mandrake)
pretty much finished up shinymetal now. what a pita.
-------------------------------------------------------------------------------
Sun Oct 10 01:43:18 PDT 1999
(Raster)
cleaned up a possible race condition when setting up IPC (discovered it
coudl be a possible race condition whilsyt testign epplets starting on login)

View File

@ -2961,6 +2961,8 @@ extern int scrollock_mask;
extern int mask_mod_combos[8];
extern Group *current_group;
extern char *dstr;
extern char *badtheme;
extern char *badreason;
/* This turns on E's internal stack tracking system for coarse debugging */
/* and being able to trace E for profiling/optimisation purposes (which */

View File

@ -30,12 +30,13 @@ CommsSetup()
EDBUG(5, "CommsSetup");
comms_win = XCreateSimpleWindow(disp, root.win, -100, -100, 5, 5, 0, 0, 0);
XSelectInput(disp, comms_win, StructureNotifyMask | SubstructureNotifyMask);
Esnprintf(s, sizeof(s), "WINID %8x", (int)comms_win);
a = XInternAtom(disp, "ENLIGHTENMENT_COMMS", False);
XChangeProperty(disp, root.win, a, XA_STRING, 8, PropModeReplace,
(unsigned char *)s, strlen(s));
XChangeProperty(disp, comms_win, a, XA_STRING, 8, PropModeReplace,
(unsigned char *)s, strlen(s));
XChangeProperty(disp, root.win, a, XA_STRING, 8, PropModeReplace,
(unsigned char *)s, strlen(s));
if (!a)
a = XInternAtom(disp, "ENL_MSG", False);
EDBUG_RETURN_;

View File

@ -65,3 +65,5 @@ int scrollock_mask = 0;
int mask_mod_combos[8];
Group *current_group;
char *dstr = NULL;
char *badtheme = NULL;
char *badreason = NULL;

View File

@ -267,9 +267,6 @@ main(int argc, char **argv)
MapUnmap(1);
/* set some more stuff for gnome */
GNOME_SetCurrentArea();
/* if we didn't have an external window piped to us, we'll do some stuff */
if (!init_win_ext)
SpawnSnappedCmds();
desks.current = 0;
/* Set up the internal pagers */
IB_Setup();
@ -346,6 +343,9 @@ main(int argc, char **argv)
desks.slidein = ps;
}
XSync(disp, False);
/* if we didn't have an external window piped to us, we'll do some stuff */
if (!init_win_ext)
SpawnSnappedCmds();
if (!mode.mapslide)
CreateStartupDisplay(0);
if ((bg = RemoveItem("STARTUP_BACKGROUND_SIDEWAYS", 0, LIST_FINDBY_NAME,

View File

@ -304,49 +304,94 @@ SanitiseThemeDir(char *dir)
return 1;
Esnprintf(s, sizeof(s), "%s/%s", dir, "borders.cfg");
if (!isfile(s))
return 0;
{
badreason = "Theme does not contain a borders.cfg file\n";
return 0;
}
Esnprintf(s, sizeof(s), "%s/%s", dir, "buttons.cfg");
if (!isfile(s))
return 0;
{
badreason = "Theme does not contain a buttons.cfg file\n";
return 0;
}
Esnprintf(s, sizeof(s), "%s/%s", dir, "colormodifiers.cfg");
if (!isfile(s))
return 0;
{
badreason = "Theme does not contain a colormodifiers.cfg file\n";
return 0;
}
Esnprintf(s, sizeof(s), "%s/%s", dir, "cursors.cfg");
if (!isfile(s))
return 0;
{
badreason = "Theme does not contain a cursors.cfg file\n";
return 0;
}
Esnprintf(s, sizeof(s), "%s/%s", dir, "desktops.cfg");
if (!isfile(s))
return 0;
{
badreason = "Theme does not contain a desktops.cfg file\n";
return 0;
}
Esnprintf(s, sizeof(s), "%s/%s", dir, "imageclasses.cfg");
if (!isfile(s))
return 0;
{
badreason = "Theme does not contain a imageclasses.cfg file\n";
return 0;
}
Esnprintf(s, sizeof(s), "%s/%s", dir, "init.cfg");
if (!isfile(s))
return 0;
{
badreason = "Theme does not contain a init.cfg file\n";
return 0;
}
Esnprintf(s, sizeof(s), "%s/%s", dir, "menustyles.cfg");
if (!isfile(s))
return 0;
{
badreason = "Theme does not contain a menustyles.cfg file\n";
return 0;
}
Esnprintf(s, sizeof(s), "%s/%s", dir, "slideouts.cfg");
if (!isfile(s))
return 0;
{
badreason = "Theme does not contain a slideouts.cfg file\n";
return 0;
}
Esnprintf(s, sizeof(s), "%s/%s", dir, "sound.cfg");
if (!isfile(s))
return 0;
{
badreason = "Theme does not contain a sound.cfg file\n";
return 0;
}
Esnprintf(s, sizeof(s), "%s/%s", dir, "tooltips.cfg");
if (!isfile(s))
return 0;
{
badreason = "Theme does not contain a tooltips.cfg file\n";
return 0;
}
Esnprintf(s, sizeof(s), "%s/%s", dir, "windowmatches.cfg");
if (!isfile(s))
return 0;
{
badreason = "Theme does not contain a windowmatches.cfg file\n";
return 0;
}
Esnprintf(s, sizeof(s), "%s/%s", dir, "menus.cfg");
if (isfile(s))
return 0;
{
badreason = "Theme contains a menus.cfg file\n";
return 0;
}
Esnprintf(s, sizeof(s), "%s/%s", dir, "control.cfg");
if (isfile(s))
return 0;
{
badreason = "Theme contains a control.cfg file\n";
return 0;
}
Esnprintf(s, sizeof(s), "%s/%s", dir, "keybindings.cfg");
if (isfile(s))
return 0;
{
badreason = "Theme contains a keybindings.cfg file\n";
return 0;
}
return 1;
}

View File

@ -236,8 +236,6 @@ ExtractTheme(char *theme)
EDBUG_RETURN(NULL);
}
static char *badtheme = NULL;
char *
FindTheme(char *theme)
{
@ -245,6 +243,7 @@ FindTheme(char *theme)
char *ret = NULL;
EDBUG(6, "FindTheme");
badreason = "Unknown\n";
if (!theme[0])
{
Esnprintf(s, sizeof(s), "%s/themes/DEFAULT", ENLIGHTENMENT_ROOT);
@ -257,11 +256,15 @@ FindTheme(char *theme)
Esnprintf(s, sizeof(s), "%s/themes/%s", UserEDir(), theme);
if (exists(s))
ret = ExtractTheme(s);
else
badreason = "Theme file/direcotry does not exist\n";
if (!ret)
{
Esnprintf(s, sizeof(s), "%s/themes/%s", ENLIGHTENMENT_ROOT, theme);
if (exists(s))
ret = ExtractTheme(s);
else
badreason = "Theme file/direcotry does not exist\n";
if (!ret)
{
ret = GetDefaultTheme();
@ -284,6 +287,10 @@ BadThemeDialog(void)
"The theme:\n"
"%s\n"
"Is a badly formed theme package and is thus not being used.\n"
"Enlightenment has fallen back to using the DEFAULT theme.\n");
"Enlightenment has fallen back to using the DEFAULT theme.\n"
"\n"
"The reason this theme is bad is:\n"
"%s",
badtheme, badreason);
DIALOG_OK("Bad Theme", s);
}