Skip to content

Commit a78d87a

Browse files
committed
[WIP] hwcomposer: Implement xdg_activation_v1
1 parent 7fdaf9d commit a78d87a

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

hwcomposer/wayland-hwc.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
#include "presentation-time-client-protocol.h"
6666
#include "xdg-shell-client-protocol.h"
6767
#include "tablet-unstable-v2-client-protocol.h"
68+
#include "xdg-activation-v1-client-protocol.h"
6869

6970
using ::android::hardware::hidl_string;
7071

@@ -1606,6 +1607,9 @@ registry_handle_global(void *data, struct wl_registry *registry,
16061607
&zwp_tablet_manager_v2_interface, 1);
16071608
if (d->tablet_manager && d->seat)
16081609
add_tablet_seat(d);
1610+
} else if (strcmp(interface, "xdg_activation_v1") == 0) {
1611+
d->xdg_activation = (struct xdg_activation_v1 *)wl_registry_bind(registry, id,
1612+
&xdg_activation_v1_interface, 1);
16091613
}
16101614
}
16111615

@@ -1685,6 +1689,10 @@ destroy_display(struct display *display)
16851689
zwp_tablet_manager_v2_destroy(display->tablet_manager);
16861690
}
16871691

1692+
if (display->xdg_activation) {
1693+
xdg_activation_v1_destroy(display->xdg_activation);
1694+
}
1695+
16881696
wl_registry_destroy(display->registry);
16891697
wl_display_flush(display->display);
16901698
wl_display_disconnect(display->display);

hwcomposer/wayland-hwc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ struct display {
106106
struct xdg_wm_base *wm_base;
107107
struct zwp_tablet_manager_v2* tablet_manager;
108108
struct zwp_tablet_seat_v2 *tablet_seat;
109+
struct xdg_activation_v1 *xdg_activation;
109110
int gtype;
110111
int scale;
111112
pthread_mutex_t data_mutex;

0 commit comments

Comments
 (0)