62 |
#define PROP_MOTIF_WM_HINTS_ELEMENTS 5 |
#define PROP_MOTIF_WM_HINTS_ELEMENTS 5 |
63 |
typedef struct |
typedef struct |
64 |
{ |
{ |
65 |
unsigned long flags; |
uint32 flags; |
66 |
unsigned long functions; |
uint32 functions; |
67 |
unsigned long decorations; |
uint32 decorations; |
68 |
long inputMode; |
sint32 inputMode; |
69 |
unsigned long status; |
uint32 status; |
70 |
} |
} |
71 |
PropMotifWmHints; |
PropMotifWmHints; |
72 |
|
|
128 |
hintsatom = XInternAtom(display, "_MOTIF_WM_HINTS", False); |
hintsatom = XInternAtom(display, "_MOTIF_WM_HINTS", False); |
129 |
if (!hintsatom) |
if (!hintsatom) |
130 |
{ |
{ |
131 |
error("Failed to get atom _MOTIF_WM_HINTS\n"); |
warning("Failed to get atom _MOTIF_WM_HINTS: probably your window manager does not support MWM hints\n"); |
132 |
return; |
return; |
133 |
} |
} |
134 |
|
|
300 |
{ |
{ |
301 |
xcolmap = DefaultColormapOfScreen(screen); |
xcolmap = DefaultColormapOfScreen(screen); |
302 |
if (depth <= 8) |
if (depth <= 8) |
303 |
{ |
warning("Screen depth is 8 bits or lower: you may want to use -C for a private colourmap\n"); |
|
printf("You're using a screen depth of 8-bits or lower\n"); |
|
|
printf("If you get scewed colours, try the -C switch\n"); |
|
|
} |
|
304 |
} |
} |
305 |
|
|
306 |
gc = XCreateGC(display, RootWindowOfScreen(screen), 0, NULL); |
gc = XCreateGC(display, RootWindowOfScreen(screen), 0, NULL); |
315 |
if ((width == 0) || (height == 0)) |
if ((width == 0) || (height == 0)) |
316 |
{ |
{ |
317 |
/* Fetch geometry from _NET_WORKAREA */ |
/* Fetch geometry from _NET_WORKAREA */ |
318 |
uint32 xpos, ypos; |
uint32 x, y, cx, cy; |
319 |
|
|
320 |
if (get_current_workarea(&xpos, &ypos, &width, &height) < 0) |
if (get_current_workarea(&x, &y, &cx, &cy) == 0) |
321 |
|
{ |
322 |
|
width = cx; |
323 |
|
height = cy; |
324 |
|
} |
325 |
|
else |
326 |
{ |
{ |
327 |
error("Failed to get workarea.\n"); |
warning("Failed to get workarea: probably your window manager does not support extended hints\n"); |
|
error("Perhaps your window manager does not support EWMH?\n"); |
|
|
error("Defaulting to geometry 800x600\n"); |
|
328 |
width = 800; |
width = 800; |
329 |
height = 600; |
height = 600; |
330 |
} |
} |
1221 |
}\ |
}\ |
1222 |
if (glyph != NULL)\ |
if (glyph != NULL)\ |
1223 |
{\ |
{\ |
1224 |
ui_draw_glyph (mixmode, x + (short) glyph->offset,\ |
ui_draw_glyph (mixmode, x + glyph->offset,\ |
1225 |
y + (short) glyph->baseline,\ |
y + glyph->baseline,\ |
1226 |
glyph->width, glyph->height,\ |
glyph->width, glyph->height,\ |
1227 |
glyph->pixmap, 0, 0, bgcolour, fgcolour);\ |
glyph->pixmap, 0, 0, bgcolour, fgcolour);\ |
1228 |
if (flags & TEXT2_IMPLICIT_X)\ |
if (flags & TEXT2_IMPLICIT_X)\ |