Beispiel #1
0
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);
    }
}
Beispiel #2
0
void
meta_switch_workspace_completed (MetaCompositor *compositor)
{
  /* FIXME -- must redo stacking order */
  compositor->switch_workspace_in_progress--;
  if (compositor->switch_workspace_in_progress < 0)
    {
      g_warning ("Error in workspace_switch accounting!");
      compositor->switch_workspace_in_progress = 0;
    }

  if (!compositor->switch_workspace_in_progress)
    meta_finish_workspace_switch (compositor);
}
Beispiel #3
0
LOCAL_SYMBOL void
meta_switch_workspace_completed (MetaScreen *screen)
{
    MetaCompScreen *info = meta_screen_get_compositor_data (screen);

    /* FIXME -- must redo stacking order */
    info->switch_workspace_in_progress--;
    if (info->switch_workspace_in_progress < 0)
    {
        g_warning ("Error in workspace_switch accounting!");
        info->switch_workspace_in_progress = 0;
    }

    if (!info->switch_workspace_in_progress)
        meta_finish_workspace_switch (info);
}
Beispiel #4
0
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);
    }
}