This is a common snippet of code in applets. It prevents applet from
re-expanding again when user clicks on the compact representation when
the applet is already expanded and located on a desktop containment.
Some actions, such as middle click to mute, trigger only on press. Some applets
also need a pressed-click because of some legacy autoclose on focus change
bug.
Unfortunately, QML does not disambiguate the "pressed" property and "pressed(mouse)"
signal with argument, so this has to be done awkwardly through QMetaObject on C++ side.
BUG: 426646
BUG: 452893
FIXED-IN: 5.25.0
"Tablet Mode" is jargon that can confuse users. In this mode, things
become larger as an optimization for touch usage, but the word "tablet"
could easily refer to a drawing tablet, for which no touch
optimizations make sense.
Let's change the UI text here to call it "Touch Mode" instead.
When an applet is about to be deleted, it will save its config
automatically, but in this case the system tray doesn't need to load the
config again.
BUG: 453726
Currently the large spacing setting for the System Tray is different from the large
spacing setting for Task Manager icons. So when both are set to large (e.g. in Tablet
mode) they look out of sync.
In case both IconName and IconPixmap are provided, the system tray
applet is going to prefer the pixmap.
That can create a dark icon on dark background bug because plasma can't
recolor pixmaps.
The SNI spec recommends visualizations to prefer icons over pixmaps:
> An icon can either be identified by its Freedesktop-compliant icon
> name, carried by this property of by the icon data itself, carried by
> the property IconPixmap. Visualizations are encouraged to prefer icon
> names over icon pixmaps if both are available (FIXME: still not very
> defined: could e the pixmap used as fallback if an icon name is not found?)
BUG: 418996
When a service appears right after the ListNames() call finished, but
before the QDBusPendingCallWatcher is set up, the ::serviceRegistered
signal will be queued before the ListNames() response. As a result,
the service will be ignored by DBusServiceObserver.
Switching to QDBusInterface::callWithCallback() ensures that the
result slot is queued as soon as the response arrives, thus avoiding
the race.
Credits go to Sam Edwards for identifying the problem in
https://bugs.kde.org/show_bug.cgi?id=422111#c69
BUG: 422111
FIXED-IN: 5.24.5
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.