Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/core/shellhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,10 @@ void ShellHandler::registerSurfaceToForeignToplevel(SurfaceWrapper *wrapper)
m_treelandForeignToplevel->addSurface(wrapper);
}
});

connect(wrapper, &SurfaceWrapper::aboutToBeInvalidated, this, [this, wrapper] {
m_treelandForeignToplevel->removeSurface(wrapper);
});
}

void ShellHandler::setupDockPreview()
Expand Down
15 changes: 15 additions & 0 deletions src/modules/input-manager/inputmanagerinterfacev1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ void TreelandInputManagerInterfaceV1Private::bind_resource(Resource *resource)
{
TreelandInputManagerInterfaceV1::DeviceTypes types = q->inputDeviceListTypes();
struct wlr_seat_client *seatClient = Helper::instance()->seat()->handle()->client_for_wl_client(resource->client());
if (!seatClient)
return;

struct wl_resource *clientResource;
wl_resource_for_each(clientResource, &seatClient->resources) {
send_capability_available(resource->handle, types.toInt(), clientResource);
Expand Down Expand Up @@ -173,6 +176,9 @@ void TreelandInputManagerInterfaceV1::sendCapabilityAvailable(TreelandInputManag
for (const auto &resource : d->resourceMap()) {
struct wlr_seat_client *seatClient =
Helper::instance()->seat()->handle()->client_for_wl_client(resource->client());
if (!seatClient)
continue;

struct wl_resource *clientResource;
wl_resource_for_each(clientResource, &seatClient->resources) {
d->send_capability_available(resource->handle, types.toInt(), clientResource);
Expand All @@ -185,6 +191,9 @@ void TreelandInputManagerInterfaceV1::sendCapabilityUnavailable(TreelandInputMan
for (const auto &resource : d->resourceMap()) {
struct wlr_seat_client *seatClient =
Helper::instance()->seat()->handle()->client_for_wl_client(resource->client());
if (!seatClient)
continue;

struct wl_resource *clientResource;
wl_resource_for_each(clientResource, &seatClient->resources) {
d->send_capability_unavailable(resource->handle, types.toInt(), clientResource);
Expand Down Expand Up @@ -267,6 +276,9 @@ void TreelandInputManagerInterfaceV1::onInputAdded(WInputDevice *input)
for (const auto &resource : d->resourceMap()) {
struct wlr_seat_client *seatClient =
Helper::instance()->seat()->handle()->client_for_wl_client(resource->client());
if (!seatClient)
continue;

struct wl_resource *clientResource;
wl_resource_for_each(clientResource, &seatClient->resources) {
d->send_capability_available(resource->handle, type.toInt(), clientResource);
Expand All @@ -292,6 +304,9 @@ void TreelandInputManagerInterfaceV1::onInputRemoved(WInputDevice *input)
for (const auto &resource : d->resourceMap()) {
struct wlr_seat_client *seatClient =
Helper::instance()->seat()->handle()->client_for_wl_client(resource->client());
if (!seatClient)
continue;

struct wl_resource *clientResource;
wl_resource_for_each(clientResource, &seatClient->resources) {
d->send_capability_unavailable(resource->handle, type.toInt(), clientResource);
Expand Down
Loading