Fix potential segvs.

Could be triggered by early move/resizes, e.g. due to initially
shaded state.

SVN revision: 47727
This commit is contained in:
Kim Woelders 2010-04-03 18:28:49 +00:00
parent 64ff924ff5
commit 31c97439d1
5 changed files with 11 additions and 5 deletions

View File

@ -216,6 +216,8 @@ _ContainerEwinInit(EWin * ewin)
{
Container *ct = (Container *) ewin->data;
ct->ewin = ewin;
EwinSetTitle(ewin, ct->wm_name);
EwinSetClass(ewin, ct->name, "Enlightenment_IconBox");
@ -284,7 +286,6 @@ ContainerShow(Container * ct)
ewin = AddInternalToFamily(ct->win, "ICONBOX", EWIN_TYPE_ICONBOX,
&_ContainerEwinOps, ct);
ct->ewin = ewin;
if (!ewin)
return;

View File

@ -357,6 +357,8 @@ _DialogEwinInit(EWin * ewin)
{
Dialog *d = (Dialog *) ewin->data;
d->ewin = ewin;
EwinSetTitle(ewin, d->title);
EwinSetClass(ewin, d->name, "Enlightenment_Dialog");
d->set_title = 0;
@ -439,7 +441,6 @@ DialogShowArranged(Dialog * d, int center)
ewin = AddInternalToFamily(d->win, "DIALOG", EWIN_TYPE_DIALOG,
&_DialogEwinOps, d);
d->ewin = ewin;
if (!ewin)
return;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2007-2009 Kim Woelders
* Copyright (C) 2007-2010 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
@ -374,6 +374,8 @@ _MagEwinInit(EWin * ewin)
{
MagWindow *mw = (MagWindow *) ewin->data;
mw->ewin = ewin;
EwinSetTitle(ewin, mw->title);
EwinSetClass(ewin, "Magnifier", "Enlightenment_Magnifier");

View File

@ -193,6 +193,8 @@ _MenuEwinInit(EWin * ewin)
{
Menu *m = (Menu *) ewin->data;
m->ewin = ewin;
EwinSetTitle(ewin, _(m->title));
EwinSetClass(ewin, m->name, "Enlightenment_Menu");
@ -335,7 +337,6 @@ MenuShow(Menu * m, char noshow)
ewin = AddInternalToFamily(m->win, m->style->border_name, EWIN_TYPE_MENU,
&_MenuEwinOps, m);
m->ewin = ewin;
if (ewin)
{
ewin->client.event_mask |= KeyPressMask;

View File

@ -625,6 +625,8 @@ _PagerEwinInit(EWin * ewin)
Pager *p = (Pager *) ewin->data;
char s[128];
p->ewin = ewin;
Esnprintf(s, sizeof(s), "Pager-%i", p->dsk->num);
EwinSetTitle(ewin, s);
Esnprintf(s, sizeof(s), "%i", p->dsk->num);
@ -709,7 +711,6 @@ PagerShow(Pager * p)
ewin = AddInternalToFamily(p->win, "PAGER", EWIN_TYPE_PAGER,
&_PagerEwinOps, p);
p->ewin = ewin;
if (!ewin)
return;