Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 84702
Collapse All | Expand All

(-)src/window.h (+2 lines)
Lines 109-114 Link Here
109
  /* Whether we're maximized */
109
  /* Whether we're maximized */
110
  guint maximized : 1;
110
  guint maximized : 1;
111
  guint maximize_after_placement : 1;
111
  guint maximize_after_placement : 1;
112
  guint maximize_horizontally : 1;
113
  guint maximize_vertically : 1;
112
114
113
  /* Whether we're shaded */
115
  /* Whether we're shaded */
114
  guint shaded : 1;
116
  guint shaded : 1;
(-)src/window.c (-1 / +75 lines)
Lines 429-434 Link Here
429
  
429
  
430
  window->maximized = FALSE;
430
  window->maximized = FALSE;
431
  window->maximize_after_placement = FALSE;
431
  window->maximize_after_placement = FALSE;
432
  window->maximize_horizontally = FALSE;
433
  window->maximize_vertically = FALSE;
432
  window->fullscreen = FALSE;
434
  window->fullscreen = FALSE;
433
  window->on_all_workspaces = FALSE;
435
  window->on_all_workspaces = FALSE;
434
  window->shaded = FALSE;
436
  window->shaded = FALSE;
Lines 2884-2889 Link Here
2884
    }
2886
    }
2885
  
2887
  
2886
  meta_window_refresh_resize_popup (window);
2888
  meta_window_refresh_resize_popup (window);
2889
  if ( window->maximize_vertically )
2890
		  window->maximize_vertically = FALSE;
2891
  if ( window->maximize_horizontally )
2892
		  window->maximize_horizontally = FALSE;
2887
  
2893
  
2888
  /* Invariants leaving this function are:
2894
  /* Invariants leaving this function are:
2889
   *   a) window->rect and frame->rect reflect the actual
2895
   *   a) window->rect and frame->rect reflect the actual
Lines 3001-3006 Link Here
3001
void
3007
void
3002
meta_window_fill_horizontal (MetaWindow  *window)
3008
meta_window_fill_horizontal (MetaWindow  *window)
3003
{
3009
{
3010
  if (!window->maximize_horizontally) {		
3004
  MetaRectangle work_area;
3011
  MetaRectangle work_area;
3005
  int x, y, w, h;
3012
  int x, y, w, h;
3006
  
3013
  
Lines 3009-3014 Link Here
3009
  w = window->rect.width;
3016
  w = window->rect.width;
3010
  h = window->rect.height;
3017
  h = window->rect.height;
3011
  
3018
  
3019
  meta_window_save_rect (window);
3012
  meta_window_get_work_area_current_xinerama (window, &work_area);
3020
  meta_window_get_work_area_current_xinerama (window, &work_area);
3013
  
3021
  
3014
  x = work_area.x;
3022
  x = work_area.x;
Lines 3024-3042 Link Here
3024
                           x, y, w, h);
3032
                           x, y, w, h);
3025
3033
3026
  check_maximize_to_work_area (window, &work_area);
3034
  check_maximize_to_work_area (window, &work_area);
3035
  window->maximize_horizontally = TRUE;
3036
  }
3037
  else{
3038
      window->maximize_horizontally = FALSE;
3039
3040
      /* When we unmaximize, if we're doing a mouse move also we could
3041
       * get the window suddenly jumping to the upper left corner of
3042
       * the workspace, since that's where it was when the grab op
3043
       * started.  So we need to update the grab state.
3044
       */
3045
      if (meta_grab_op_is_moving (window->display->grab_op) &&
3046
          window->display->grab_window == window)
3047
        {
3048
          window->display->grab_anchor_window_pos = window->saved_rect;
3049
        }
3050
3051
      meta_window_move_resize (window,
3052
                               TRUE,
3053
                               window->saved_rect.x,
3054
                               window->saved_rect.y,
3055
                               window->saved_rect.width,
3056
                               window->saved_rect.height);
3057
3058
      if (window->display->grab_wireframe_active)
3059
        {
3060
          window->display->grab_wireframe_rect = window->saved_rect;
3061
        }
3062
3063
      recalc_window_features (window);
3064
      set_net_wm_state (window);
3065
    }
3027
}
3066
}
3028
3067
3029
void
3068
void
3030
meta_window_fill_vertical (MetaWindow  *window)
3069
meta_window_fill_vertical (MetaWindow  *window)
3031
{
3070
{
3071
  if (!window->maximize_vertically) {		
3032
  MetaRectangle work_area;
3072
  MetaRectangle work_area;
3033
  int x, y, w, h;
3073
  int x, y, w, h;
3034
  
3074
3035
  meta_window_get_user_position (window, &x, &y);
3075
  meta_window_get_user_position (window, &x, &y);
3036
3076
3037
  w = window->rect.width;
3077
  w = window->rect.width;
3038
  h = window->rect.height;
3078
  h = window->rect.height;
3039
3079
3080
  meta_window_save_rect (window);
3040
  meta_window_get_work_area_current_xinerama (window, &work_area);
3081
  meta_window_get_work_area_current_xinerama (window, &work_area);
3041
3082
3042
  y = work_area.y;
3083
  y = work_area.y;
Lines 3052-3057 Link Here
3052
                           x, y, w, h);
3093
                           x, y, w, h);
3053
3094
3054
  check_maximize_to_work_area (window, &work_area);
3095
  check_maximize_to_work_area (window, &work_area);
3096
  window->maximize_vertically = TRUE;
3097
  
3098
  }
3099
  else
3100
  {
3101
      window->maximize_vertically = FALSE;
3102
3103
      /* When we unmaximize, if we're doing a mouse move also we could
3104
       * get the window suddenly jumping to the upper left corner of
3105
       * the workspace, since that's where it was when the grab op
3106
       * started.  So we need to update the grab state.
3107
       */
3108
      if (meta_grab_op_is_moving (window->display->grab_op) &&
3109
          window->display->grab_window == window)
3110
        {
3111
          window->display->grab_anchor_window_pos = window->saved_rect;
3112
        }
3113
3114
      meta_window_move_resize (window,
3115
                               TRUE,
3116
                               window->saved_rect.x,
3117
                               window->saved_rect.y,
3118
                               window->saved_rect.width,
3119
                               window->saved_rect.height);
3120
3121
      if (window->display->grab_wireframe_active)
3122
        {
3123
          window->display->grab_wireframe_rect = window->saved_rect;
3124
        }
3125
3126
      recalc_window_features (window);
3127
      set_net_wm_state (window);
3128
  }
3055
}
3129
}
3056
3130
3057
static guint move_resize_idle = 0;
3131
static guint move_resize_idle = 0;

Return to bug 84702