mirror of
https://github.com/swaywm/sway.git
synced 2024-11-26 01:41:30 +00:00
layer-shell: enter output before surface is mapped
This sends fractional-scale-v1 events before the first configure event. That way clients have all of the metadata they need to render the first frame.
This commit is contained in:
parent
7a6c7d60d5
commit
7d2e4a5106
|
@ -383,7 +383,6 @@ static void handle_map(struct wl_listener *listener, void *data) {
|
||||||
struct sway_output *output = wlr_output->data;
|
struct sway_output *output = wlr_output->data;
|
||||||
output_damage_surface(output, sway_layer->geo.x, sway_layer->geo.y,
|
output_damage_surface(output, sway_layer->geo.x, sway_layer->geo.y,
|
||||||
sway_layer->layer_surface->surface, true);
|
sway_layer->layer_surface->surface, true);
|
||||||
surface_enter_output(sway_layer->layer_surface->surface, output);
|
|
||||||
cursor_rebase_all();
|
cursor_rebase_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -679,6 +678,8 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) {
|
||||||
wl_list_insert(&output->layers[layer_surface->pending.layer],
|
wl_list_insert(&output->layers[layer_surface->pending.layer],
|
||||||
&sway_layer->link);
|
&sway_layer->link);
|
||||||
|
|
||||||
|
surface_enter_output(layer_surface->surface, output);
|
||||||
|
|
||||||
// Temporarily set the layer's current state to pending
|
// Temporarily set the layer's current state to pending
|
||||||
// So that we can easily arrange it
|
// So that we can easily arrange it
|
||||||
struct wlr_layer_surface_v1_state old_state = layer_surface->current;
|
struct wlr_layer_surface_v1_state old_state = layer_surface->current;
|
||||||
|
|
Loading…
Reference in a new issue