Detect rotation directly via X or Wayland
Fixes #44 (closed)
This commit changes the way that screen rotation is detected. Instead of using Mutter's DBus interface, we now listen directly for X and Wayland events indicating the screen has been rotated (RRScreenChangeNotify and wl_output::geometry events). This has the advantage of working outside of Phosh.
Note that this does add a few new dependencies for megapixels:
- gtk4-wayland, gtk4-x11 (both included with gtk4)
- libwayland-client
- libx11
- libxrandr
Given that these are all dependencies of gtk4 already, I presume this isn't too much of an issue. However this probably means that package templates (i.e. aports) will need to be updated.
I've tested this on phosh, sxmo sway, and sxmo dwm, and everything seems to work as expected.