WIP
This commit is contained in:
parent
852eb47e3f
commit
e6d0e6e6bb
|
|
@ -333,11 +333,6 @@ void CubeEffect::updateXrRotation() {
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
qCCritical(KWIN_XR) << "\t\t\tBreezy" << "version:" << version
|
|
||||||
<< " enabledFlag:" << enabledFlag
|
|
||||||
<< " currentTimeMs:" << currentTimeMs
|
|
||||||
<< " imuDateMs:" << imuDateMs;
|
|
||||||
|
|
||||||
|
|
||||||
// Check for reset state (identity quaternion)
|
// Check for reset state (identity quaternion)
|
||||||
const bool imuResetState = (imuData[0] == 0.0f && imuData[1] == 0.0f &&
|
const bool imuResetState = (imuData[0] == 0.0f && imuData[1] == 0.0f &&
|
||||||
|
|
@ -346,13 +341,11 @@ void CubeEffect::updateXrRotation() {
|
||||||
if (imuResetState) {
|
if (imuResetState) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
qCCritical(KWIN_XR) << "\t\t\tBreezy - here 5";
|
|
||||||
|
|
||||||
// Create quaternion (w, x, y, z)
|
// Create quaternion (w, x, y, z)
|
||||||
QQuaternion quat(imuData[3], imuData[0], imuData[1], imuData[2]);
|
QQuaternion quat(imuData[3], imuData[0], imuData[1], imuData[2]);
|
||||||
|
|
||||||
if (quat != m_xrRotation) {
|
if (quat != m_xrRotation) {
|
||||||
qCCritical(KWIN_XR) << "\t\t\tBreezy - here 6";
|
|
||||||
m_xrRotation = quat;
|
m_xrRotation = quat;
|
||||||
Q_EMIT xrRotationChanged();
|
Q_EMIT xrRotationChanged();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ Node {
|
||||||
id: faceRepeater
|
id: faceRepeater
|
||||||
model: KWinComponents.Workspace.screens.length
|
model: KWinComponents.Workspace.screens.length
|
||||||
delegate: CubeFace {
|
delegate: CubeFace {
|
||||||
property var screen: KWinComponents.Workspace.screens[index]
|
screen: KWinComponents.Workspace.screens[index]
|
||||||
faceSize: cube.faceSize
|
faceSize: cube.faceSize
|
||||||
scale: Qt.vector3d(faceSize.width / 100, faceSize.height / 100, 1)
|
scale: Qt.vector3d(faceSize.width / 100, faceSize.height / 100, 1)
|
||||||
eulerRotation.y: cube.angleTick * index
|
eulerRotation.y: cube.angleTick * index
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ Item {
|
||||||
Repeater {
|
Repeater {
|
||||||
model: KWinComponents.WindowFilterModel {
|
model: KWinComponents.WindowFilterModel {
|
||||||
activity: KWinComponents.Workspace.currentActivity
|
activity: KWinComponents.Workspace.currentActivity
|
||||||
screenName: desktopView.screen.name
|
|
||||||
windowModel: KWinComponents.WindowModel {}
|
windowModel: KWinComponents.WindowModel {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ Item {
|
||||||
|
|
||||||
function switchToSelected() {
|
function switchToSelected() {
|
||||||
const eulerRotation = cameraController.rotation.toEulerAngles();
|
const eulerRotation = cameraController.rotation.toEulerAngles();
|
||||||
const desktop = cube.desktopAt(eulerRotation.y);
|
const desktop = cube.screenAt(eulerRotation.y);
|
||||||
KWinComponents.Workspace.currentDesktop = desktop;
|
KWinComponents.Workspace.currentDesktop = desktop;
|
||||||
effect.deactivate();
|
effect.deactivate();
|
||||||
}
|
}
|
||||||
|
|
@ -135,7 +135,7 @@ Item {
|
||||||
if (rotationAnimation.running) {
|
if (rotationAnimation.running) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
rotation = Quaternion.fromEulerAngles(0, cube.desktopAzimuth(desktop), 0);
|
rotation = Quaternion.fromEulerAngles(0, cube.screenAzimuth(desktop), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue