Draft: Prepare rectangular region selector for layer-shell

Vlad Zahorodnii requested to merge work/zzag/graphics-scene into master

Currently, the rectangular region selector creates an overlay window that covers all outputs. While this sort of works on X11 (it's still broken with hidpi scaling), this doesn't work with the layer-shell protocol on wayland, which spectacle will have to use at some point in the future.

This change prepares spectacle for the layer-shell protocol by making it create a view per monitor.

QGraphicsScene/QGraphicsView was chosen because it allows to simplify multi-screen handling. For example, it takes care of forwarding events from the view to the scene, etc. It also takes care of tracking the damaged region, which significantly improves the performance of the rectangular region selector on multi-monitor setups with 4K monitors. Currently, spectacle repaints the entire overlay window on every frame, which negatively impacts performance.

Draft: It's basically a rewrite of the quick editor. The magnifier is currently missing, it will be implemented before marking the mr ready for review.

Merge request reports