fix(kwayland): wait longer for connection timeout and retry

Authored by dvratil on Feb 24 2020, 1:57 PM.

Description

fix(kwayland): wait longer for connection timeout and retry

Summary:
During login creating the connection to Wayland server may take longer
than 1 second (KWin busy, high CPU and IO load, ...) causing
WaylandConfig to time out and leave the backend in an inconsistent
state.

This patch increases the timeout to 3 seconds and sets the overall
backend status to invalid if connecting to Wayland server times out.
This will abort the pending KScreen operation and prevent it from
interacting with the broken backend. The next KScreen operation
will try to set up the backend again, hopefully successfully this time.

BUG: 416566
FIXED-IN: 5.18.2

Reviewers: Plasma, romangg

Reviewed By: Plasma, romangg

Subscribers: romangg, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D27618

Details