31 |
extern BOOL grab_keyboard; |
extern BOOL grab_keyboard; |
32 |
extern BOOL hide_decorations; |
extern BOOL hide_decorations; |
33 |
extern char title[]; |
extern char title[]; |
34 |
|
extern int server_bpp; |
35 |
BOOL enable_compose = False; |
BOOL enable_compose = False; |
36 |
BOOL focused; |
BOOL focused; |
37 |
BOOL mouse_in_wnd; |
BOOL mouse_in_wnd; |
89 |
static Colormap xcolmap; |
static Colormap xcolmap; |
90 |
static uint32 *colmap; |
static uint32 *colmap; |
91 |
|
|
92 |
#define TRANSLATE(col) ( owncolmap ? col : translate_colour(colmap[col]) ) |
#define TRANSLATE(col) ( server_bpp != 8 ? col : owncolmap ? col : translate_colour(colmap[col]) ) |
93 |
#define SET_FOREGROUND(col) XSetForeground(display, gc, TRANSLATE(col)); |
#define SET_FOREGROUND(col) XSetForeground(display, gc, TRANSLATE(col)); |
94 |
#define SET_BACKGROUND(col) XSetBackground(display, gc, TRANSLATE(col)); |
#define SET_BACKGROUND(col) XSetBackground(display, gc, TRANSLATE(col)); |
95 |
|
|
750 |
XImage *image; |
XImage *image; |
751 |
uint8 *tdata; |
uint8 *tdata; |
752 |
|
|
753 |
|
if (server_bpp == 16) |
754 |
|
{ |
755 |
|
image = XCreateImage(display, visual, depth, ZPixmap, 0, |
756 |
|
(char *) data, width, height, 16, 0); |
757 |
|
|
758 |
|
if (ownbackstore) |
759 |
|
{ |
760 |
|
XPutImage(display, backstore, gc, image, 0, 0, x, y, cx, cy); |
761 |
|
XCopyArea(display, backstore, wnd, gc, x, y, cx, cy, x, y); |
762 |
|
} |
763 |
|
else |
764 |
|
{ |
765 |
|
XPutImage(display, wnd, gc, image, 0, 0, x, y, cx, cy); |
766 |
|
} |
767 |
|
|
768 |
|
XFree(image); |
769 |
|
return; |
770 |
|
} |
771 |
tdata = (owncolmap ? data : translate_image(width, height, data)); |
tdata = (owncolmap ? data : translate_image(width, height, data)); |
772 |
image = XCreateImage(display, visual, depth, ZPixmap, 0, |
image = XCreateImage(display, visual, depth, ZPixmap, 0, |
773 |
(char *) tdata, width, height, 8, 0); |
(char *) tdata, width, height, 8, 0); |