mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
2007-03-23 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/glx/clutter-stage-glx.c: (clutter_stage_glx_allocate_coords): Make sure the top-left corner of the box is our origin.
This commit is contained in:
parent
810661f612
commit
064d45266a
@ -1,3 +1,9 @@
|
||||
2007-03-23 Emmanuele Bassi <ebassi@openedhand.com>
|
||||
|
||||
* clutter/glx/clutter-stage-glx.c:
|
||||
(clutter_stage_glx_allocate_coords): Make sure the top-left
|
||||
corner of the box is our origin.
|
||||
|
||||
2007-03-23 Matthew Allum <mallum@openedhand.com>
|
||||
|
||||
* clutter/glx/clutter-stage-glx.c:
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "clutter-group.h"
|
||||
#include "clutter-main.h"
|
||||
#include "clutter-private.h"
|
||||
#include "clutter-debug.h"
|
||||
#include "clutter-marshal.h"
|
||||
#include "clutter-enum-types.h"
|
||||
|
||||
@ -68,6 +69,8 @@ clutter_group_paint (ClutterActor *actor)
|
||||
ClutterGroup *self = CLUTTER_GROUP(actor);
|
||||
GList *child_item;
|
||||
|
||||
CLUTTER_NOTE (PAINT, "ClutterGroup paint enter");
|
||||
|
||||
glPushMatrix();
|
||||
|
||||
for (child_item = self->priv->children;
|
||||
@ -83,6 +86,8 @@ clutter_group_paint (ClutterActor *actor)
|
||||
}
|
||||
|
||||
glPopMatrix();
|
||||
|
||||
CLUTTER_NOTE (PAINT, "ClutterGroup paint leave");
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -100,6 +100,16 @@ clutter_stage_delete_event (ClutterStage *stage,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_stage_paint (ClutterActor *actor)
|
||||
{
|
||||
/* chain up */
|
||||
CLUTTER_NOTE (PAINT, "Chaining up to parent class paint");
|
||||
|
||||
if (CLUTTER_ACTOR_CLASS (clutter_stage_parent_class)->paint)
|
||||
CLUTTER_ACTOR_CLASS (clutter_stage_parent_class)->paint (actor);
|
||||
}
|
||||
|
||||
static void
|
||||
clutter_stage_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
@ -185,11 +195,14 @@ static void
|
||||
clutter_stage_class_init (ClutterStageClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
|
||||
ClutterStageClass *stage_class = CLUTTER_STAGE_CLASS (klass);
|
||||
|
||||
gobject_class->set_property = clutter_stage_set_property;
|
||||
gobject_class->get_property = clutter_stage_get_property;
|
||||
|
||||
actor_class->paint = clutter_stage_paint;
|
||||
|
||||
stage_class->delete_event = clutter_stage_delete_event;
|
||||
|
||||
/**
|
||||
|
@ -214,7 +214,7 @@ clutter_stage_glx_realize (ClutterActor *actor)
|
||||
|
||||
if (stage_glx->xwin == None)
|
||||
{
|
||||
CLUTTER_NOTE (MISC, "XCreateSimpleWindow");
|
||||
CLUTTER_NOTE (MISC, "Creating stage X window");
|
||||
stage_glx->xwin = XCreateSimpleWindow (stage_glx->xdpy,
|
||||
stage_glx->xwin_root,
|
||||
0, 0,
|
||||
@ -238,7 +238,7 @@ clutter_stage_glx_realize (ClutterActor *actor)
|
||||
if (stage_glx->gl_context)
|
||||
glXDestroyContext (stage_glx->xdpy, stage_glx->gl_context);
|
||||
|
||||
CLUTTER_NOTE (GL, "glXCreateContext");
|
||||
CLUTTER_NOTE (GL, "Creating GL Context");
|
||||
stage_glx->gl_context = glXCreateContext (stage_glx->xdpy,
|
||||
stage_glx->xvisinfo,
|
||||
0,
|
||||
@ -360,13 +360,9 @@ clutter_stage_glx_paint (ClutterActor *self)
|
||||
ClutterColor stage_color;
|
||||
static GTimer *timer = NULL;
|
||||
static guint timer_n_frames = 0;
|
||||
static ClutterActorClass *parent_class = NULL;
|
||||
|
||||
CLUTTER_NOTE (PAINT, " Redraw enter");
|
||||
|
||||
if (!parent_class)
|
||||
parent_class = g_type_class_peek_parent (CLUTTER_STAGE_GET_CLASS (stage));
|
||||
|
||||
if (clutter_get_show_fps ())
|
||||
{
|
||||
if (!timer)
|
||||
@ -383,7 +379,8 @@ clutter_stage_glx_paint (ClutterActor *self)
|
||||
glDisable (GL_LIGHTING);
|
||||
glDisable (GL_DEPTH_TEST);
|
||||
|
||||
parent_class->paint (self);
|
||||
if (CLUTTER_ACTOR_CLASS (clutter_stage_glx_parent_class)->paint)
|
||||
CLUTTER_ACTOR_CLASS (clutter_stage_glx_parent_class)->paint (self);
|
||||
|
||||
if (stage_glx->xwin)
|
||||
{
|
||||
@ -417,10 +414,9 @@ clutter_stage_glx_allocate_coords (ClutterActor *self,
|
||||
{
|
||||
ClutterStageGlx *stage_glx = CLUTTER_STAGE_GLX (self);
|
||||
|
||||
box->x1 = box->y1 = 0;
|
||||
box->x2 = box->x1 + stage_glx->xwin_width;
|
||||
box->y2 = box->y1 + stage_glx->xwin_height;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user