Adapt some changes from Yakuake utilities/yakuake@a0b08cb1 credit to Stephan Sahm @schlichtanders BUG: 428265