Commit d70c7c47 authored by Xuetian Weng's avatar Xuetian Weng Committed by Nate Graham
Browse files

Fix not working applet with same compact/full representation when hiding

If preferred, compact and full represenation are set to the same value,
the value of appletShouldBeExpanded will be true, which means the applet
will be expanded by default. In this case, only fullRepresentation will
be created and compactRepresentationItem will simply be null.

If compactRepresentationItem is null, also check the fullRepresentation
for mouse event forwarding.

This fixes manage-inputmethod applet not working if it's hidden in the
tray.


(cherry picked from commit 69702475)
parent 35d27fb2
Pipeline #165316 passed with stage
in 7 minutes and 36 seconds
......@@ -27,7 +27,8 @@ AbstractItem {
return
}
//forward click event to the applet
const mouseArea = findMouseArea(applet.compactRepresentationItem)
var appletItem = applet.compactRepresentationItem ? applet.compactRepresentationItem : applet.fullRepresentationItem
const mouseArea = findMouseArea(appletItem)
if (mouseArea) {
mouseArea.clicked(mouse)
} else if (mouse.button === Qt.LeftButton) {//falback
......@@ -50,7 +51,8 @@ AbstractItem {
return
}
//forward wheel event to the applet
const mouseArea = findMouseArea(applet.compactRepresentationItem)
var appletItem = applet.compactRepresentationItem ? applet.compactRepresentationItem : applet.fullRepresentationItem
const mouseArea = findMouseArea(appletItem)
if (mouseArea) {
mouseArea.wheel(wheel)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment