summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvas.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkCanvas.c')
-rw-r--r--generic/tkCanvas.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c
index 5322466..c3e8a7f 100644
--- a/generic/tkCanvas.c
+++ b/generic/tkCanvas.c
@@ -988,7 +988,7 @@ CanvasWidgetCmd(
if (objc == 5) {
int append = 0;
- unsigned long mask;
+ unsigned int mask;
const char *argv4 = Tcl_GetString(objv[4]);
if (argv4[0] == 0) {
@@ -1036,7 +1036,7 @@ CanvasWidgetCmd(
result = TCL_ERROR;
goto done;
}
- if (mask & ~(unsigned long)(ButtonMotionMask|Button1MotionMask
+ if (mask & ~(ButtonMotionMask|Button1MotionMask
|Button2MotionMask|Button3MotionMask|Button4MotionMask
|Button5MotionMask|ButtonPressMask|ButtonReleaseMask
|EnterWindowMask|LeaveWindowMask|KeyPressMask
@@ -2503,7 +2503,7 @@ CanvasWorldChanged(
*/
static void
DecomposeMaskToShiftAndBits(
- unsigned long mask, /* The pixel mask to examine */
+ unsigned int mask, /* The pixel mask to examine */
int *shift, /* Where to put the shift count (position of lowest bit) */
int *bits) /* Where to put the bit count (width of the pixel mask) */
{
@@ -2849,7 +2849,7 @@ DrawCanvas(
#endif
for(x = 0; x < blockPtr.width; ++x) {
- unsigned long pixel = 0;
+ unsigned int pixel = 0;
switch (ximagePtr->bits_per_pixel) {
@@ -2881,7 +2881,7 @@ DrawCanvas(
*/
case 32 :
- pixel = *((unsigned long *)(ximagePtr->data + bytesPerPixel * x
+ pixel = *((unsigned int *)(ximagePtr->data + bytesPerPixel * x
+ ximagePtr->bytes_per_line * y));
if ((IS_BIG_ENDIAN && ximagePtr->byte_order == LSBFirst)
|| (!IS_BIG_ENDIAN && ximagePtr->byte_order == MSBFirst))
@@ -5178,7 +5178,7 @@ PickCurrentItem(
* ButtonRelease, or MotionNotify. */
{
double coords[2];
- unsigned long buttonDown;
+ unsigned int buttonDown;
Tk_Item *prevItemPtr;
SearchUids *searchUids = GetStaticUids();