[mutter/meego-1.0: 22/30] don't try to install colormaps for windows that do not have one, MB#21



commit 71a59ec3db2c88dd837074c7d34a53c2ab0f6916
Author: Tomas Frydrych <tf linux intel com>
Date:   Wed Apr 21 15:53:30 2010 +0100

    don't try to install colormaps for windows that do not have one, MB#21

 src/core/window.c |   22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 1d0ef90..e157e3a 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -5964,10 +5964,13 @@ meta_window_notify_focus (MetaWindow *window,
           if (window->frame)
             meta_frame_queue_draw (window->frame);
 
-          meta_error_trap_push (window->display);
-          XInstallColormap (window->display->xdisplay,
-                            window->colormap);
-          meta_error_trap_pop (window->display, FALSE);
+          if (window->colormap)
+            {
+              meta_error_trap_push (window->display);
+              XInstallColormap (window->display->xdisplay,
+                                window->colormap);
+              meta_error_trap_pop (window->display, FALSE);
+            }
 
           /* move into FOCUSED_WINDOW layer */
           meta_window_update_layer (window);
@@ -6021,10 +6024,13 @@ meta_window_notify_focus (MetaWindow *window,
           if (window->frame)
             meta_frame_queue_draw (window->frame);
 
-          meta_error_trap_push (window->display);
-          XUninstallColormap (window->display->xdisplay,
-                              window->colormap);
-          meta_error_trap_pop (window->display, FALSE);
+          if (window->colormap)
+            {
+              meta_error_trap_push (window->display);
+              XUninstallColormap (window->display->xdisplay,
+                                  window->colormap);
+              meta_error_trap_pop (window->display, FALSE);
+            }
 
           /* move out of FOCUSED_WINDOW layer */
           meta_window_update_layer (window);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]