69 |
#ifdef WITH_RDPSND |
#ifdef WITH_RDPSND |
70 |
extern int g_dsp_fd; |
extern int g_dsp_fd; |
71 |
extern BOOL g_dsp_busy; |
extern BOOL g_dsp_busy; |
72 |
|
extern BOOL g_rdpsnd; |
73 |
#endif |
#endif |
74 |
|
|
75 |
/* MWM decorations */ |
/* MWM decorations */ |
334 |
|
|
335 |
if (g_host_be) |
if (g_host_be) |
336 |
{ |
{ |
337 |
BSWAP16(pixel) |
BSWAP16(pixel)} |
|
} |
|
338 |
|
|
339 |
value = make_colour16(split_colour15(pixel)); |
value = make_colour16(split_colour15(pixel)); |
340 |
|
|
363 |
|
|
364 |
if (g_host_be) |
if (g_host_be) |
365 |
{ |
{ |
366 |
BSWAP16(pixel) |
BSWAP16(pixel)} |
|
} |
|
367 |
|
|
368 |
value = make_colour24(split_colour15(pixel)); |
value = make_colour24(split_colour15(pixel)); |
369 |
if (g_xserver_be) |
if (g_xserver_be) |
456 |
|
|
457 |
if (g_host_be) |
if (g_host_be) |
458 |
{ |
{ |
459 |
BSWAP16(pixel) |
BSWAP16(pixel)} |
|
} |
|
460 |
|
|
461 |
value = make_colour24(split_colour16(pixel)); |
value = make_colour24(split_colour16(pixel)); |
462 |
|
|
487 |
|
|
488 |
if (g_host_be) |
if (g_host_be) |
489 |
{ |
{ |
490 |
BSWAP16(pixel) |
BSWAP16(pixel)} |
|
} |
|
491 |
|
|
492 |
value = make_colour32(split_colour16(pixel)); |
value = make_colour32(split_colour16(pixel)); |
493 |
|
|
497 |
*(out++) = value >> 16; |
*(out++) = value >> 16; |
498 |
*(out++) = value >> 8; |
*(out++) = value >> 8; |
499 |
*(out++) = value; |
*(out++) = value; |
500 |
} |
} |
501 |
else |
else |
502 |
{ |
{ |
503 |
*(out++) = value; |
*(out++) = value; |
504 |
*(out++) = value >> 8; |
*(out++) = value >> 8; |
505 |
*(out++) = value >> 16; |
*(out++) = value >> 16; |
506 |
*(out++) = value >> 24; |
*(out++) = value >> 24; |
507 |
} |
} |
508 |
} |
} |
509 |
} |
} |
510 |
|
|
511 |
static void |
static void |
720 |
g_host_be = !(BOOL) (*(uint8 *) (&test)); |
g_host_be = !(BOOL) (*(uint8 *) (&test)); |
721 |
g_xserver_be = (ImageByteOrder(g_display) == MSBFirst); |
g_xserver_be = (ImageByteOrder(g_display) == MSBFirst); |
722 |
|
|
723 |
if ((g_width == 0) || (g_height == 0)) |
/* |
724 |
|
* Determine desktop size |
725 |
|
*/ |
726 |
|
if (g_width < 0) |
727 |
|
{ |
728 |
|
/* Percent of screen */ |
729 |
|
g_height = HeightOfScreen(g_screen) * (-g_width) / 100; |
730 |
|
g_width = WidthOfScreen(g_screen) * (-g_width) / 100; |
731 |
|
} |
732 |
|
else if (g_width == 0) |
733 |
{ |
{ |
734 |
/* Fetch geometry from _NET_WORKAREA */ |
/* Fetch geometry from _NET_WORKAREA */ |
735 |
uint32 x, y, cx, cy; |
uint32 x, y, cx, cy; |
746 |
g_height = 600; |
g_height = 600; |
747 |
} |
} |
748 |
} |
} |
749 |
|
else if (g_fullscreen) |
|
if (g_fullscreen) |
|
750 |
{ |
{ |
751 |
g_width = WidthOfScreen(g_screen); |
g_width = WidthOfScreen(g_screen); |
752 |
g_height = HeightOfScreen(g_screen); |
g_height = HeightOfScreen(g_screen); |
768 |
|
|
769 |
g_mod_map = XGetModifierMapping(g_display); |
g_mod_map = XGetModifierMapping(g_display); |
770 |
|
|
771 |
|
xkeymap_init(); |
772 |
|
|
773 |
if (g_enable_compose) |
if (g_enable_compose) |
774 |
g_IM = XOpenIM(g_display, NULL, NULL, NULL); |
g_IM = XOpenIM(g_display, NULL, NULL, NULL); |
775 |
|
|
|
xkeymap_init(); |
|
776 |
xclip_init(); |
xclip_init(); |
777 |
|
|
778 |
/* todo take this out when high colour is done */ |
/* todo take this out when high colour is done */ |
1208 |
{ |
{ |
1209 |
FD_SET(g_dsp_fd, &wfds); |
FD_SET(g_dsp_fd, &wfds); |
1210 |
n = (g_dsp_fd + 1 > n) ? g_dsp_fd + 1 : n; |
n = (g_dsp_fd + 1 > n) ? g_dsp_fd + 1 : n; |
1211 |
} |
} |
1212 |
#endif |
#endif |
1213 |
|
|
1214 |
switch (select(n, &rfds, &wfds, NULL, NULL)) |
switch (select(n, &rfds, &wfds, NULL, NULL)) |
1602 |
case 2: /* Hatch */ |
case 2: /* Hatch */ |
1603 |
fill = (Pixmap) ui_create_glyph(8, 8, |
fill = (Pixmap) ui_create_glyph(8, 8, |
1604 |
hatch_patterns + brush->pattern[0] * 8); |
hatch_patterns + brush->pattern[0] * 8); |
1605 |
SET_FOREGROUND(bgcolour); |
SET_FOREGROUND(fgcolour); |
1606 |
SET_BACKGROUND(fgcolour); |
SET_BACKGROUND(bgcolour); |
1607 |
XSetFillStyle(g_display, g_gc, FillOpaqueStippled); |
XSetFillStyle(g_display, g_gc, FillOpaqueStippled); |
1608 |
XSetStipple(g_display, g_gc, fill); |
XSetStipple(g_display, g_gc, fill); |
1609 |
XSetTSOrigin(g_display, g_gc, brush->xorigin, brush->yorigin); |
XSetTSOrigin(g_display, g_gc, brush->xorigin, brush->yorigin); |