~muktupavels/metacity/adwaita-icon-theme-lp-1414613

« back to all changes in this revision

Viewing changes to src/stack.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2005-12-13 23:03:47 UTC
  • mto: (2.2.1 sid) (1.4.2)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20051213230347-8dnaprp18n18dz1y
Tags: upstream-2.13.5
ImportĀ upstreamĀ versionĀ 2.13.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 * Copyright (C) 2001 Havoc Pennington
5
5
 * Copyright (C) 2002, 2003 Red Hat, Inc.
6
6
 * Copyright (C) 2004 Rob Adams
 
7
 * Copyright (C) 2004, 2005 Elijah Newren
7
8
 * 
8
9
 * This program is free software; you can redistribute it and/or
9
10
 * modify it under the terms of the GNU General Public License as
200
201
{
201
202
  int i;
202
203
 
203
 
  if (window->rect.width >= window->screen->width &&
204
 
      window->rect.height >= window->screen->height)
 
204
  if (meta_rectangle_could_fit_rect (&window->rect, &window->screen->rect))
205
205
    {
206
206
      /* we use the work area since windows that try to
207
207
       * position at 0,0 will get pushed down by menu panel
209
209
      MetaRectangle workarea;
210
210
      
211
211
      meta_window_get_work_area_current_xinerama (window, &workarea);
212
 
      if (window->rect.x <= workarea.x &&
213
 
          window->rect.y <= workarea.y &&
214
 
          window->rect.x + window->rect.width >= workarea.x + workarea.width &&
215
 
          window->rect.y + window->rect.height >= workarea.y + workarea.height) 
 
212
      if (meta_rectangle_contains_rect (&window->rect, &workarea))
216
213
        return TRUE;
217
214
    }
218
215
  
219
216
  i = 0;
220
217
  while (i < window->screen->n_xinerama_infos)
221
218
    {
222
 
      if (window->rect.width >= window->screen->xinerama_infos[i].width &&
223
 
          window->rect.height >= window->screen->xinerama_infos[i].height)
 
219
      if (meta_rectangle_could_fit_rect (&window->rect,
 
220
                                         &window->screen->xinerama_infos[i].rect))
224
221
        {
225
222
          MetaRectangle workarea;
226
223
          
227
224
          meta_window_get_work_area_current_xinerama (window, &workarea);
228
 
          if (window->rect.x <= workarea.x &&
229
 
              window->rect.y <= workarea.y &&
230
 
              window->rect.x + window->rect.width >= workarea.x + workarea.width &&
231
 
              window->rect.y + window->rect.height >= workarea.y + workarea.height) 
 
225
          if (meta_rectangle_contains_rect (&window->rect, &workarea))
232
226
            return TRUE;
233
227
        }
234
228