|
65 | 65 | #include "presentation-time-client-protocol.h"
|
66 | 66 | #include "xdg-shell-client-protocol.h"
|
67 | 67 | #include "tablet-unstable-v2-client-protocol.h"
|
| 68 | +#include "xdg-activation-v1-client-protocol.h" |
68 | 69 |
|
69 | 70 | using ::android::hardware::hidl_string;
|
70 | 71 |
|
@@ -1606,6 +1607,13 @@ registry_handle_global(void *data, struct wl_registry *registry,
|
1606 | 1607 | &zwp_tablet_manager_v2_interface, 1);
|
1607 | 1608 | if (d->tablet_manager && d->seat)
|
1608 | 1609 | add_tablet_seat(d);
|
| 1610 | + } else if (strcmp(interface, "xdg_activation_v1") == 0) { |
| 1611 | + char token[PROPERTY_VALUE_MAX]; |
| 1612 | + if (property_get("waydroid.xdg_activation_token", token, nullptr) > 0) { |
| 1613 | + d->xdg_activation_token = token; |
| 1614 | + d->xdg_activation = (struct xdg_activation_v1 *)wl_registry_bind(registry, id, |
| 1615 | + &xdg_activation_v1_interface, 1); |
| 1616 | + } |
1609 | 1617 | }
|
1610 | 1618 | }
|
1611 | 1619 |
|
@@ -1685,6 +1693,10 @@ destroy_display(struct display *display)
|
1685 | 1693 | zwp_tablet_manager_v2_destroy(display->tablet_manager);
|
1686 | 1694 | }
|
1687 | 1695 |
|
| 1696 | + if (display->xdg_activation) { |
| 1697 | + xdg_activation_v1_destroy(display->xdg_activation); |
| 1698 | + } |
| 1699 | + |
1688 | 1700 | wl_registry_destroy(display->registry);
|
1689 | 1701 | wl_display_flush(display->display);
|
1690 | 1702 | wl_display_disconnect(display->display);
|
|
0 commit comments