Merge lp:~veger/lightdm/lp-1197999 into lp:lightdm
Proposed by
Maarten Bezemer
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Robert Ancell | ||||
Approved revision: | 1867 | ||||
Merged at revision: | 1868 | ||||
Proposed branch: | lp:~veger/lightdm/lp-1197999 | ||||
Merge into: | lp:lightdm | ||||
Diff against target: |
80 lines (+40/-9) 1 file modified
src/dm-tool.c (+40/-9) |
||||
To merge this branch: | bzr merge lp:~veger/lightdm/lp-1197999 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Approve | |
Robert Ancell | Approve | ||
Review via email: mp+200481@code.launchpad.net |
Description of the change
Hereby the modifications to add the --screen and --fullscreen options to the dm-tools command
To post a comment you must log in.
Hi Maarten,
Thanks for this patch.
Could you make some simple changes to it:
1. Instead of the if (n_options == 1), could you iterate over the remaining options so there's no code duplication? i.e.
for (i = 0; i < n_options; i++)
{
if (strcmp (options[i], "--fullscreen") == 0)
...
else if (strcmp (options[i], "--screen") == 0)
...
else
... // show warning and exit
}
2. Could you use a string or enum to avoid the magic numbers for screen_mode
i.e. you could use:
if (dimensions == NULL)
... // Use Xephyr
else if (strcmp (dimensions, "fullscreen") == 0)
... // Use Xephyr -fullscreen
else
... // Use Xephyr -screen DIMENSIONS