Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Range of accepted screen values does not match #571

Open
wysiwys opened this issue Dec 22, 2024 · 1 comment
Open

Range of accepted screen values does not match #571

wysiwys opened this issue Dec 22, 2024 · 1 comment
Labels
needs info X11 legacy: compatibility Indicate a need to ensure compatibility with X11

Comments

@wysiwys
Copy link
Contributor

wysiwys commented Dec 22, 2024

In src/keymap.h, the type of the screen member in the xkb_switch_screen_action struct is int8_t. This also matches the type specified in the X Keyboard Extension Protocol Specification for SA_SwitchScreen. However, during the validation step in src/xkbcomp/action.c, in the function HandleSwitchScreen(), all values in the range [-255, +255] are accepted.

Should the validation step instead check that the value is in [-128, +127], in order to fit inside the range of int8_t?

@wismill wismill added X11 legacy: compatibility Indicate a need to ensure compatibility with X11 needs info labels Dec 28, 2024
@wismill
Copy link
Member

wismill commented Dec 28, 2024

I would say the range should be -128..+127 indeed, but we parse as X11 xkbcomp does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs info X11 legacy: compatibility Indicate a need to ensure compatibility with X11
Projects
None yet
Development

No branches or pull requests

2 participants