136 if(name[0] !=
'~' || name[1] !=
'/') {
167 if(!
Scr->FirstTime) {
194 if(
Scr->StdCmapInfo.mru &&
Scr->StdCmapInfo.mru->maps &&
195 (
Scr->StdCmapInfo.mru->maps[
Scr->StdCmapInfo.mruindex].colormap ==
197 stdcmap = &(
Scr->StdCmapInfo.mru->maps[
Scr->StdCmapInfo.mruindex]);
202 for(
sc =
Scr->StdCmapInfo.head;
sc;
sc =
sc->next) {
205 for(i = 0; i <
sc->nmaps; i++) {
206 if(
sc->maps[i].colormap ==
cmap) {
207 Scr->StdCmapInfo.mru =
sc;
208 Scr->StdCmapInfo.mruindex = i;
218 color.pixel = (
stdcmap->base_pixel +
219 ((
Pixel)(((
float)color.red / 65535.0) *
225 ((
Pixel)(((
float)color.blue / 65535.0) *
277 Scr->FirstTime =
true;
347 if(
Scr->DefaultFont.basename) {
354 fprintf(
stderr,
"%s: unable to open fonts \"%s\" or \"%s\"\n",
363 for(i = 0, ascent = 0, descent = 0; i <
fnum; i++) {
364 ascent =
MaxSize(ascent, (*xfonts)->ascent);
365 descent =
MaxSize(descent, (*xfonts)->descent);
385#define LOADFONT(fld) (GetFont(&scr->fld##Font))
406 if(
Scr->FirstWindow ==
t) {
412 t->prev->next =
t->next;
415 t->next->prev =
t->prev;
419 t->next =
Scr->FirstWindow;
421 Scr->FirstWindow->prev =
t;
424 Scr->FirstWindow =
t;
450 t->prev->next =
t->next;
453 t->next->prev =
t->prev;
543 twm_win = twm_win->
next;
int frame_x
X position on screen of frame.
int frame_y
Y position on screen of frame.
int frame_bw
2d border width.
unsigned int frame_width
Width of frame.
unsigned int frame_height
Height of frame.
Info and control for each X Screen we control.
bool HaveFonts
Whether fonts have been loaded yet in the startup process.
Information about some XStandardColormap we're using.
Info and control for every X Window we take over.
struct TwmWindow * next
Next TwmWindow on the Screen.
struct Icon * icon
The current icon.
struct VirtualScreen * vs
Where the window is currently mapped (may be NULL)
void safe_strncpy(char *dest, const char *src, size_t size)
void GetColor(int kind, Pixel *what, const char *name)
Get info from the server about a given color.
char * ExpandFilename(const char *name)
bool UpdateFont(MyFont *font, int height)
Try adjusting a font's height.
void GetShadeColors(ColorPair *cp)
Try and create a 'shaded' version of a color for prettier UI.
void RescueWindows(void)
Backend for f.rescuewindows.
static void GetFont(MyFont *font)
Load up fontsets from the X server.
char * ExpandFilePath(char *path)
void DebugTrace(char *file)
Backend for f.trace.
void CreateFonts(ScreenInfo *scr)
Load up our various defined fonts.
void SetupWindow(TwmWindow *tmp_win, int x, int y, int w, int h, int bw)