nuke toplevel_mgr_bind

This commit is contained in:
vaxerski 2023-02-03 16:50:06 +00:00
parent f8cdd28cc8
commit a0fa7909cd
3 changed files with 1 additions and 4 deletions

View File

@ -127,7 +127,6 @@ struct xdpw_screencast_context {
struct hyprland_toplevel_export_manager_v1 *hyprland_toplevel_manager;
struct zwlr_foreign_toplevel_manager_v1 *wlroots_toplevel_manager;
struct wl_list toplevel_resource_list;
int toplevel_mgr_bind;
// gbm
struct gbm_device *gbm;

View File

@ -170,7 +170,6 @@ static int start_screencast(struct xdpw_screencast_instance *cast) {
// process at least one frame so that we know
// some of the metadata required for the pipewire
// remote state connected event
cast->ctx->toplevel_mgr_bind = 1;
wl_display_dispatch(cast->ctx->state->wl_display);
wl_display_roundtrip(cast->ctx->state->wl_display);
@ -522,7 +521,6 @@ int xdpw_screencast_init(struct xdpw_state *state) {
state->screencast = (struct xdpw_screencast_context){0};
state->screencast.state = state;
state->screencast.hyprland_toplevel_manager = NULL;
state->screencast.toplevel_mgr_bind = 0;
int err;
err = xdpw_pwr_context_create(state);

View File

@ -1070,7 +1070,7 @@ static void wlr_registry_handle_add(void *data, struct wl_registry *reg,
ctx->hyprland_toplevel_manager = wl_registry_bind(reg, id, &hyprland_toplevel_export_manager_v1_interface, version);
}
if (!strcmp(interface, zwlr_foreign_toplevel_manager_v1_interface.name) && ctx->toplevel_mgr_bind && !ctx->wlroots_toplevel_manager) {
if (!strcmp(interface, zwlr_foreign_toplevel_manager_v1_interface.name) && !ctx->wlroots_toplevel_manager) {
uint32_t version = ver;
logprint(DEBUG, "hyprland: |-- registered to interface %s (Version %u)", interface, version);