]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[x11] initialize head on query not map
authorRay Strode <rstrode@redhat.com>
Fri, 9 Oct 2009 21:38:17 +0000 (17:38 -0400)
committerRay Strode <rstrode@redhat.com>
Mon, 12 Oct 2009 23:40:08 +0000 (19:40 -0400)
Do it for the same reason we did it in the frame-buffer
plugin in the previous commit.  It's the "right" thing
to do and now that we map lazily, doing it the old way
is broken.

src/plugins/renderers/x11/plugin.c

index a2b61c0b22366bbd0be18cb986d322d1839682dd..8f50be5f5b39bde4931d7aed5ccca887b5d0669f 100644 (file)
@@ -193,6 +193,7 @@ query_device (ply_renderer_backend_t *backend)
                                      head->area.width,
                                      head->area.height,
                                      24);
+      head->pixel_buffer = ply_pixel_buffer_new (head->area.width, head->area.height);
 
       ply_list_append_data (backend->heads, head);
 
@@ -207,6 +208,7 @@ query_device (ply_renderer_backend_t *backend)
                                      head->area.width,
                                      head->area.height,
                                      24);
+      head->pixel_buffer = ply_pixel_buffer_new (head->area.width, head->area.height);
 
       ply_list_append_data (backend->heads, head);
     }
@@ -243,7 +245,6 @@ map_to_device (ply_renderer_backend_t *backend)
       head = (ply_renderer_head_t *) ply_list_node_get_data (node);
       next_node = ply_list_get_next_node (backend->heads, node);
 
-      head->pixel_buffer = ply_pixel_buffer_new (head->area.width, head->area.height);
       head->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
       gtk_window_set_resizable (GTK_WINDOW (head->window), FALSE);
       gtk_widget_set_size_request (head->window,