summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2011-05-13 14:06:29 -0400
committerKristian Høgsberg <krh@bitplanet.net>2011-05-16 10:42:06 -0400
commit2e02d24cb3f6fb920001111e8313ae529907a6f2 (patch)
treee9e7a6804b8a249bb97b179589ca3ed35a4c9cea
parenta010abf072457a618c891206196dffc832db3550 (diff)
compositor: Call wlsc_buffer_attach() after setting es->width
Otherwise we end up with a 0 pitch.
-rw-r--r--compositor/compositor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compositor/compositor.c b/compositor/compositor.c
index 6b83b26a..00ffc91b 100644
--- a/compositor/compositor.c
+++ b/compositor/compositor.c
@@ -860,8 +860,6 @@ surface_attach(struct wl_client *client,
* damaged by the client. */
wlsc_surface_damage(es);
- wlsc_buffer_attach(buffer, surface);
-
switch (es->map_type) {
case WLSC_SURFACE_MAP_FULLSCREEN:
es->x = (es->fullscreen_output->width - es->width) / 2;
@@ -877,6 +875,8 @@ surface_attach(struct wl_client *client,
if (x != 0 || y != 0)
wlsc_surface_assign_output(es);
+ wlsc_buffer_attach(buffer, surface);
+
es->compositor->shell->attach(es->compositor->shell, es);
}