From 72bdcccf26aabd85f0b2e998596522543a779777 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 25 Jun 2008 13:52:17 +0000 Subject: [PATCH] 2008-06-25 Emmanuele Bassi * clutter/eglnative/clutter-stage-egl.c: (clutter_stage_egl_realize): Try to force the minimum and natural size on realization. --- ChangeLog | 6 ++++++ clutter/eglnative/clutter-stage-egl.c | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/ChangeLog b/ChangeLog index 79b2e3c33..c9f4713bd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-06-25 Emmanuele Bassi + + * clutter/eglnative/clutter-stage-egl.c: + (clutter_stage_egl_realize): Try to force the minimum and + natural size on realization. + 2008-06-25 Emmanuele Bassi * clutter/clutter-backend.c: diff --git a/clutter/eglnative/clutter-stage-egl.c b/clutter/eglnative/clutter-stage-egl.c index a581771ed..ba4078c7d 100644 --- a/clutter/eglnative/clutter-stage-egl.c +++ b/clutter/eglnative/clutter-stage-egl.c @@ -86,6 +86,8 @@ clutter_stage_egl_realize (ClutterActor *actor) #endif /* HAVE_COGL_GLES2 */ EGL_NONE }; + ClutterUnit widthu, heightu; + status = eglGetConfigs (backend_egl->edpy, configs, 2, @@ -153,6 +155,22 @@ clutter_stage_egl_realize (ClutterActor *actor) stage_egl->surface_width, stage_egl->surface_height); + widthu = CLUTTER_UNITS_FROM_DEVICE (stage_egl->surface_width); + heightu = CLUTTER_UNITS_FROM_DEVICE (stage_egl->surface_height); + + CLUTTER_NOTE (BACKEND, "Setting minimum and natural width and height " + "to the EGL surface width and height"); + + g_object_set (G_OBJECT (stage_egl), + "min-width", widthu, + "min-width-set", TRUE, + "natural-width", widthu, + "natural-width-set", TRUE, + "min-height", heightu, + "min-height-set", TRUE, + "natural-height", heightu, + "natural-height-set", TRUE, + NULL); if (G_UNLIKELY (backend_egl->egl_context == NULL)) {