diff options
author | Søren Sandmann <sandmann@redhat.com> | 2006-05-24 16:58:20 +0000 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@src.gnome.org> | 2006-05-24 16:58:20 +0000 |
commit | 3f4e194c8f5e618cd5e52e219f75bd57a140b453 (patch) | |
tree | e70eda51b3f69afb206af22640a2fb777b6fe349 /src/c-screen.c | |
parent | 22bc36eb3b6444c5901ca68b48ffe193983de335 (diff) | |
download | metacity-3f4e194c8f5e618cd5e52e219f75bd57a140b453.tar.gz |
return TRUE when the window is actually freed.
Wed May 24 12:57:32 2006 Søren Sandmann <sandmann@redhat.com>
* src/c-window.c (meta_comp_window_free): return TRUE when the
window is actually freed.
* src/compositor.c (do_effect): Disable updating before exploding
the window.
* src/c-window.c: Make MetaCompWindow refcounted.
* src/c-window.[ch]: New functions meta_comp_window_{show,hide}
* src/c-screen.c (meta_comp_screen_unmap): Call
meta_comp_window_hide() instead of directly setting the viewable
status of the node.
* src/c-screen.c (meta_comp_screen_remove_window): Only remove the
window when it is actually freed.
Diffstat (limited to 'src/c-screen.c')
-rw-r--r-- | src/c-screen.c | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/src/c-screen.c b/src/c-screen.c index 8d2b60ad..99032647 100644 --- a/src/c-screen.c +++ b/src/c-screen.c @@ -566,12 +566,14 @@ meta_comp_screen_remove_window (MetaCompScreen *info, if (comp_window) { - CmNode *node = meta_comp_window_get_node (comp_window); - - cm_stacker_remove_child (info->stacker, node); - meta_comp_window_free (comp_window); - - g_hash_table_remove (info->windows_by_xid, (gpointer)xwindow); + if (meta_comp_window_free (comp_window)) + { + CmNode *node = meta_comp_window_get_node (comp_window); + + cm_stacker_remove_child (info->stacker, node); + + g_hash_table_remove (info->windows_by_xid, (gpointer)xwindow); + } } } @@ -636,14 +638,10 @@ void meta_comp_screen_unmap (MetaCompScreen *info, Window xwindow) { - CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow)); - -#if 0 - g_print ("unmapping: %lx\n", xwindow); -#endif - - if (node) - cm_drawable_node_set_viewable (node, FALSE); + MetaCompWindow *window = find_comp_window (info, xwindow); + + if (window) + meta_comp_window_hide (window); } void @@ -657,14 +655,5 @@ meta_comp_screen_set_target_rect (MetaCompScreen *info, cm_drawable_node_set_scale_rect (node, rect); } -void -meta_comp_screen_hide_window (MetaCompScreen *info, - Window xwindow) -{ - CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow)); - - cm_drawable_node_set_viewable (node, FALSE); -} - #endif |