Skip to content

Windows tablets don't report pen events when relative mouse mode is enabled #12324

Open
@Susko3

Description

@Susko3

SDL has special logic to convert raw absolute mouse (i.e. tablet) input to relative mouse motion. This tablet pen input never generates SDL_PenMotionEvents.

} else {
const int MAXIMUM_TABLET_RELATIVE_MOTION = 32;
if (SDL_abs(relX) > MAXIMUM_TABLET_RELATIVE_MOTION ||
SDL_abs(relY) > MAXIMUM_TABLET_RELATIVE_MOTION) {
/* Ignore this motion, probably a pen lift and drop */
} else {
SDL_SendMouseMotion(timestamp, window, mouseID, true, (float)relX, (float)relY);
}
}

I would expect this pen to mouse logic to only fire when SDL_HINT_PEN_MOUSE_EVENTS is enabled. I would also expect to get the usual SDL_PenMotionEvent for this pen input.

This issue only affects tablet drivers that generate absolute mouse input. (Example: Wacom drivers with windows ink disabled, OpenTabletDriver, hawku Tablet Driver.) Tablet drivers that generate windows ink events work as expected via WM_POINTER & co. handling. When relative mouse mode is disabled, absolute tablet events are reported as absolute mouse input, which is not ideal, but is not really a problem as it's mapping absolute to absolute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions