[PATCH 18/21] [x11] default renderer to inactive

Scott James Remnant scott at ubuntu.com
Wed Mar 17 22:04:33 PDT 2010


Change the renderer so that it defaults to inactive until we
map to the device.
---
 src/plugins/renderers/x11/plugin.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/plugins/renderers/x11/plugin.c b/src/plugins/renderers/x11/plugin.c
index a280bc7..0bf8ab2 100644
--- a/src/plugins/renderers/x11/plugin.c
+++ b/src/plugins/renderers/x11/plugin.c
@@ -85,7 +85,7 @@ struct _ply_renderer_backend
 
   ply_fd_watch_t *display_watch;
 
-  uint32_t is_inactive : 1;
+  uint32_t is_active : 1;
 };
 
 ply_renderer_plugin_interface_t *ply_renderer_backend_get_interface (void);
@@ -269,6 +269,9 @@ map_to_device (ply_renderer_backend_t *backend)
       ply_renderer_head_redraw (backend, head);
       node = next_node;
     }
+
+  backend->is_active = true;
+
   return true;
 }
 
@@ -301,13 +304,13 @@ unmap_from_device (ply_renderer_backend_t *backend)
 static void
 activate (ply_renderer_backend_t *backend)
 {
-  backend->is_inactive = false;
+  backend->is_active = true;
 }
 
 static void
 deactivate (ply_renderer_backend_t *backend)
 {
-  backend->is_inactive = true;
+  backend->is_active = false;
 }
 
 static void
@@ -341,7 +344,7 @@ flush_head (ply_renderer_backend_t *backend,
 
   assert (backend != NULL);
 
-  if (backend->is_inactive)
+  if (!backend->is_active)
     return;
 
   pixel_buffer = head->pixel_buffer;
-- 
1.7.0



More information about the plymouth mailing list