| version 1.4, 2003/10/21 10:35:05 |
version 1.5, 2003/10/21 13:59:57 |
|
|
| |
|
| #include <stdlib.h> |
#include <stdlib.h> |
| #include <string.h> |
#include <string.h> |
| |
#include <ctype.h> |
| #if defined(X11_BGI_DEBUG) && X11_BGI_DEBUG |
#if defined(X11_BGI_DEBUG) && X11_BGI_DEBUG |
| # include <stdio.h> |
# include <stdio.h> |
| #endif |
#endif |
| Line 1166 initgraph (int *graphdriver, int *graphm |
|
| Line 1167 initgraph (int *graphdriver, int *graphm |
|
| TcWindow = XCreateSimpleWindow (TcDisplay, |
TcWindow = XCreateSimpleWindow (TcDisplay, |
| DefaultRootWindow (TcDisplay), |
DefaultRootWindow (TcDisplay), |
| 0, 0, Xres, Yres, 0, White, Black); |
0, 0, Xres, Yres, 0, White, Black); |
| |
/* Set up window title */ |
| |
{ |
| |
char *window_name = NULL; |
| |
#if defined(PACKAGE) |
| |
# if defined(VERSION) |
| |
window_name = strdup(PACKAGE " " VERSION); |
| |
if (window_name != NULL && strchr(VERSION, '-') != NULL) |
| |
*strrchr(window_name, '-') = '\0'; |
| |
# else |
| |
window_name = strdup(PACKAGE); |
| |
# endif |
| |
if (window_name != NULL) |
| |
window_name[0] = toupper(window_name[0]); |
| |
#endif |
| |
XChangeProperty(TcDisplay, TcWindow, XA_WM_NAME, XA_STRING, 8, |
| |
PropModeReplace, window_name == NULL |
| |
? (unsigned char *) "X11 BGI" |
| |
: (unsigned char *) window_name, 50); |
| |
#if defined(PACKAGE) |
| |
if (window_name != NULL) |
| |
free(window_name); |
| |
#endif |
| |
} |
| /* Beg the window manager not to allow the window to be resized. */ |
/* Beg the window manager not to allow the window to be resized. */ |
| XSetNormalHints (TcDisplay, TcWindow, SizeHints); |
XSetNormalHints (TcDisplay, TcWindow, SizeHints); |
| /* Tell the window manager we don't want the graphics window */ |
/* Tell the window manager we don't want the graphics window */ |