-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix: setWindowState when target_space is empty #2
base: development
Are you sure you want to change the base?
Conversation
shailesh17
commented
Nov 3, 2024
- Fix crash when target space is empty during setting of window state
- also adding default excludes for vscode editor in .gitignore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @shailesh17, thanks for the support! Good bug-catch! I added a minor modification suggestion to your request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the re-review; I have checked everything properly now. Once you implement the comments I will merge!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @shailesh17, thanks again for the support;
unfortunately testing the code after your changes leads to a bit of a bug, so another modification is needed
rs.delayExecution(0.4) | ||
window:moveToScreen(target_screen) | ||
window:focus() | ||
rs.issueVerbose("target space undefined; unable to set window " .. window:id(), rs.verbose) | ||
end | ||
|
||
rs.setFrameState(window, frame_state, fullscreen_state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this does not comply with the modifications...
both setFrameState
and issueVerbose("set window"...)
should only be called if target_space
was identified, so they should be moved into the if statement (or maybe using a return
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you're at it, can you also try to change the "target space undefined..." line to keep it under 72 characters?
In this code I have been using something like the following:
local msg = "target space undefined; "
msg = msg .. "unable to set window "
rs.issueVerbose(msg .. window:id(), rs.verbose)