Tue Jan 18 11:56:55 PST 2000

(Raster)

extra check for xim in ttfonts


SVN revision: 1939
This commit is contained in:
Carsten Haitzler 2000-01-18 19:02:00 +00:00
parent 409f600dfa
commit fb460a525a
4 changed files with 57 additions and 42 deletions

View File

@ -4162,3 +4162,10 @@ Mon Jan 10 20:08:46 PST 2000
(Raster)
i cant remmeber if the last commit worked..
-------------------------------------------------------------------------------
Tue Jan 18 11:56:55 PST 2000
(Raster)
extra check for xim in ttfonts

View File

@ -54,7 +54,7 @@ Etmp(char *s)
n_calls = (unsigned long)time(NULL) + (unsigned long)getpid();
Esnprintf(s, 1024, "%s/TMP_%Xl", UserEDir(), n_calls);
n_calls++;
EDBUG_RETURN_;
EDBUG_RETURN_;
}
void
md(char *s)

View File

@ -330,8 +330,7 @@ SetupX()
Alert(_("FATAL ERROR:\n"
"\n"
"Enlightenment is unable to initialise Imlib.\n"
"\n"
"This is unusual. Unable to continue.\n" "Exiting.\n"));
"\n" "This is unusual. Unable to continue.\n" "Exiting.\n"));
RESET_ALERT;
EExit((void *)1);
}
@ -343,8 +342,7 @@ SetupX()
Alert(_("FATAL ERROR:\n"
"\n"
"Enlightenment is unable to initialise Fnlib.\n"
"\n"
"This is unusual. Unable to continue.\n" "Exiting.\n"));
"\n" "This is unusual. Unable to continue.\n" "Exiting.\n"));
RESET_ALERT;
EExit((void *)1);
}
@ -432,13 +430,13 @@ SetupX()
/* ok under Xfree Numlock and Scollock are lock modifiers and we need */
/* to hunt them down to mask them out - EVIL EVIL EVIL hack but needed */
{
XModifierKeymap * mod;
XModifierKeymap *mod;
KeyCode nl, sl;
int i;
int masks[8] =
{
int masks[8] = {
ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask, Mod3Mask,
Mod4Mask, Mod5Mask};
Mod4Mask, Mod5Mask
};
mod = XGetModifierMapping(disp);
nl = XKeysymToKeycode(disp, XK_Num_Lock);
@ -613,7 +611,8 @@ SetupX()
static void ChkDir(char *d);
static void ChkDir(char *d)
static void
ChkDir(char *d)
{
if (!isdir(d))
{
@ -647,7 +646,8 @@ static void ChkDir(char *d)
}
}
void SetupDirs()
void
SetupDirs()
{
char s[1024], ss[1024], *home;
@ -710,7 +710,8 @@ void SetupDirs()
EDBUG_RETURN_;
}
void SetupEnv()
void
SetupEnv()
{
char s[1024];
@ -734,9 +735,9 @@ void SetupEnv()
return;
}
Window MakeExtInitWin(void)
Window MakeExtInitWin(void)
{
Display * d2;
Display *d2;
Window win;
XGCValues gcv;
GC gc;
@ -745,10 +746,10 @@ Window MakeExtInitWin(void)
CARD32 val;
int format_ret, i;
unsigned long bytes_after, num_ret;
Window * retval;
Window *retval;
XSetWindowAttributes attr;
ImlibData * imd;
ImlibData *imd;
a = XInternAtom(disp, "ENLIGHTENMENT_RESTART_SCREEN", False);
XSync(disp, False);
@ -845,9 +846,9 @@ Window MakeExtInitWin(void)
else
{
Window w2, ww;
char * f, s[1024];
char *f, s[1024];
Pixmap pmap, mask;
ImlibImage * im;
ImlibImage *im;
struct timeval tv;
int dd, x, y;
unsigned int mm;
@ -925,10 +926,11 @@ Window MakeExtInitWin(void)
exit(0);
}
void SetupUserInitialization(void)
void
SetupUserInitialization(void)
{
FILE * f;
FILE *f;
char file[FILEPATH_LEN_MAX];
EDBUG(3, "SetupUserInitialization");

View File

@ -692,36 +692,42 @@ EFont_draw_string(Display * disp, Drawable win, GC gc, int x, int y, char *text,
* }
* }
*/
if (xatt.depth == 16)
if (xim)
{
if (id->x.render_depth == 15)
merge_text_15(xim, rmap, clipx, clipy, col);
else
merge_text_16(xim, rmap, clipx, clipy, col);
}
else if ((xatt.depth == 24) || (xatt.depth == 32))
merge_text_24(xim, rmap, clipx, clipy, col);
if (xatt.depth == 16)
{
if (id->x.render_depth == 15)
merge_text_15(xim, rmap, clipx, clipy, col);
else
merge_text_16(xim, rmap, clipx, clipy, col);
}
else if ((xatt.depth == 24) || (xatt.depth == 32))
merge_text_24(xim, rmap, clipx, clipy, col);
/* else if (xatt.depth == 8)
* merge_text_8(xim, rmap, clipx, clipy, cm, col); */
else if (xatt.depth == 15)
merge_text_15(xim, rmap, clipx, clipy, col);
else if (xatt.depth <= 8)
merge_text_1(xim, rmap, clipx, clipy, col);
else if (xatt.depth == 15)
merge_text_15(xim, rmap, clipx, clipy, col);
else if (xatt.depth <= 8)
merge_text_1(xim, rmap, clipx, clipy, col);
if (shm)
XShmPutImage(disp, win, gc, xim, 0, 0, x, y, width, height, False);
else
XPutImage(disp, win, gc, xim, 0, 0, x, y, width, height);
if (shm)
XShmPutImage(disp, win, gc, xim, 0, 0, x, y, width, height, False);
else
XPutImage(disp, win, gc, xim, 0, 0, x, y, width, height);
}
destroy_font_raster(rmap);
destroy_font_raster(rtmp);
if (shm)
if (xim)
{
XSync(disp, False);
XShmDetach(disp, &shminfo);
shmdt(shminfo.shmaddr);
shmctl(shminfo.shmid, IPC_RMID, 0);
if (shm)
{
XSync(disp, False);
XShmDetach(disp, &shminfo);
shmdt(shminfo.shmaddr);
shmctl(shminfo.shmid, IPC_RMID, 0);
}
XDestroyImage(xim);
}
XDestroyImage(xim);
cm = 0;
}