From cbf1b90895f18b628fc6514670b363c04da85fa7 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 21 Feb 2008 12:17:01 +0000 Subject: [PATCH] 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. --- ChangeLog | 10 ++++++++++ clutter/x11/clutter-event-x11.c | 27 ++++++++++++++------------- clutter/x11/clutter-stage-x11.c | 6 ++++-- 3 files changed, 28 insertions(+), 15 deletions(-) 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),