compositor: Call wlsc_buffer_attach() after setting es->width
Otherwise we end up with a 0 pitch.
This commit is contained in:
@@ -860,8 +860,6 @@ surface_attach(struct wl_client *client,
|
|||||||
* damaged by the client. */
|
* damaged by the client. */
|
||||||
wlsc_surface_damage(es);
|
wlsc_surface_damage(es);
|
||||||
|
|
||||||
wlsc_buffer_attach(buffer, surface);
|
|
||||||
|
|
||||||
switch (es->map_type) {
|
switch (es->map_type) {
|
||||||
case WLSC_SURFACE_MAP_FULLSCREEN:
|
case WLSC_SURFACE_MAP_FULLSCREEN:
|
||||||
es->x = (es->fullscreen_output->width - es->width) / 2;
|
es->x = (es->fullscreen_output->width - es->width) / 2;
|
||||||
@@ -877,6 +875,8 @@ surface_attach(struct wl_client *client,
|
|||||||
if (x != 0 || y != 0)
|
if (x != 0 || y != 0)
|
||||||
wlsc_surface_assign_output(es);
|
wlsc_surface_assign_output(es);
|
||||||
|
|
||||||
|
wlsc_buffer_attach(buffer, surface);
|
||||||
|
|
||||||
es->compositor->shell->attach(es->compositor->shell, es);
|
es->compositor->shell->attach(es->compositor->shell, es);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user