summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/meta-ti/.gitkeep
blob: e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 (plain)

ight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
diff --git a/ivi-shell/hmi-controller.c b/ivi-shell/hmi-controller.c
index a0e49ba0..340d1915 100644
--- a/ivi-shell/hmi-controller.c
+++ b/ivi-shell/hmi-controller.c
@@ -129,9 +129,9 @@ struct hmi_controller {
 	struct weston_compositor           *compositor;
 	struct wl_listener                  destroy_listener;
 
-	struct wl_listener                  surface_created;
 	struct wl_listener                  surface_removed;
 	struct wl_listener                  surface_configured;
+	struct wl_listener                  desktop_surface_configured;
 
 	struct wl_client                   *user_interface;
 	struct ui_setting                   ui_setting;
@@ -576,28 +576,6 @@ create_layer(struct weston_output *output,
 /**
  * Internal set notification
  */
-static void
-set_notification_create_surface(struct wl_listener *listener, void *data)
-{
-	struct hmi_controller *hmi_ctrl =
-			wl_container_of(listener, hmi_ctrl,
-					surface_created);
-	struct ivi_layout_surface *ivisurf = data;
-	struct hmi_controller_layer *layer_link =
-					wl_container_of(hmi_ctrl->application_layer_list.prev,
-							layer_link,
-							link);
-	struct ivi_layout_layer *application_layer = layer_link->ivilayer;
-	int32_t ret = 0;
-
-	/* skip ui widgets */
-	if (is_surf_in_ui_widget(hmi_ctrl, ivisurf))
-		return;
-
-	ret = hmi_ctrl->interface->layer_add_surface(application_layer, ivisurf);
-	assert(!ret);
-}
-
 static void
 set_notification_remove_surface(struct wl_listener *listener, void *data)
 {
@@ -665,6 +643,42 @@ set_notification_configure_surface(struct wl_listener *listener, void *data)
 	switch_mode(hmi_ctrl, hmi_ctrl->layout_mode);
 }
 
+static void
+set_notification_configure_desktop_surface(struct wl_listener *listener, void *data)
+{
+	struct hmi_controller *hmi_ctrl =
+			wl_container_of(listener, hmi_ctrl,
+					desktop_surface_configured);
+	struct ivi_layout_surface *ivisurf = data;
+	struct hmi_controller_layer *layer_link =
+					wl_container_of(hmi_ctrl->application_layer_list.prev,
+							layer_link,
+							link);
+	struct ivi_layout_layer *application_layer = layer_link->ivilayer;
+	struct weston_surface *surface;
+	int32_t ret = 0;
+
+	/* skip ui widgets */
+	if (is_surf_in_ui_widget(hmi_ctrl, ivisurf))
+		return;
+
+	ret = hmi_ctrl->interface->layer_add_surface(application_layer, ivisurf);
+	assert(!ret);
+
+	/*
+	 * if application changes size of wl_buffer. The source rectangle shall be
+	 * fit to the size.
+	 */
+	surface = hmi_ctrl->interface->surface_get_weston_surface(ivisurf);
+	if (surface) {
+		hmi_ctrl->interface->surface_set_source_rectangle(ivisurf, 0,
+				0, surface->width, surface->height);
+	}
+
+	hmi_ctrl->interface->commit_changes();
+	switch_mode(hmi_ctrl, hmi_ctrl->layout_mode);
+}
+
 /**
  * A hmi_controller used 4 ivi_layers to manage ivi_surfaces. The IDs of
  * corresponding ivi_layer are defined in weston.ini. Default scene graph
@@ -868,6 +882,9 @@ hmi_controller_create(struct weston_compositor *ec)
 	hmi_ctrl->surface_configured.notify = set_notification_configure_surface;
 	hmi_ctrl->interface->add_listener_configure_surface(&hmi_ctrl->surface_configured);
 
+	hmi_ctrl->desktop_surface_configured.notify = set_notification_configure_desktop_surface;
+	hmi_ctrl->interface->add_listener_configure_desktop_surface(&hmi_ctrl->desktop_surface_configured);
+
 	hmi_ctrl->destroy_listener.notify = hmi_controller_destroy;
 	wl_signal_add(&hmi_ctrl->compositor->destroy_signal,
 		      &hmi_ctrl->destroy_listener);
@@ -1289,12 +1306,6 @@ ivi_hmi_controller_UI_ready(struct wl_client *client,
 
 	ivi_hmi_controller_add_launchers(hmi_ctrl, 256);
 
-	/* Add surface_created listener after the initialization of launchers.
-	 * Otherwise, surfaces of the launchers will be added to application
-	 * layer too.*/
-	hmi_ctrl->surface_created.notify = set_notification_create_surface;
-	hmi_ctrl->interface->add_listener_create_surface(&hmi_ctrl->surface_created);
-
 	hmi_ctrl->is_initialized = 1;
 }
 
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index b06bf309..ef354d49 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -715,9 +715,15 @@ commit_surface_list(struct ivi_layout *layout)
 			ivisurf->pending.prop.transition_type = IVI_LAYOUT_TRANSITION_NONE;
 
 			if (configured && !is_surface_transition(ivisurf)) {
-				shell_surface_send_configure(ivisurf->surface,
-							     ivisurf->prop.dest_width,
-							     ivisurf->prop.dest_height);
+				if (ivisurf->weston_desktop_surface) {
+					weston_desktop_surface_set_size(ivisurf->weston_desktop_surface,
+									ivisurf->prop.dest_width,
+									ivisurf->prop.dest_height);
+				} else {
+					shell_surface_send_configure(ivisurf->surface,
+								     ivisurf->prop.dest_width,
+								     ivisurf->prop.dest_height);
+				}
 			}
 		} else {
 			configured = 0;