aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winsetsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winsetsp.c')
-rwxr-xr-x[-rw-r--r--]xorg-server/hw/xwin/winsetsp.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/xorg-server/hw/xwin/winsetsp.c b/xorg-server/hw/xwin/winsetsp.c
index f102f9ff5..001e50e11 100644..100755
--- a/xorg-server/hw/xwin/winsetsp.c
+++ b/xorg-server/hw/xwin/winsetsp.c
@@ -34,6 +34,11 @@
#endif
#include "win.h"
+typedef struct mybitmap
+{
+ BITMAPINFOHEADER bmiHeader;
+ RGBQUAD bmiColors[256]; /* Maximum palette used in case of 8-bit per pixel */
+} mybitmap_t;
/* See Porting Layer Definition - p. 55 */
void
winSetSpansNativeGDI(DrawablePtr pDrawable,
@@ -46,7 +51,7 @@ winSetSpansNativeGDI(DrawablePtr pDrawable,
PixmapPtr pPixmap = NULL;
winPrivPixmapPtr pPixmapPriv = NULL;
HBITMAP hbmpOrig = NULL;
- BITMAPINFO bmi;
+ mybitmap_t bmi;
HRGN hrgn = NULL, combined = NULL;
int nbox;
BoxPtr pbox;
@@ -86,7 +91,7 @@ winSetSpansNativeGDI(DrawablePtr pDrawable,
"failed on pPixmapPriv->hBitmap\n");
while (iSpans--) {
- ZeroMemory(&bmi, sizeof(BITMAPINFO));
+ ZeroMemory (&bmi, sizeof (mybitmap_t));
bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bmi.bmiHeader.biWidth = *piWidths;
bmi.bmiHeader.biHeight = 1;
@@ -129,7 +134,7 @@ winSetSpansNativeGDI(DrawablePtr pDrawable,
combined = NULL;
while (iSpans--) {
- ZeroMemory(&bmi, sizeof(BITMAPINFO));
+ ZeroMemory (&bmi, sizeof (mybitmap_t));
bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bmi.bmiHeader.biWidth = *piWidths;
bmi.bmiHeader.biHeight = 1;