Compare commits

...

3 Commits

Author SHA1 Message Date
eab34c7c03
Merge branch 'master' of https://codeberg.org/river/river 2024-11-01 15:43:44 -07:00
Isaac Freund
1b5dd21ee6
layer-surface: fix clip box coordinates
The clip box must be relative to the layer surface, not the output.
2024-10-24 12:07:49 +02:00
Isaac Freund
3529463569
Output: workaround wlroots headless output bug 2024-10-24 10:55:44 +02:00

View File

@ -393,11 +393,15 @@ fn sendLayerConfigures(
usable_box.* = new_usable_box; usable_box.* = new_usable_box;
} }
layer_surface.popup_tree.node.setPosition( const x = layer_surface.scene_layer_surface.tree.node.x;
layer_surface.scene_layer_surface.tree.node.x, const y = layer_surface.scene_layer_surface.tree.node.y;
layer_surface.scene_layer_surface.tree.node.y, layer_surface.popup_tree.node.setPosition(x, y);
); layer_surface.scene_layer_surface.tree.node.subsurfaceTreeSetClip(&.{
layer_surface.scene_layer_surface.tree.node.subsurfaceTreeSetClip(&full_box); .x = -x,
.y = -y,
.width = full_box.width,
.height = full_box.height,
});
} }
} }
} }
@ -547,7 +551,9 @@ fn renderAndCommit(output: *Output, scene_output: *wlr.SceneOutput) !void {
const control = server.root.gamma_control_manager.getControl(output.wlr_output); const control = server.root.gamma_control_manager.getControl(output.wlr_output);
if (!wlr.GammaControlV1.apply(control, &state)) return error.OutOfMemory; if (!wlr.GammaControlV1.apply(control, &state)) return error.OutOfMemory;
if (!output.wlr_output.testState(&state)) { // TODO(wlroots): remove this isHeadless() workaround after upstream fix is available
// in a release: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4868
if (!output.wlr_output.testState(&state) or output.wlr_output.isHeadless()) {
wlr.GammaControlV1.sendFailedAndDestroy(control); wlr.GammaControlV1.sendFailedAndDestroy(control);
state.clearGammaLut(); state.clearGammaLut();
// If the backend does not support gamma LUTs it will reject any // If the backend does not support gamma LUTs it will reject any