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>
|
Wed Feb 15 14:47:50 2006 Søren Sandmann <sandmann@redhat.com>
|
||||||
|
|
||||||
* src/compositor.c (meta_compositor_unminimize): Add unused wobbly
|
* src/compositor.c (meta_compositor_unminimize): Add unused wobbly
|
||||||
|
@ -90,6 +90,8 @@ free_window_hash_value (void *v)
|
|||||||
}
|
}
|
||||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||||
|
|
||||||
|
static WsDisplay *compositor_display;
|
||||||
|
|
||||||
MetaCompositor*
|
MetaCompositor*
|
||||||
meta_compositor_new (MetaDisplay *display)
|
meta_compositor_new (MetaDisplay *display)
|
||||||
{
|
{
|
||||||
@ -98,9 +100,11 @@ meta_compositor_new (MetaDisplay *display)
|
|||||||
|
|
||||||
compositor = g_new0 (MetaCompositor, 1);
|
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);
|
getenv ("METACITY_SYNC") != NULL);
|
||||||
|
|
||||||
ws_display_init_test (compositor->display);
|
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);
|
g_print ("metacity queueing repaint for %p\n", node);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (!scr_info)
|
||||||
|
{
|
||||||
|
/* compositor has been turned off */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!scr_info->idle_id)
|
if (!scr_info->idle_id)
|
||||||
{
|
{
|
||||||
scr_info->idle_id = g_idle_add (update, screen);
|
scr_info->idle_id = g_idle_add (update, screen);
|
||||||
@ -941,7 +951,7 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
|
|||||||
Atom cm_sn_atom;
|
Atom cm_sn_atom;
|
||||||
char buf[128];
|
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->compositor_nodes = NULL;
|
||||||
scr_info->idle_id = 0;
|
scr_info->idle_id = 0;
|
||||||
|
|
||||||
@ -993,6 +1003,9 @@ meta_compositor_unmanage_screen (MetaCompositor *compositor,
|
|||||||
{
|
{
|
||||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||||
ScreenInfo *scr_info = screen->compositor_data;
|
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)
|
if (!compositor->enabled)
|
||||||
return; /* no extension */
|
return; /* no extension */
|
||||||
@ -1004,7 +1017,13 @@ meta_compositor_unmanage_screen (MetaCompositor *compositor,
|
|||||||
meta_compositor_remove_window (compositor,
|
meta_compositor_remove_window (compositor,
|
||||||
WS_RESOURCE (node->drawable)->xid);
|
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 */
|
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||||
}
|
}
|
||||||
@ -1980,4 +1999,23 @@ meta_compositor_delete_window (MetaCompositor *compositor,
|
|||||||
g_idle_add (blow_up, info);
|
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
|
#endif
|
||||||
|
@ -67,5 +67,7 @@ void
|
|||||||
meta_compositor_set_updates (MetaCompositor *compositor,
|
meta_compositor_set_updates (MetaCompositor *compositor,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
gboolean updates);
|
gboolean updates);
|
||||||
|
void
|
||||||
|
meta_compositor_destroy (MetaCompositor *compositor);
|
||||||
|
|
||||||
#endif /* META_COMPOSITOR_H */
|
#endif /* META_COMPOSITOR_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user