Add --query#5
Conversation
| // This space intentionally left blank | ||
| } | ||
|
|
||
| if (!changed || query) { |
There was a problem hiding this comment.
Thanks for the patch! Is there a reason why this has been moved after the loop?
| } else if (strcmp(name, "dryrun") == 0) { | ||
| dry_run = true; | ||
| } else if (strcmp(name, "query") == 0) { | ||
| query = true; |
|
Thank you for the review and sorry for the style messup. Reason for putting
Further, the loop is now encapsulated into the apply_state branch. Otherwise the code loops infinitely, due to |
Does xrandr have this behaviour?
It's possible to just reset
I believe this breaks invoking wlr-randr without making any changes. The loop needs to run for wlr-randr to retrieve the current output data. |
|
Thank you again for your review.
According to its manual it shows the current state of the system. A quick skim over its code base seems to show that the state after change is printed. It also shows that the code, if changes are successfully applied, exits before showing the current state. In my eyes this contradicts with the statement from the manual
as it is not mentioned that the option will be ignored whenever a configuration change is done. Eventually this means that we can either (1) stick to the way xrandr is doing it, thus ignoring the Personally I do not like option (1) as calling wlr-randr with or without
Running the code with gdb has shown me that the current state is retrieved upon the call to |
Yeah, agreed. |
|
So the current patch does option (2) right? We'd probably need to move the |
Fixes issue #4.