mirror of
https://github.com/brl/mutter.git
synced 2025-02-12 19:34:10 +00:00
ClutterX11TexturePixmap: Fix unbalanced error trapping
I think this is what commit 2cf140550635 intended to do since it specifically mentioned cleaning up the trap in clutter_x11_texture_pixmap_set_pixmap, but although it moved the untrap to only be done in the case where Pixmap != None it left the position of the trap itself unchanged. This meant the error trapping wouldn't be balanced if pixmap == None since the untrap wouldn't be done. We now only trap and untrap around the XGetGeometry call done when pixmap != None. http://bugzilla.clutter-project.org/show_bug.cgi?id=2303
This commit is contained in:
parent
089a20e79d
commit
bcf20955d3
@ -797,8 +797,6 @@ clutter_x11_texture_pixmap_set_pixmap (ClutterX11TexturePixmap *texture,
|
|||||||
|
|
||||||
priv = texture->priv;
|
priv = texture->priv;
|
||||||
|
|
||||||
clutter_x11_trap_x_errors ();
|
|
||||||
|
|
||||||
/* Get rid of the existing Cogl texture early because it may try to
|
/* Get rid of the existing Cogl texture early because it may try to
|
||||||
use the pixmap which we might destroy */
|
use the pixmap which we might destroy */
|
||||||
material = clutter_texture_get_cogl_material (CLUTTER_TEXTURE (texture));
|
material = clutter_texture_get_cogl_material (CLUTTER_TEXTURE (texture));
|
||||||
@ -807,6 +805,7 @@ clutter_x11_texture_pixmap_set_pixmap (ClutterX11TexturePixmap *texture,
|
|||||||
|
|
||||||
if (pixmap != None)
|
if (pixmap != None)
|
||||||
{
|
{
|
||||||
|
clutter_x11_trap_x_errors ();
|
||||||
status = XGetGeometry (clutter_x11_get_default_display(),
|
status = XGetGeometry (clutter_x11_get_default_display(),
|
||||||
(Drawable)pixmap,
|
(Drawable)pixmap,
|
||||||
&root,
|
&root,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user