Kaynağa Gözat

Remove QML rotation container causing partial repaint on linuxfb

The rotation transform on the main container was causing touch/rendering
issues on embedded displays with linuxfb backend:
- Touch to wake showed console window instead of app
- Swiping/touching only rendered the touched portion

Removed:
- rotationContainer with 180° rotation
- InputPanel rotation
- Custom rotated error dialog (Pi 5 workaround)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
tuanchris 1 ay önce
ebeveyn
işleme
366bda6cf2
1 değiştirilmiş dosya ile 4 ekleme ve 82 silme
  1. 4 82
      dune-weaver-touch/qml/main.qml

+ 4 - 82
dune-weaver-touch/qml/main.qml

@@ -57,14 +57,8 @@ ApplicationWindow {
         }
         
         onErrorOccurred: function(error) {
-            // Use custom dialog on Pi 5 for proper rotation
-            if (typeof rotateDisplay !== 'undefined' && rotateDisplay) {
-                customErrorDialog.errorText = error
-                customErrorDialog.open()
-            } else {
-                errorDialog.text = error
-                errorDialog.open()
-            }
+            errorDialog.text = error
+            errorDialog.open()
         }
         
         onScreenStateChanged: function(isOn) {
@@ -110,13 +104,6 @@ ApplicationWindow {
         id: patternModel
     }
     
-    // Rotation container for Pi 5 linuxfb
-    Item {
-        id: rotationContainer
-        anchors.fill: parent
-        rotation: typeof rotateDisplay !== 'undefined' && rotateDisplay ? 180 : 0
-        transformOrigin: Item.Center
-
     StackView {
         id: stackView
         anchors.fill: parent
@@ -217,9 +204,8 @@ ApplicationWindow {
             }
         }
     }
-    } // End rotationContainer
 
-    // Virtual Keyboard Support - outside rotation container for proper positioning
+    // Virtual Keyboard Support
     InputPanel {
         id: inputPanel
         z: 99999
@@ -227,16 +213,12 @@ ApplicationWindow {
         anchors.left: parent.left
         anchors.right: parent.right
 
-        // Rotate keyboard for Pi 5
-        rotation: typeof rotateDisplay !== 'undefined' && rotateDisplay ? 180 : 0
-        transformOrigin: Item.Center
-
         states: State {
             name: "visible"
             when: inputPanel.active
             PropertyChanges {
                 target: inputPanel
-                y: typeof rotateDisplay !== 'undefined' && rotateDisplay ? 0 : window.height - inputPanel.height
+                y: window.height - inputPanel.height
             }
         }
 
@@ -255,69 +237,9 @@ ApplicationWindow {
         }
     }
 
-    // Error dialog - note: MessageDialog is a system dialog, rotation may not work
-    // If rotation doesn't work, we'll need to replace with a custom Dialog
     MessageDialog {
         id: errorDialog
         title: "Error"
         buttons: MessageDialog.Ok
     }
-
-    // Custom error dialog as fallback for Pi 5 rotation
-    Popup {
-        id: customErrorDialog
-        modal: true
-        x: (window.width - width) / 2
-        y: (window.height - height) / 2
-        width: 320
-        height: 180
-        closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
-
-        property string errorText: ""
-
-        background: Rectangle {
-            color: "#2d2d2d"
-            radius: 12
-            border.color: "#404040"
-            border.width: 1
-
-            // Rotate the entire dialog content for Pi 5
-            rotation: typeof rotateDisplay !== 'undefined' && rotateDisplay ? 180 : 0
-            transformOrigin: Item.Center
-        }
-
-        contentItem: Item {
-            rotation: typeof rotateDisplay !== 'undefined' && rotateDisplay ? 180 : 0
-            transformOrigin: Item.Center
-
-            Column {
-                anchors.fill: parent
-                anchors.margins: 20
-                spacing: 15
-
-                Label {
-                    text: "Error"
-                    font.pixelSize: 18
-                    font.bold: true
-                    color: "#ff6b6b"
-                    anchors.horizontalCenter: parent.horizontalCenter
-                }
-
-                Label {
-                    text: customErrorDialog.errorText
-                    wrapMode: Text.WordWrap
-                    width: parent.width
-                    horizontalAlignment: Text.AlignHCenter
-                    color: "#ffffff"
-                    font.pixelSize: 14
-                }
-
-                Button {
-                    text: "OK"
-                    anchors.horizontalCenter: parent.horizontalCenter
-                    onClicked: customErrorDialog.close()
-                }
-            }
-        }
-    }
 }