Skip to content

WIP: [hildon-ui] Rotate display and touchscreen coordinates

Daniele Debernardi requested to merge feature/rotate-hildon-ui into master

Unfortunately, this merge request was not correctly imported from GitHub:

Something went wrong while fetching comments. Please try again.

@drebrez or anyone else: if you have updated the code for another review, please open up a new merge request. Sorry for the trouble.


This adds an X11 configuration file (x11-fbdev-rotate.conf) to rotate the display by 90° degrees clockwise.

In order to rotate the touchscreen, in the xinitrc_hildon.sh script, it gets the deviceinfo_dev_touchscreen variable from the /etc/deviceinfo file and perform a query with udevadm in order to find out the corresponding name of the touchscreen device. With the touchscreen device name it calls xinit to set the Coordinate Transformation Matrix in order to rotate the touch. This part works but is a bit fragile and needs to be tested on various devices. An alternative solution would be to find a way to set the coordinate transformation matrix using the /dev/input/eventX directly (with udev rule is possible).

TODO:

  • handle devices that doesn't need rotation (based on deviceinfo_screen_width/deviceinfo_screen_height variables in deviceinfo)
  • during runtime or package installation?
  • retrieve touchscreen device name from the /sys/class/input/eventX/device/name file (replacing /dev with /sys/class/ in deviceinfo_dev_touchscreen variable

Closes #819 (moved)

Edited by Oliver Smith

Merge request reports