int mx = MIN(MAX(0, gfx.mouse_x), WIN_XSIZE - 1);
int my = MIN(MAX(0, gfx.mouse_y), WIN_YSIZE - 1);
- viewport_x = mx + part->control_info.x;
- viewport_y = my + part->control_info.y;
+ viewport_x = mx - part->control_info.x;
+ viewport_y = my - part->control_info.y;
viewport_width = part->graphic_info.width;
viewport_height = part->graphic_info.height;
part->viewport_width = viewport_width;
part->viewport_height = viewport_height;
- changed = TRUE;
+ if (part->control_info.class != get_hash_from_key("pointer"))
+ changed = TRUE;
}
return changed;