~ubuntu-branches/ubuntu/raring/metacity/raring

« back to all changes in this revision

Viewing changes to src/core/workspace.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2012-08-23 11:12:43 UTC
  • mfrom: (1.2.64) (2.1.13 quantal-proposed)
  • Revision ID: package-import@ubuntu.com-20120823111243-v2ome3yisozc1dhw
* Resync with Debian & refresh patches. (LP: #1032120, LP: #1035261)
  Remaining changes:
* debian/control:
  - Suggest gnome-themes-standard instead of recommend
  - Add Vcs-Bzr link
* debian/metacity-common.gsettings-override:
  - Set Ubuntu default button layout order for Classic session
  - Drop previous gconf overrides as obsolete
* debian/patches/04_support_drag_drop_with_alt_tab.patch:
  - Support alt-tab during drag and drop.
* debian/patches/05_raise_on_click_for_click_mode.patch:
  - Use raise on click option.
* debian/patches/06_Add_UXD_shadows_and_borders.patch:
  - patch for a new key in the ubuntu theme for shows and borders
* debian/patches/10_no-ws-switcher.patch:
  - Don't show the workspace switcher if we only have one.
* debian/patches/12_dont-show-as-user.patch:
  - Don't show "as user" in title bar.
* debian/patches/13_better_support_for_button_layout.patch:
  - Corrected support for buttons backgrounds with transparency
* debian/patches/14_wrong_colormap.patch:
  - Use correct colormap to avoid crash with client side decorations
* debian/patches/20_do-not-place-windows-over-the-launcher.patch:
  - Try to avoid an already visible launcher in intellihide mode when
    initially positioning new windows.
* debian/patches/21_fix_compositing_startup.patch:
  Fix some weird rendering effect at startup with compositing activated
* debian/patches/100_fade_on_long_title.patch:
  - Fade on the end if the title is too long.
* debian/patches/102_workarea.patch,
  debian/patches/103_struts_in_the_middle.patch,
  debian/patches/104_workarea_union.patch:
  - Add barriers and multimonitor strut support for unity-2d
* debian/patches/104_workarea_union.patch:
  - Ensure each screen_region generated by
    meta_rectangle_get_minimal_spanning_set_for_region is not outside
    the xinerama screens
* Dropped patch:
  - 11_hide_tooltip_on_decorator.patch: Obsolete
* debian/patches/03_strict_focus.patch:
  - Disabled. This needs gsettings-desktop-schemas to be patched if
    we want to bring this back
* Disabled Unity 2D-related patches that need porting to gsettings:
  - 15_show_maximized_titlebars.patch
  - 16-capture-before-unmap.patch
  - 17-workspace-switcher-cycle.patch
  - 18-auto-maximize-windows.patch
  - 19_add_unity_hud_configuration.patch
  - 101_override_gconf_settings.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
849
849
{
850
850
  MetaWorkspaceLayout layout;  
851
851
  int i, current_space, num_workspaces;
852
 
  gboolean ltr, cycle;
 
852
  gboolean ltr;
853
853
 
854
 
  cycle = meta_prefs_get_workspace_switcher_keyboard_cycle ();
855
854
  current_space = meta_workspace_index (workspace);
856
855
  num_workspaces = meta_screen_get_n_workspaces (workspace->screen);
857
856
  meta_screen_calc_workspace_layout (workspace->screen, num_workspaces,
878
877
      break;
879
878
    }
880
879
 
881
 
  if (cycle)
882
 
    {
883
 
      /* right to left */
884
 
      if (layout.current_col < 0)
885
 
        {
886
 
          layout.current_col = layout.cols - 1;
887
 
          if (layout.rows > 1)
888
 
            {
889
 
              /* first row */
890
 
              if (layout.current_row == 0)
891
 
                layout.current_row = layout.rows - 1;
892
 
              else
893
 
                layout.current_row -= 1;
894
 
            }
895
 
        }
896
 
 
897
 
      /* left to right */
898
 
      if (layout.current_col >= layout.cols)
899
 
        {
900
 
          layout.current_col = 0;
901
 
 
902
 
          if (layout.rows > 1)
903
 
            {
904
 
              /* last row */
905
 
              if (layout.current_row == (layout.rows -1))
906
 
                layout.current_row = 0;
907
 
              else
908
 
                layout.current_row += 1;
909
 
            }
910
 
        }
911
 
      if (layout.current_row < 0)
912
 
        layout.current_row = 0;
913
 
      if (layout.current_row >= layout.rows)
914
 
        layout.current_row = layout.rows - 1;
915
 
    }
916
 
  else
917
 
    {
918
 
      if (layout.current_col < 0)
919
 
        layout.current_col = 0;
920
 
      if (layout.current_col >= layout.cols)
921
 
        layout.current_col = layout.cols - 1;
922
 
      if (layout.current_row < 0)
923
 
        layout.current_row = 0;
924
 
      if (layout.current_row >= layout.rows)
925
 
        layout.current_row = layout.rows - 1;
926
 
    }
 
880
  if (layout.current_col < 0)
 
881
    layout.current_col = 0;
 
882
  if (layout.current_col >= layout.cols)
 
883
    layout.current_col = layout.cols - 1;
 
884
  if (layout.current_row < 0)
 
885
    layout.current_row = 0;
 
886
  if (layout.current_row >= layout.rows)
 
887
    layout.current_row = layout.rows - 1;
927
888
 
928
889
  i = layout.grid[layout.current_row * layout.cols + layout.current_col];
929
890
 
960
921
    }
961
922
 
962
923
 
963
 
  if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK ||
 
924
  if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK ||
964
925
      !workspace->screen->display->mouse_mode)
965
926
    focus_ancestor_or_mru_window (workspace, not_this_one, timestamp);
966
927
  else
998
959
                                                     window);
999
960
            }
1000
961
        }
1001
 
      else if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_SLOPPY)
 
962
      else if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_SLOPPY)
1002
963
        focus_ancestor_or_mru_window (workspace, not_this_one, timestamp);
1003
 
      else if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_MOUSE ||
1004
 
               meta_prefs_get_focus_mode () == META_FOCUS_MODE_STRICT)
 
964
      else if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_MOUSE)
1005
965
        {
1006
966
          meta_topic (META_DEBUG_FOCUS,
1007
967
                      "Setting focus to no_focus_window, since no valid "
1057
1017
          meta_window_focus (ancestor, timestamp);
1058
1018
 
1059
1019
          /* Also raise the window if in click-to-focus */
1060
 
          if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
 
1020
          if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK)
1061
1021
            meta_window_raise (ancestor);
1062
1022
 
1063
1023
          return;
1103
1063
      meta_window_focus (window, timestamp);
1104
1064
 
1105
1065
      /* Also raise the window if in click-to-focus */
1106
 
      if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
 
1066
      if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK)
1107
1067
        meta_window_raise (window);
1108
1068
    }
1109
1069
  else