-
Notifications
You must be signed in to change notification settings - Fork 52
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 gnome_randr_cycle not working under Wayland (LP:#2036172)(BugFix) #855
Conversation
* Change the position of current_modes to earlier. * Compare rate and existing_rate with float instead of string.
Would you please help to review my fix? thank you :) |
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.
@hugh712 thanks for this patch!
It seems your modifications are not passing the flake8 tests. From the tox run:
FAIL: test_flake8_/home/runner/work/checkbox/checkbox/providers/base/bin/gnome_randr_cycle.py (plainbox.provider_manager.Flake8Tests)
I added a few comments inline.
Also, did you check for regression? Have you tested your fix on X11? On 20.04?
Thanks for the review :) For the question
As I know, this gnome_randr_cycle was designed for wayland, and xrandr_cycle.py for X11, |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #855 +/- ##
==========================================
- Coverage 35.69% 35.69% -0.01%
==========================================
Files 303 303
Lines 34250 34251 +1
Branches 5917 5917
==========================================
Hits 12226 12226
- Misses 21459 21460 +1
Partials 565 565
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thanks for the changes!
However, currently Given that this script is a bit long and written in a very "imperative programming" style (I mean no functions, no classes, just running it line by line), it's gonna be difficult to test. I recommend you split the different parts into functions that should be easier to write unit tests for. Reach out if you need help! |
@hugh712 Hey! Did you have time to look into this to add some unit tests for your script? There are a few sections in the contrib guide that may help you: |
Hi Pierre, |
This PR awaits the author to have some time to work on it, and there's still some missing bits, so I'm switching the state to "Draft" |
Closing this as we completely changed how we set the resolution, fetch resolution but most importantly, it is basically inactive. Feel free to re-open it |
Description
Resolved issues
Currently runs 'gnome_randr_cycle.py' it will just directly finish without toggling any resolution, because some code glitch, after my change, it will work as expected.
Tests
I run code as below on my 22.04 laptop :
It will