xdgoutput_v1: Do not send a done event to every client when a client binds
When binding we just need to be talking to the one client to make sure it's set up. This saves us from waking up every other process only to realise that nothing happened.
This commit is contained in:
parent
fb672f335a
commit
f4070a23d5
3 changed files with 12 additions and 1 deletions
|
@ -398,6 +398,11 @@ void OutputInterface::done()
|
|||
}
|
||||
}
|
||||
|
||||
void OutputInterface::done(wl_client *client)
|
||||
{
|
||||
d->sendDone(d->resourceMap().value(client));
|
||||
}
|
||||
|
||||
OutputInterface *OutputInterface::get(wl_resource *native)
|
||||
{
|
||||
if (auto outputPrivate = resource_cast<OutputInterfacePrivate *>(native)) {
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <QSize>
|
||||
|
||||
struct wl_resource;
|
||||
struct wl_client;
|
||||
|
||||
namespace KWaylandServer
|
||||
{
|
||||
|
@ -118,6 +119,11 @@ public:
|
|||
*/
|
||||
void done();
|
||||
|
||||
/**
|
||||
* Submit changes to @p client.
|
||||
*/
|
||||
void done(wl_client *client);
|
||||
|
||||
static OutputInterface *get(wl_resource *native);
|
||||
|
||||
Q_SIGNALS:
|
||||
|
|
|
@ -200,7 +200,7 @@ void XdgOutputV1InterfacePrivate::zxdg_output_v1_bind_resource(Resource *resourc
|
|||
if (doneOnce) {
|
||||
if (wl_resource_get_version(resource->handle) >= 3) {
|
||||
if (output) {
|
||||
output->done();
|
||||
output->done(resource->client());
|
||||
}
|
||||
} else {
|
||||
send_done(resource->handle);
|
||||
|
|
Loading…
Reference in a new issue