diff --git a/ChangeLog b/ChangeLog index 65dd501b4..999e8eaed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-02-21 Emmanuele Bassi + + * clutter/x11/clutter-event-x11.c (event_translate): Ignore + ConfigureNotify events if we are painting on a foreign window. + + * clutter/x11/clutter-stage-x11.c: + (clutter_stage_x11_request_coords): Reliquish control of the + window size, if we are painting on a foreign window. This fixes + the GtkClutterEmbed widget. + 2008-02-20 Emmanuele Bassi * clutter/clutter-timeline.c (clutter_timeline_set_delay): Relax diff --git a/clutter/x11/clutter-event-x11.c b/clutter/x11/clutter-event-x11.c index 8181358c7..5f142f538 100644 --- a/clutter/x11/clutter-event-x11.c +++ b/clutter/x11/clutter-event-x11.c @@ -383,21 +383,22 @@ event_translate (ClutterBackend *backend, switch (xevent->type) { case ConfigureNotify: - { - guint stage_width, stage_height; + if (!stage_x11->is_foreign_xwin) + { + guint stage_width, stage_height; - clutter_actor_get_size (CLUTTER_ACTOR (stage), - &stage_width, - &stage_height); + clutter_actor_get_size (CLUTTER_ACTOR (stage), + &stage_width, + &stage_height); - if (xevent->xconfigure.width != stage_width || - xevent->xconfigure.height != stage_height) - { - clutter_actor_set_size (CLUTTER_ACTOR (stage), - xevent->xconfigure.width, - xevent->xconfigure.height); - } - } + if (xevent->xconfigure.width != stage_width || + xevent->xconfigure.height != stage_height) + { + clutter_actor_set_size (CLUTTER_ACTOR (stage), + xevent->xconfigure.width, + xevent->xconfigure.height); + } + } res = FALSE; break; diff --git a/clutter/x11/clutter-stage-x11.c b/clutter/x11/clutter-stage-x11.c index f8262db4d..f5c97e919 100644 --- a/clutter/x11/clutter-stage-x11.c +++ b/clutter/x11/clutter-stage-x11.c @@ -179,7 +179,8 @@ clutter_stage_x11_request_coords (ClutterActor *self, stage_x11->xwin_width = new_width; stage_x11->xwin_height = new_height; - if (stage_x11->xwin != None) + if (stage_x11->xwin != None && + !stage_x11->is_foreign_xwin) { XResizeWindow (stage_x11->xdpy, stage_x11->xwin, @@ -199,7 +200,8 @@ clutter_stage_x11_request_coords (ClutterActor *self, CLUTTER_SET_PRIVATE_FLAGS(self, CLUTTER_ACTOR_SYNC_MATRICES); } - if (stage_x11->xwin != None) /* Do we want to bother ? */ + if (stage_x11->xwin != None && + !stage_x11->is_foreign_xwin) /* Do we want to bother ? */ XMoveWindow (stage_x11->xdpy, stage_x11->xwin, CLUTTER_UNITS_TO_INT (box->x1),