xwayland: allow windows to scale themselves
This commit is contained in:
parent
cc8db84289
commit
19b07fa7dc
40 changed files with 800 additions and 80 deletions
|
|
@ -593,6 +593,10 @@
|
|||
"ui-drag": {
|
||||
"description": "Configures the ui-drag settings.\n\n- Example:\n\n ```toml\n ui-drag = { enabled = false, threshold = 20 }\n ```\n",
|
||||
"$ref": "#/$defs/UiDrag"
|
||||
},
|
||||
"xwayland": {
|
||||
"description": "Configures the Xwayland settings.\n\n- Example:\n\n ```toml\n xwayland = { scaling-mode = \"downscaled\" }\n ```\n",
|
||||
"$ref": "#/$defs/Xwayland"
|
||||
}
|
||||
},
|
||||
"required": []
|
||||
|
|
@ -1399,6 +1403,25 @@
|
|||
"variant2",
|
||||
"variant3"
|
||||
]
|
||||
},
|
||||
"XScalingMode": {
|
||||
"type": "string",
|
||||
"description": "The scaling mode of X windows.\n\n- Example:\n\n ```toml\n xwayland = { scaling-mode = \"downscaled\" }\n ```\n",
|
||||
"enum": [
|
||||
"default",
|
||||
"downscaled"
|
||||
]
|
||||
},
|
||||
"Xwayland": {
|
||||
"description": "Describes Xwayland settings.\n\n- Example:\n\n ```toml\n xwayland = { scaling-mode = \"downscaled\" }\n ```\n",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"scaling-mode": {
|
||||
"description": "The scaling mode of X windows.",
|
||||
"$ref": "#/$defs/XScalingMode"
|
||||
}
|
||||
},
|
||||
"required": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1166,6 +1166,18 @@ The table has the following fields:
|
|||
|
||||
The value of this field should be a [UiDrag](#types-UiDrag).
|
||||
|
||||
- `xwayland` (optional):
|
||||
|
||||
Configures the Xwayland settings.
|
||||
|
||||
- Example:
|
||||
|
||||
```toml
|
||||
xwayland = { scaling-mode = "downscaled" }
|
||||
```
|
||||
|
||||
The value of this field should be a [Xwayland](#types-Xwayland).
|
||||
|
||||
|
||||
<a name="types-Connector"></a>
|
||||
### `Connector`
|
||||
|
|
@ -3122,3 +3134,64 @@ The string should have one of the following values:
|
|||
|
||||
|
||||
|
||||
<a name="types-XScalingMode"></a>
|
||||
### `XScalingMode`
|
||||
|
||||
The scaling mode of X windows.
|
||||
|
||||
- Example:
|
||||
|
||||
```toml
|
||||
xwayland = { scaling-mode = "downscaled" }
|
||||
```
|
||||
|
||||
Values of this type should be strings.
|
||||
|
||||
The string should have one of the following values:
|
||||
|
||||
- `default`:
|
||||
|
||||
The default mode.
|
||||
|
||||
Currently this means that windows are rendered at the lowest scale and then upscaled
|
||||
if necessary.
|
||||
|
||||
- `downscaled`:
|
||||
|
||||
Windows are rendered at the highest integer scale and then downscaled.
|
||||
|
||||
This has significant performance implications unless the window is running on the
|
||||
output with the highest scale and that scale is an integer scale.
|
||||
|
||||
For example, on a 3840x2160 output with a 1.5 scale, a fullscreen window will be
|
||||
rendered at 3840x2160 * 2 / 1.5 = 5120x2880 pixels and then downscaled to
|
||||
3840x2160. This overhead gets worse the lower the scale of the output is.
|
||||
|
||||
Additionally, this mode requires the X window to scale its contents itself. In the
|
||||
example above, you might achieve this by setting the environment variable
|
||||
`GDK_SCALE=2`.
|
||||
|
||||
|
||||
|
||||
<a name="types-Xwayland"></a>
|
||||
### `Xwayland`
|
||||
|
||||
Describes Xwayland settings.
|
||||
|
||||
- Example:
|
||||
|
||||
```toml
|
||||
xwayland = { scaling-mode = "downscaled" }
|
||||
```
|
||||
|
||||
Values of this type should be tables.
|
||||
|
||||
The table has the following fields:
|
||||
|
||||
- `scaling-mode` (optional):
|
||||
|
||||
The scaling mode of X windows.
|
||||
|
||||
The value of this field should be a [XScalingMode](#types-XScalingMode).
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2275,6 +2275,17 @@ Config:
|
|||
```toml
|
||||
ui-drag = { enabled = false, threshold = 20 }
|
||||
```
|
||||
xwayland:
|
||||
ref: Xwayland
|
||||
required: false
|
||||
description: |
|
||||
Configures the Xwayland settings.
|
||||
|
||||
- Example:
|
||||
|
||||
```toml
|
||||
xwayland = { scaling-mode = "downscaled" }
|
||||
```
|
||||
|
||||
|
||||
Idle:
|
||||
|
|
@ -2627,3 +2638,53 @@ UiDrag:
|
|||
Sets the distance at which ui dragging starts.
|
||||
|
||||
The default is `10`.
|
||||
|
||||
|
||||
Xwayland:
|
||||
kind: table
|
||||
description: |
|
||||
Describes Xwayland settings.
|
||||
|
||||
- Example:
|
||||
|
||||
```toml
|
||||
xwayland = { scaling-mode = "downscaled" }
|
||||
```
|
||||
fields:
|
||||
scaling-mode:
|
||||
ref: XScalingMode
|
||||
required: false
|
||||
description: The scaling mode of X windows.
|
||||
|
||||
|
||||
XScalingMode:
|
||||
description: |
|
||||
The scaling mode of X windows.
|
||||
|
||||
- Example:
|
||||
|
||||
```toml
|
||||
xwayland = { scaling-mode = "downscaled" }
|
||||
```
|
||||
kind: string
|
||||
values:
|
||||
- value: default
|
||||
description: |
|
||||
The default mode.
|
||||
|
||||
Currently this means that windows are rendered at the lowest scale and then upscaled
|
||||
if necessary.
|
||||
- value: downscaled
|
||||
description: |
|
||||
Windows are rendered at the highest integer scale and then downscaled.
|
||||
|
||||
This has significant performance implications unless the window is running on the
|
||||
output with the highest scale and that scale is an integer scale.
|
||||
|
||||
For example, on a 3840x2160 output with a 1.5 scale, a fullscreen window will be
|
||||
rendered at 3840x2160 * 2 / 1.5 = 5120x2880 pixels and then downscaled to
|
||||
3840x2160. This overhead gets worse the lower the scale of the output is.
|
||||
|
||||
Additionally, this mode requires the X window to scale its contents itself. In the
|
||||
example above, you might achieve this by setting the environment variable
|
||||
`GDK_SCALE=2`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue