コード例 #1
0
ファイル: compositor.c プロジェクト: MaximeMorel/mutter
void
meta_compositor_switch_workspace (MetaCompositor     *compositor,
                                  MetaWorkspace      *from,
                                  MetaWorkspace      *to,
                                  MetaMotionDirection direction)
{
  gint to_indx, from_indx;

  to_indx   = meta_workspace_index (to);
  from_indx = meta_workspace_index (from);

  compositor->switch_workspace_in_progress++;

  if (!meta_plugin_manager_switch_workspace (compositor->plugin_mgr,
                                             from_indx,
                                             to_indx,
                                             direction))
    {
      compositor->switch_workspace_in_progress--;

      /* We have to explicitely call this to fix up stacking order of the
       * actors; this is because the abs stacking position of actors does not
       * necessarily change during the window hiding/unhiding, only their
       * relative position toward the destkop window.
       */
      meta_finish_workspace_switch (compositor);
    }
}
コード例 #2
0
ファイル: compositor.c プロジェクト: nkoep/muffin
void
meta_compositor_switch_workspace (MetaCompositor     *compositor,
                                  MetaScreen         *screen,
                                  MetaWorkspace      *from,
                                  MetaWorkspace      *to,
                                  MetaMotionDirection direction)
{
    MetaCompScreen *info;
    gint            to_indx, from_indx;

    info      = meta_screen_get_compositor_data (screen);
    to_indx   = meta_workspace_index (to);
    from_indx = meta_workspace_index (from);

    DEBUG_TRACE ("meta_compositor_switch_workspace\n");

    if (!info) /* During startup before manage_screen() */
        return;

    info->switch_workspace_in_progress++;

    if (!info->plugin_mgr ||
            !meta_plugin_manager_switch_workspace (info->plugin_mgr,
                    from_indx,
                    to_indx,
                    direction))
    {
        info->switch_workspace_in_progress--;

        /* We have to explicitely call this to fix up stacking order of the
         * actors; this is because the abs stacking position of actors does not
         * necessarily change during the window hiding/unhiding, only their
         * relative position toward the destkop window.
         */
        meta_finish_workspace_switch (info);
    }
}