Remove MetaCompositor virtualization
Now that we only have one compositor, there's no reason to access the compositor functions through a vtable. Remove the MetaCompositor virtualization and make the clutter code implement the meta_compositor_* functions directly. Move the checks for the compositor being NULL from the vtable wrappers to the calling code (most of them were already there, so just a few needed to be added) Note: the compositor is actually hard-coded on at the moment and the plan is to remove the non-composited code entirely, so the checks are added only to keep things neat: they have no practical effect. http://bugzilla.gnome.org/show_bug.cgi?id=581813
This commit is contained in:
@ -540,6 +540,9 @@ meta_workspace_activate_with_focus (MetaWorkspace *workspace,
|
||||
gint num_workspaces, current_space, new_space;
|
||||
MetaMotionDirection direction = 0;
|
||||
|
||||
if (!comp)
|
||||
return;
|
||||
|
||||
current_space = meta_workspace_index (old);
|
||||
new_space = meta_workspace_index (workspace);
|
||||
|
||||
@ -922,14 +925,17 @@ ensure_work_areas_validated (MetaWorkspace *workspace)
|
||||
/* We're all done, YAAY! Record that everything has been validated. */
|
||||
workspace->work_areas_invalid = FALSE;
|
||||
|
||||
/*
|
||||
* Notify the compositor that the workspace geometry has changed.
|
||||
*/
|
||||
MetaScreen *screen = workspace->screen;
|
||||
MetaDisplay *display = meta_screen_get_display (screen);
|
||||
MetaCompositor *comp = meta_display_get_compositor (display);
|
||||
{
|
||||
/*
|
||||
* Notify the compositor that the workspace geometry has changed.
|
||||
*/
|
||||
MetaScreen *screen = workspace->screen;
|
||||
MetaDisplay *display = meta_screen_get_display (screen);
|
||||
MetaCompositor *comp = meta_display_get_compositor (display);
|
||||
|
||||
meta_compositor_update_workspace_geometry (comp, workspace);
|
||||
if (comp)
|
||||
meta_compositor_update_workspace_geometry (comp, workspace);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user