"Abs MT Pressure\0"
"Abs MT Tracking ID\0"
"Max Contacts\0"
+#if XCB_USE_MAEMO_WINDOW_PROPERTIES
+ "_MEEGOTOUCH_ORIENTATION_ANGLE\0"
+#endif
};
xcb_atom_t QXcbConnection::atom(QXcbAtom::Atom atom)
AbsMTTrackingID,
MaxContacts,
+#if XCB_USE_MAEMO_WINDOW_PROPERTIES
+ MeegoTouchOrientationAngle,
+#endif
+
NPredefinedAtoms,
_QT_SETTINGS_TIMESTAMP = NPredefinedAtoms,
connection()->sync();
}
+#if XCB_USE_MAEMO_WINDOW_PROPERTIES
+void QXcbWindow::setOrientation(Qt::ScreenOrientation orientation)
+{
+ int angle = 0;
+ switch (orientation) {
+ case Qt::PortraitOrientation: angle = 270; break;
+ case Qt::LandscapeOrientation: angle = 0; break;
+ case Qt::InvertedPortraitOrientation: angle = 90; break;
+ case Qt::InvertedLandscapeOrientation: angle = 180; break;
+ case Qt::UnknownOrientation: break;
+ }
+ Q_XCB_CALL(xcb_change_property(xcb_connection(), XCB_PROP_MODE_REPLACE, m_window,
+ atom(QXcbAtom::MeegoTouchOrientationAngle), XCB_ATOM_CARDINAL, 32,
+ 1, &angle));
+}
+#endif
+
QSurfaceFormat QXcbWindow::format() const
{
// ### return actual format
void requestActivateWindow();
+#if XCB_USE_MAEMO_WINDOW_PROPERTIES
+ void setOrientation(Qt::ScreenOrientation orientation);
+#endif
+
bool setKeyboardGrabEnabled(bool grab);
bool setMouseGrabEnabled(bool grab);
DEFINES += XCB_USE_XLIB
LIBS += -lX11 -lX11-xcb
- linux-g++-maemo:contains(QT_CONFIG, xinput2) {
- # XInput2 support for Harmattan.
- DEFINES += XCB_USE_XINPUT2_MAEMO
- SOURCES += qxcbconnection_maemo.cpp
- LIBS += -lXi
+ linux-g++-maemo {
+ contains(QT_CONFIG, xinput2) {
+ # XInput2 support for Harmattan.
+ DEFINES += XCB_USE_XINPUT2_MAEMO
+ SOURCES += qxcbconnection_maemo.cpp
+ LIBS += -lXi
+ }
+ DEFINES += XCB_USE_MAEMO_WINDOW_PROPERTIES
}
}