45 |
Window g_wnd; |
Window g_wnd; |
46 |
extern uint32 g_embed_wnd; |
extern uint32 g_embed_wnd; |
47 |
BOOL g_enable_compose = False; |
BOOL g_enable_compose = False; |
48 |
|
BOOL g_Unobscured; /* used for screenblt */ |
49 |
static GC g_gc = NULL; |
static GC g_gc = NULL; |
50 |
static Visual *g_visual; |
static Visual *g_visual; |
51 |
static int g_depth; |
static int g_depth; |
252 |
uint16 value; |
uint16 value; |
253 |
|
|
254 |
if (g_arch_match) |
if (g_arch_match) |
255 |
REPEAT(*(((uint16*)out)++) = g_colmap[*(data++)];) |
REPEAT(*(((uint16 *) out)++) = g_colmap[*(data++)]; |
256 |
|
) |
257 |
else if (g_xserver_be) |
else if (g_xserver_be) |
258 |
{ |
{ |
259 |
while (out < end) |
while (out < end) |
308 |
uint32 value; |
uint32 value; |
309 |
|
|
310 |
if (g_arch_match) |
if (g_arch_match) |
311 |
REPEAT(*(((uint32*)out)++) = g_colmap[*(data++)];) |
REPEAT(*(((uint32 *) out)++) = g_colmap[*(data++)]; |
312 |
|
) |
313 |
else if (g_xserver_be) |
else if (g_xserver_be) |
314 |
{ |
{ |
315 |
while (out < end) |
while (out < end) |
1008 |
XMaskEvent(g_display, VisibilityChangeMask, &xevent); |
XMaskEvent(g_display, VisibilityChangeMask, &xevent); |
1009 |
} |
} |
1010 |
while (xevent.type != VisibilityNotify); |
while (xevent.type != VisibilityNotify); |
1011 |
|
g_Unobscured = xevent.xvisibility.state == VisibilityUnobscured; |
1012 |
|
|
1013 |
g_focused = False; |
g_focused = False; |
1014 |
g_mouse_in_wnd = False; |
g_mouse_in_wnd = False; |
1107 |
|
|
1108 |
switch (xevent.type) |
switch (xevent.type) |
1109 |
{ |
{ |
1110 |
|
case VisibilityNotify: |
1111 |
|
g_Unobscured = xevent.xvisibility.state == VisibilityUnobscured; |
1112 |
|
break; |
1113 |
case ClientMessage: |
case ClientMessage: |
1114 |
/* the window manager told us to quit */ |
/* the window manager told us to quit */ |
1115 |
if ((xevent.xclient.message_type == g_protocol_atom) |
if ((xevent.xclient.message_type == g_protocol_atom) |
1806 |
{ |
{ |
1807 |
case 0: /* Solid */ |
case 0: /* Solid */ |
1808 |
SET_FOREGROUND(fgcolour); |
SET_FOREGROUND(fgcolour); |
1809 |
FILL_RECTANGLE(x, y, cx, cy); |
FILL_RECTANGLE_BACKSTORE(x, y, cx, cy); |
1810 |
break; |
break; |
1811 |
|
|
1812 |
case 2: /* Hatch */ |
case 2: /* Hatch */ |
1817 |
XSetFillStyle(g_display, g_gc, FillOpaqueStippled); |
XSetFillStyle(g_display, g_gc, FillOpaqueStippled); |
1818 |
XSetStipple(g_display, g_gc, fill); |
XSetStipple(g_display, g_gc, fill); |
1819 |
XSetTSOrigin(g_display, g_gc, brush->xorigin, brush->yorigin); |
XSetTSOrigin(g_display, g_gc, brush->xorigin, brush->yorigin); |
1820 |
FILL_RECTANGLE(x, y, cx, cy); |
FILL_RECTANGLE_BACKSTORE(x, y, cx, cy); |
1821 |
XSetFillStyle(g_display, g_gc, FillSolid); |
XSetFillStyle(g_display, g_gc, FillSolid); |
1822 |
XSetTSOrigin(g_display, g_gc, 0, 0); |
XSetTSOrigin(g_display, g_gc, 0, 0); |
1823 |
ui_destroy_glyph((HGLYPH) fill); |
ui_destroy_glyph((HGLYPH) fill); |
1827 |
for (i = 0; i != 8; i++) |
for (i = 0; i != 8; i++) |
1828 |
ipattern[7 - i] = brush->pattern[i]; |
ipattern[7 - i] = brush->pattern[i]; |
1829 |
fill = (Pixmap) ui_create_glyph(8, 8, ipattern); |
fill = (Pixmap) ui_create_glyph(8, 8, ipattern); |
|
|
|
1830 |
SET_FOREGROUND(bgcolour); |
SET_FOREGROUND(bgcolour); |
1831 |
SET_BACKGROUND(fgcolour); |
SET_BACKGROUND(fgcolour); |
1832 |
XSetFillStyle(g_display, g_gc, FillOpaqueStippled); |
XSetFillStyle(g_display, g_gc, FillOpaqueStippled); |
1833 |
XSetStipple(g_display, g_gc, fill); |
XSetStipple(g_display, g_gc, fill); |
1834 |
XSetTSOrigin(g_display, g_gc, brush->xorigin, brush->yorigin); |
XSetTSOrigin(g_display, g_gc, brush->xorigin, brush->yorigin); |
1835 |
|
FILL_RECTANGLE_BACKSTORE(x, y, cx, cy); |
|
FILL_RECTANGLE(x, y, cx, cy); |
|
|
|
|
1836 |
XSetFillStyle(g_display, g_gc, FillSolid); |
XSetFillStyle(g_display, g_gc, FillSolid); |
1837 |
XSetTSOrigin(g_display, g_gc, 0, 0); |
XSetTSOrigin(g_display, g_gc, 0, 0); |
1838 |
ui_destroy_glyph((HGLYPH) fill); |
ui_destroy_glyph((HGLYPH) fill); |
1843 |
} |
} |
1844 |
|
|
1845 |
RESET_FUNCTION(opcode); |
RESET_FUNCTION(opcode); |
1846 |
|
|
1847 |
|
if (g_ownbackstore) |
1848 |
|
XCopyArea(g_display, g_backstore, g_wnd, g_gc, x, y, cx, cy, x, y); |
1849 |
} |
} |
1850 |
|
|
1851 |
void |
void |
1856 |
SET_FUNCTION(opcode); |
SET_FUNCTION(opcode); |
1857 |
if (g_ownbackstore) |
if (g_ownbackstore) |
1858 |
{ |
{ |
1859 |
XCopyArea(g_display, g_backstore, g_wnd, g_gc, srcx, srcy, cx, cy, x, y); |
if (g_Unobscured) |
1860 |
XCopyArea(g_display, g_backstore, g_backstore, g_gc, srcx, srcy, cx, cy, x, y); |
{ |
1861 |
|
XCopyArea(g_display, g_wnd, g_wnd, g_gc, srcx, srcy, cx, cy, x, y); |
1862 |
|
XCopyArea(g_display, g_backstore, g_backstore, g_gc, srcx, srcy, cx, cy, x, |
1863 |
|
y); |
1864 |
|
} |
1865 |
|
else |
1866 |
|
{ |
1867 |
|
XCopyArea(g_display, g_backstore, g_wnd, g_gc, srcx, srcy, cx, cy, x, y); |
1868 |
|
XCopyArea(g_display, g_backstore, g_backstore, g_gc, srcx, srcy, cx, cy, x, |
1869 |
|
y); |
1870 |
|
} |
1871 |
} |
} |
1872 |
else |
else |
1873 |
{ |
{ |