mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-26 19:39:49 +01:00
Revert "Add destructor to inhibitor"
This breaks shit
This reverts commit 657d2c9a69
.
This commit is contained in:
parent
657d2c9a69
commit
1fa3ca3152
1 changed files with 11 additions and 12 deletions
|
@ -24,14 +24,6 @@ static void input_inhibitor_destroy(struct wl_client *client,
|
|||
wl_signal_emit(&manager->events.deactivate, manager);
|
||||
}
|
||||
|
||||
static void input_manager_resource_destroy(struct wl_resource *resource) {
|
||||
struct wlr_input_inhibit_manager *manager =
|
||||
input_inhibit_manager_from_resource(resource);
|
||||
if (manager->active_client == wl_resource_get_client(resource)) {
|
||||
input_inhibitor_destroy(manager->active_client, resource);
|
||||
}
|
||||
}
|
||||
|
||||
static struct zwlr_input_inhibitor_v1_interface input_inhibitor_implementation = {
|
||||
.destroy = input_inhibitor_destroy,
|
||||
};
|
||||
|
@ -53,9 +45,8 @@ static void inhibit_manager_get_inhibitor(struct wl_client *client,
|
|||
if (!wl_resource) {
|
||||
wl_client_post_no_memory(client);
|
||||
}
|
||||
wl_resource_set_implementation(wl_resource,
|
||||
&input_inhibitor_implementation, manager,
|
||||
input_manager_resource_destroy);
|
||||
wl_resource_set_implementation(wl_resource, &input_inhibitor_implementation,
|
||||
manager, NULL);
|
||||
|
||||
manager->active_client = client;
|
||||
manager->active_inhibitor = wl_resource;
|
||||
|
@ -67,6 +58,14 @@ static const struct zwlr_input_inhibit_manager_v1_interface inhibit_manager_impl
|
|||
.get_inhibitor = inhibit_manager_get_inhibitor
|
||||
};
|
||||
|
||||
static void input_manager_client_destroy(struct wl_resource *resource) {
|
||||
struct wlr_input_inhibit_manager *manager =
|
||||
input_inhibit_manager_from_resource(resource);
|
||||
if (manager->active_client == wl_resource_get_client(resource)) {
|
||||
input_inhibitor_destroy(manager->active_client, resource);
|
||||
}
|
||||
}
|
||||
|
||||
static void inhibit_manager_bind(struct wl_client *wl_client, void *data,
|
||||
uint32_t version, uint32_t id) {
|
||||
struct wlr_input_inhibit_manager *manager = data;
|
||||
|
@ -80,7 +79,7 @@ static void inhibit_manager_bind(struct wl_client *wl_client, void *data,
|
|||
}
|
||||
wl_resource_set_implementation(wl_resource,
|
||||
&inhibit_manager_implementation, manager,
|
||||
input_manager_resource_destroy);
|
||||
input_manager_client_destroy);
|
||||
}
|
||||
|
||||
void wlr_input_inhibit_manager_destroy(
|
||||
|
|
Loading…
Reference in a new issue