Skip to content
Commit 90393d7d authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Send an icon only if there is one

Currently, plasma window model test fails because the null icon is
received after executing the main body of the test.

    FAIL!  : PlasmaWindowModelTest::testVirtualDesktops() '!dataChangedSpy.wait(100)' returned FALSE. ()
       Loc: [/data/projects/src/kwayland-server/autotests/client/test_plasma_window_model.cpp(583)]

We can fix the test by waiting for the iconChanged signal to be emitted,
but we will need to wait in all tests too. Furthermore, it doesn't make a
lot of sense to wait for an icon that was never set.

This change makes the compositor send an icon only if there is one.

It's a behavioral change, but it shouldn't regress anything because kwin
always sets icons via the plasma window management protocol even for apps
that have no valid app id.

It also makes the api of the PlasmaWindowInterface class more intuitive.
parent eda53c7f
Pipeline #54571 passed with stage
in 7 minutes and 14 seconds
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