---
title: "disable"
description: "Used to disable [androidx.compose.ui.layout.WindowInsetsRulers]."
type: "function"
lastmod: "2026-09-24"
---
## API Reference

### disable

> Source set: Common

```kotlin
public fun WindowInsetsRulers.Companion.disable()
```

Used to disable `androidx.compose.ui.layout.WindowInsetsRulers`. This can be used when UI never
reads WindowInsets across all Compose roots to reduce the overhead of requesting WindowInsets
updates. Only call this when no Compose roots will ever need to handle insets over the lifetime
of the application. This should be called before the first Compose root is created.
