~agateau/unity-2d/show-launcher-from-home-button

« back to all changes in this revision

Viewing changes to launcher/LauncherList.qml

[launcher] Do not hide launcher while a menu is visible

Adds two signals to LauncherContextualMenu to let QML LauncherList know when a menu is shown or hidden. I first tried to use the aboutToShow() and aboutToHide() signals, but aboutToShow() is not emitted due to the way we use QMenu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
            onDraggedTileIdChanged: if (reorder.draggedTileId != "") item.menu.hide()
124
124
        }
125
125
 
 
126
        Connections {
 
127
            target: item.menu
 
128
            onVisibleChanged: {
 
129
                if (item.menu.visible) {
 
130
                    visibilityController.beginForceVisible();
 
131
                } else {
 
132
                    visibilityController.endForceVisible();
 
133
                }
 
134
            }
 
135
        }
 
136
 
126
137
        function setIconGeometry() {
127
138
            if (running) {
128
139
                item.setIconGeometry(x + panel.x, y + panel.y, width, height)