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

GetDeskNumber fix, cleanup, and drop support for negative desks. #1124

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

somiaj
Copy link
Collaborator

@somiaj somiaj commented Nov 29, 2024

The function GetDeskNumber would not properly wrap more than once. For instance the command GotoDesk 3 0 0 should return a desk between the minimum desk 0 and the maximum desk 0, but instead this would move the desk 2 from the current desk, because the wrapping code would only ever occur once.

In fixing the issue, this also cleans up the logic in the GetDeskNumber function by better handling all the if cases and use the modulus function to do the wrapping.

Last, support for negative desks is dropped, since it is not part of the EWMH spec.

The function GetDeskNumber would not properly wrap more than once.
For instance the command `GotoDesk 3 0 0` should return a desk between
the minimum desk 0 and the maximum desk 0, but instead this would move
the desk `2` from the current desk, because the wrapping code would
only ever occur once.

In fixing the issue, this also cleans up the logic in the
GetDeskNumber function by better handling all the if cases
and use the modulus function to do the wrapping.

Last, support for negative desks is dropped, since it is not
part of the EWMH spec.
@ThomasAdam ThomasAdam added the type:bug Something's broken! label Nov 29, 2024
@ThomasAdam ThomasAdam self-assigned this Nov 29, 2024
@ThomasAdam ThomasAdam added this to the 1.1.1 milestone Nov 29, 2024
@ThomasAdam ThomasAdam merged commit 3f39eb3 into main Nov 29, 2024
12 checks passed
@ThomasAdam ThomasAdam deleted the js/gotodesk-args branch November 29, 2024 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something's broken!
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants