projects
/
profile
/
ivi
/
weston-ivi-shell.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5b3b26
)
compositor: Recalculate fullscreen surface x,y in surface_attach
author
Benjamin Franzke
<benjaminfranzke@googlemail.com>
Tue, 26 Apr 2011 13:36:26 +0000
(15:36 +0200)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Tue, 26 Apr 2011 15:18:57 +0000
(11:18 -0400)
compositor/compositor.c
patch
|
blob
|
history
diff --git
a/compositor/compositor.c
b/compositor/compositor.c
index
c3c7de8
..
df25407
100644
(file)
--- a/
compositor/compositor.c
+++ b/
compositor/compositor.c
@@
-926,8
+926,16
@@
surface_attach(struct wl_client *client,
wlsc_buffer_attach(buffer, surface);
es->buffer = buffer;
- es->x += x;
- es->y += y;
+ switch (es->map_type) {
+ case WLSC_SURFACE_MAP_FULLSCREEN:
+ es->x = (es->fullscreen_output->width - es->width) / 2;
+ es->y = (es->fullscreen_output->height - es->height) / 2;
+ break;
+ default:
+ es->x += x;
+ es->y += y;
+ break;
+ }
es->width = buffer->width;
es->height = buffer->height;
if (x != 0 || y != 0)