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

« back to all changes in this revision

Viewing changes to .pc/104_workarea_union.patch/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:
835
835
{
836
836
  MetaWorkspaceLayout layout;  
837
837
  int i, current_space, num_workspaces;
838
 
  gboolean ltr, cycle;
 
838
  gboolean ltr;
839
839
 
840
 
  cycle = meta_prefs_get_workspace_switcher_keyboard_cycle ();
841
840
  current_space = meta_workspace_index (workspace);
842
841
  num_workspaces = meta_screen_get_n_workspaces (workspace->screen);
843
842
  meta_screen_calc_workspace_layout (workspace->screen, num_workspaces,
864
863
      break;
865
864
    }
866
865
 
867
 
  if (cycle)
868
 
    {
869
 
      /* right to left */
870
 
      if (layout.current_col < 0)
871
 
        {
872
 
          layout.current_col = layout.cols - 1;
873
 
          if (layout.rows > 1)
874
 
            {
875
 
              /* first row */
876
 
              if (layout.current_row == 0)
877
 
                layout.current_row = layout.rows - 1;
878
 
              else
879
 
                layout.current_row -= 1;
880
 
            }
881
 
        }
882
 
 
883
 
      /* left to right */
884
 
      if (layout.current_col >= layout.cols)
885
 
        {
886
 
          layout.current_col = 0;
887
 
 
888
 
          if (layout.rows > 1)
889
 
            {
890
 
              /* last row */
891
 
              if (layout.current_row == (layout.rows -1))
892
 
                layout.current_row = 0;
893
 
              else
894
 
                layout.current_row += 1;
895
 
            }
896
 
        }
897
 
      if (layout.current_row < 0)
898
 
        layout.current_row = 0;
899
 
      if (layout.current_row >= layout.rows)
900
 
        layout.current_row = layout.rows - 1;
901
 
    }
902
 
  else
903
 
    {
904
 
      if (layout.current_col < 0)
905
 
        layout.current_col = 0;
906
 
      if (layout.current_col >= layout.cols)
907
 
        layout.current_col = layout.cols - 1;
908
 
      if (layout.current_row < 0)
909
 
        layout.current_row = 0;
910
 
      if (layout.current_row >= layout.rows)
911
 
        layout.current_row = layout.rows - 1;
912
 
    }
 
866
  if (layout.current_col < 0)
 
867
    layout.current_col = 0;
 
868
  if (layout.current_col >= layout.cols)
 
869
    layout.current_col = layout.cols - 1;
 
870
  if (layout.current_row < 0)
 
871
    layout.current_row = 0;
 
872
  if (layout.current_row >= layout.rows)
 
873
    layout.current_row = layout.rows - 1;
913
874
 
914
875
  i = layout.grid[layout.current_row * layout.cols + layout.current_col];
915
876
 
946
907
    }
947
908
 
948
909
 
949
 
  if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK ||
 
910
  if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK ||
950
911
      !workspace->screen->display->mouse_mode)
951
912
    focus_ancestor_or_mru_window (workspace, not_this_one, timestamp);
952
913
  else
984
945
                                                     window);
985
946
            }
986
947
        }
987
 
      else if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_SLOPPY)
 
948
      else if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_SLOPPY)
988
949
        focus_ancestor_or_mru_window (workspace, not_this_one, timestamp);
989
 
      else if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_MOUSE ||
990
 
               meta_prefs_get_focus_mode () == META_FOCUS_MODE_STRICT)
 
950
      else if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_MOUSE)
991
951
        {
992
952
          meta_topic (META_DEBUG_FOCUS,
993
953
                      "Setting focus to no_focus_window, since no valid "
1043
1003
          meta_window_focus (ancestor, timestamp);
1044
1004
 
1045
1005
          /* Also raise the window if in click-to-focus */
1046
 
          if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
 
1006
          if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK)
1047
1007
            meta_window_raise (ancestor);
1048
1008
 
1049
1009
          return;
1089
1049
      meta_window_focus (window, timestamp);
1090
1050
 
1091
1051
      /* Also raise the window if in click-to-focus */
1092
 
      if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
 
1052
      if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK)
1093
1053
        meta_window_raise (window);
1094
1054
    }
1095
1055
  else