Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def registry_global_handler(registry, id_, interface, version):
window = registry.user_data
if interface == 'wl_compositor':
window['compositor'] = registry.bind(id_, Compositor, version)
elif interface == 'wl_shell':
window['shell'] = registry.bind(id_, Shell, version)
elif interface == 'wl_shm':
window['shm'] = registry.bind(id_, Shm, version)
window['shm'].dispatcher['format'] = shm_format_handler