1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

Misc bug fixes

This commit is contained in:
dan
2000-01-17 03:07:18 +00:00
parent 23c0cda243
commit 14939535b6
3 changed files with 22 additions and 13 deletions

View File

@@ -2160,7 +2160,7 @@ wheelRender(W_ColorPanel *panel)
unsigned long ofs = 0; unsigned long ofs = 0;
unsigned char shift = getShift(sizeof(unsigned char)); unsigned char shift = getShift(sizeof(unsigned char));
image = RCreateImage(colorWheelSize+4, colorWheelSize+4, False); image = RCreateImage(colorWheelSize+4, colorWheelSize+4, True);
if (!image) { if (!image) {
wwarning(NO_MEMORY_ERR); wwarning(NO_MEMORY_ERR);
return; return;
@@ -2180,11 +2180,13 @@ wheelRender(W_ColorPanel *panel)
panel->wheelMtrx->data[1][ofs] ]); panel->wheelMtrx->data[1][ofs] ]);
*(ptr++) = (unsigned char)(panel->wheelMtrx->values[ *(ptr++) = (unsigned char)(panel->wheelMtrx->values[
panel->wheelMtrx->data[2][ofs] ]); panel->wheelMtrx->data[2][ofs] ]);
*(ptr++) = 0;
} }
else { else {
*(ptr++) = (unsigned char)(gray.red); *(ptr++) = (unsigned char)(gray.red);
*(ptr++) = (unsigned char)(gray.green); *(ptr++) = (unsigned char)(gray.green);
*(ptr++) = (unsigned char)(gray.blue); *(ptr++) = (unsigned char)(gray.blue);
*(ptr++) = 255;
} }
ofs++; ofs++;
} }
@@ -3003,8 +3005,8 @@ customPalettePositionSelection(W_ColorPanel *panel, int x, int y)
panel->palx = x; panel->palx = x;
panel->paly = y; panel->paly = y;
ofs = rint(x * panel->palXRatio) + rint(y * panel->palYRatio) * ofs = (rint(x * panel->palXRatio) + rint(y * panel->palYRatio) *
panel->customPaletteImg->width * 3; panel->customPaletteImg->width) * 3;
panel->color.rgb.red = panel->customPaletteImg->data[ofs]; panel->color.rgb.red = panel->customPaletteImg->data[ofs];
panel->color.rgb.green = panel->customPaletteImg->data[ofs+1]; panel->color.rgb.green = panel->customPaletteImg->data[ofs+1];

View File

@@ -37,8 +37,14 @@ wSoundServerGrab(Window wm_win)
} }
XGetClassHint (dpy, lstChildren[indexCount], retHint); XGetClassHint (dpy, lstChildren[indexCount], retHint);
if (retHint->res_class) { if (retHint->res_class) {
if (strcmp("WMSoundServer", retHint->res_class) == 0) { if (strcmp("WMSoundServer", retHint->res_class)==0 ||
/*strcmp("WSoundServer", retHint->res_class)==0 ||*/
(retHint->res_name &&
strcmp("wsoundserver", retHint->res_name)==0 &&
strcmp("DockApp", retHint->res_class)==0)) {
soundServer = lstChildren[indexCount]; soundServer = lstChildren[indexCount];
XFree(lstChildren); XFree(lstChildren);
if(retHint) { if(retHint) {

View File

@@ -3,6 +3,7 @@
* Raster graphics library * Raster graphics library
* *
* Copyright (c) 1997-2000 Alfredo K. Kojima * Copyright (c) 1997-2000 Alfredo K. Kojima
* Copyright (c) 1998-2000 Dan Pascu
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public * modify it under the terms of the GNU Library General Public
@@ -249,7 +250,7 @@ renderDGradient(unsigned width, unsigned height, int r0, int g0, int b0,
return NULL; return NULL;
} }
a = (((width - 1)<<16) / ((height - 1)<<16)) * 3; a = (((width - 1)<<16) / (height - 1)) * 3;
width *= 3; width *= 3;
/* copy the first line to the other lines with corresponding offset */ /* copy the first line to the other lines with corresponding offset */