mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
Add code to destroy compositor. Implement unmanage_screen() functionality.
Wed Feb 15 18:42:03 2006 Søren Sandmann <sandmann@redhat.com> * src/compositor.[ch]: Add code to destroy compositor. Implement unmanage_screen() functionality.
This commit is contained in:
parent
ca539199b2
commit
0f48ff448c
@ -1,3 +1,8 @@
|
||||
Wed Feb 15 18:42:03 2006 Søren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* src/compositor.[ch]: Add code to destroy compositor. Implement
|
||||
unmanage_screen() functionality.
|
||||
|
||||
Wed Feb 15 14:47:50 2006 Søren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* src/compositor.c (meta_compositor_unminimize): Add unused wobbly
|
||||
|
@ -90,6 +90,8 @@ free_window_hash_value (void *v)
|
||||
}
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
static WsDisplay *compositor_display;
|
||||
|
||||
MetaCompositor*
|
||||
meta_compositor_new (MetaDisplay *display)
|
||||
{
|
||||
@ -98,9 +100,11 @@ meta_compositor_new (MetaDisplay *display)
|
||||
|
||||
compositor = g_new0 (MetaCompositor, 1);
|
||||
|
||||
compositor->display = ws_display_new (NULL);
|
||||
if (!compositor_display)
|
||||
compositor_display = ws_display_new (NULL);
|
||||
compositor->display = compositor_display;
|
||||
|
||||
ws_display_set_synchronize (compositor->display,
|
||||
ws_display_set_synchronize (compositor_display,
|
||||
getenv ("METACITY_SYNC") != NULL);
|
||||
|
||||
ws_display_init_test (compositor->display);
|
||||
@ -779,6 +783,12 @@ queue_repaint (CmDrawableNode *node, gpointer data)
|
||||
g_print ("metacity queueing repaint for %p\n", node);
|
||||
#endif
|
||||
|
||||
if (!scr_info)
|
||||
{
|
||||
/* compositor has been turned off */
|
||||
return;
|
||||
}
|
||||
|
||||
if (!scr_info->idle_id)
|
||||
{
|
||||
scr_info->idle_id = g_idle_add (update, screen);
|
||||
@ -941,7 +951,7 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
Atom cm_sn_atom;
|
||||
char buf[128];
|
||||
|
||||
scr_info->glw = ws_window_new_gl (root);
|
||||
scr_info->glw = ws_screen_get_gl_window (ws_screen);
|
||||
scr_info->compositor_nodes = NULL;
|
||||
scr_info->idle_id = 0;
|
||||
|
||||
@ -993,6 +1003,9 @@ meta_compositor_unmanage_screen (MetaCompositor *compositor,
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
ScreenInfo *scr_info = screen->compositor_data;
|
||||
WsScreen *ws_screen =
|
||||
ws_display_get_screen_from_number (compositor->display, screen->number);
|
||||
WsWindow *root = ws_screen_get_root_window (ws_screen);
|
||||
|
||||
if (!compositor->enabled)
|
||||
return; /* no extension */
|
||||
@ -1004,7 +1017,13 @@ meta_compositor_unmanage_screen (MetaCompositor *compositor,
|
||||
meta_compositor_remove_window (compositor,
|
||||
WS_RESOURCE (node->drawable)->xid);
|
||||
}
|
||||
/* FIXME: free scr_info */
|
||||
|
||||
ws_window_raise (scr_info->glw);
|
||||
|
||||
ws_window_unredirect_subwindows (root);
|
||||
ws_window_unmap (scr_info->glw);
|
||||
|
||||
screen->compositor_data = NULL;
|
||||
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
}
|
||||
@ -1980,4 +1999,23 @@ meta_compositor_delete_window (MetaCompositor *compositor,
|
||||
g_idle_add (blow_up, info);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
meta_compositor_destroy (MetaCompositor *compositor)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
GSList *list;
|
||||
|
||||
#if 0
|
||||
/* FIXME */
|
||||
ws_display_free (compositor->display);
|
||||
#endif
|
||||
|
||||
g_hash_table_destroy (compositor->window_hash);
|
||||
|
||||
g_free (compositor);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -67,5 +67,7 @@ void
|
||||
meta_compositor_set_updates (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
gboolean updates);
|
||||
void
|
||||
meta_compositor_destroy (MetaCompositor *compositor);
|
||||
|
||||
#endif /* META_COMPOSITOR_H */
|
||||
|
Loading…
Reference in New Issue
Block a user