Skip to content

option-parser/desktop-shell: Change the way we parse args

The debug extension enables the debug protocol which gives the possibility to deduce, indirectly, if the debug extension was enabled over the command line.

Patch has been modified to pass args options to shell directly rather than amending the function that enables debug keybindings. We can't re-use the same argument as parse_option() will consume if it finds in the core_options array. So, there are a few of options:

  • keep a copy of arguments (we already copy the entire command line) and pass those copies for shells to consumes
  • use something similar to that backends do, and use a weston_shell_config to pass arguments to shells as a config, and presumably make it more generic so that both shells and backend use it.
  • amend parse_options() not to modify argv at all
  • add a weston_option field to let parse_option() not modify that particular argv entry, but still being able to assign/use it.

For the time being decide to go with the last option. Most likely this also need an ABI bump.

Edited by Marius Vlad

Merge request reports