2008-02-21 Emmanuele Bassi <ebassi@openedhand.com>

* 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.
This commit is contained in:
Emmanuele Bassi 2008-02-21 12:17:01 +00:00
parent 6e9c4de9ad
commit cbf1b90895
3 changed files with 28 additions and 15 deletions

View File

@ -1,3 +1,13 @@
2008-02-21 Emmanuele Bassi <ebassi@openedhand.com>
* 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 <ebassi@openedhand.com>
* clutter/clutter-timeline.c (clutter_timeline_set_delay): Relax

View File

@ -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;

View File

@ -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),