Skip to content

A bunch of cleanups spun out from the tiling animation work

Guido Günther requested to merge guidog/phoc:cleanups into main

Mostly simplifying the code to make it easier to read.

* render: Move damage checking to a separate function
* render: Stay clear of wlr_ namespace

  We use `box` instead of `wlr_box` in function and method names elsewhere.
  This makes sure a function doesn't look like if it is coming from
  wlroots.

* output: Move phoc_output_scale_box to utils

  The output argument is unused. This makes it clearer that we don't care
  about any output rotation or scale in this function.

* output-shield: Use proper prefix
* utils: Document phoc_utils_compute_scale
* treewide: Use explicit cast for wlr_output->data

  This gives us some additional type checks.

* desktop: Make it simple to get the output at given layout coordinates
* cursor: Use phoc_desktop_layout_get_output

  This simplifies the back and forth between these. view's methods
  will soon switch to using PhocOutput rather than wlr_output as
  arguments which will further simplify this.

* desktop: Simplify phoc_desktop_surface_at

  wlr_output->data, phoc_output and output all refer to the same output.
  Just use output everywhere.

* view: Use phoc_desktop_layout_get_output

Merge request reports