elementary / switchboard-plug-display

Switchboard Displays Plug
https://elementary.io
GNU General Public License v3.0
14 stars 18 forks source link

Use SensorProxy to detect accelerometer #284

Closed davidmhewitt closed 3 years ago

davidmhewitt commented 3 years ago

Fixes #116

Instead of assuming that a touchscreen implies an accelerometer, use SensorProxy to ask if there is an accelerometer.

This is the bus that Mutter watches for rotation changes, so if we use this, we're guaranteed to show the switch if auto-rotation is supported.

I don't have a snazzy auto rotating laptop though, so can someone that does check that the switch still appears for them? :smile:

cassidyjames commented 3 years ago

I know @danrabbit has a convertible Lenovo Yoga

danirabbit commented 3 years ago

I can confirm that indeed the switch does show here!

@cassidyjames can you confirm that you don't get the switch on your XPS?

cassidyjames commented 3 years ago

@danrabbit correct; the switch does not show on my Star LabTop (no touch nor accel) nor on my Dell Precision (touch but no accel).