summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-07-31 12:16:11 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-08-08 17:24:00 +0200
commit92c8b647e4e164479c10a84021564533e73cbd69 (patch)
tree4ee1a0c99b39c2d7559916a052d85a3f5dcb090d
parent8cd840e49ad293ece796d32db87d4b1980502cf3 (diff)
app: surfaces on layer != 1000 leave a 100pixel top and bottom margin
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
-rw-r--r--src/app.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/app.cpp b/src/app.cpp
index 5ff8729..58a62ee 100644
--- a/src/app.cpp
+++ b/src/app.cpp
@@ -231,11 +231,22 @@ void App::surface_created(uint32_t surface_id) {
"fullscreen surface",
[layer_id, surface_id](struct genivi::controller *c) {
auto &s = c->surfaces[surface_id];
- s->set_destination_rectangle(0, 0, c->output_size.w,
- c->output_size.h);
+ // s->set_destination_rectangle(0, 0, c->output_size.w, c->output_size.h);
+ // s->set_source_rectangle(0, 100, c->output_size.w, c->output_size.h - 200);
+ if (layer_id != 1000) {
+ // s->set_source_rectangle(0, 0, c->output_size.w, c->output_size.h - 200);
+ s->set_configuration(c->output_size.w, c->output_size.h - 200);
+ s->set_destination_rectangle(0, 100, c->output_size.w,
+ c->output_size.h - 200);
+ } else {
+ // s->set_source_rectangle(0, 0, c->output_size.w, c->output_size.h);
+ s->set_configuration(c->output_size.w, c->output_size.h);
+ s->set_destination_rectangle(0, 0, c->output_size.w,
+ c->output_size.h);
+ }
s->set_visibility(1);
c->layers[layer_id]->add_surface(s.get());
- logdebug("Surface %u now fullscreen on layer %u", surface_id,
+ logdebug("Surface %u now on layer %u", surface_id,
layer_id);
});
}