[xwayland] Ensure that DataBridge is initialized prior to PropertyNotify

Since WaylandCursorImage no longer flushes the internal connection
connection and dispatches events, the DataBridge must do it to ensure
that the selections are initialized prior to receiving a ProperyNotify
event.
master
Vlad Zahorodnii 2020-05-19 11:24:08 +03:00 committed by Vlad Zahorodnii
parent cb7a9456c0
commit 68ec39f433
1 changed files with 4 additions and 1 deletions

View File

@ -28,6 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "wayland_server.h"
#include "workspace.h"
#include <KWayland/Client/connection_thread.h>
#include <KWayland/Client/datadevicemanager.h>
#include <KWayland/Client/seat.h>
@ -58,7 +59,6 @@ DataBridge::DataBridge(QObject *parent)
DataDeviceManager *dataDeviceManager = waylandServer()->internalDataDeviceManager();
Seat *seat = waylandServer()->internalSeat();
m_dataDevice = dataDeviceManager->getDataDevice(seat, this);
waylandServer()->dispatch();
const DataDeviceManagerInterface *dataDeviceManagerInterface =
waylandServer()->dataDeviceManager();
@ -78,6 +78,9 @@ DataBridge::DataBridge(QObject *parent)
init();
}
);
waylandServer()->internalClientConection()->flush();
waylandServer()->dispatch();
}
DataBridge::~DataBridge()