~ubuntu-branches/ubuntu/precise/xorg-server/precise-updates

« back to all changes in this revision

Viewing changes to hw/xwin/wincreatewnd.c

Tags: 2:1.10.1-2
* Build xserver-xorg-core-udeb on hurd-i386.  Thanks, Samuel Thibault!
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
192
192
          fForceShowWindow = TRUE;
193
193
        } 
194
194
        dwWindowStyle |= WS_CAPTION;
195
 
        if (pScreenInfo->fScrollbars)
 
195
        if (pScreenInfo->iResizeMode != notAllowed)
196
196
            dwWindowStyle |= WS_THICKFRAME | WS_MAXIMIZEBOX;
197
197
    }
198
198
  else
233
233
      iPosY = rcWorkArea.top;
234
234
    }
235
235
 
 
236
  /* Clean up the scrollbars flag, if necessary */
 
237
  if ((!pScreenInfo->fDecoration
 
238
#ifdef XWIN_MULTIWINDOWEXTWM
 
239
       || pScreenInfo->fMWExtWM
 
240
#endif
 
241
       || pScreenInfo->fRootless
 
242
#ifdef XWIN_MULTIWINDOW
 
243
       || pScreenInfo->fMultiWindow
 
244
#endif
 
245
       )
 
246
      && (pScreenInfo->iResizeMode == resizeWithScrollbars))
 
247
    {
 
248
      /* We cannot have scrollbars if we do not have a window border */
 
249
      pScreenInfo->iResizeMode = notAllowed;
 
250
    }
 
251
 
236
252
  /* Did the user specify a height and width? */
237
253
  if (pScreenInfo->fUserGaveHeightAndWidth)
238
254
    {
256
272
#if CYGDEBUG
257
273
          winDebug ("winCreateBoundingWindowWindowed - Window has decoration\n");
258
274
#endif
259
 
          /* Are we using scrollbars? */
260
 
          if (pScreenInfo->fScrollbars)
 
275
 
 
276
          /* Are we resizable */
 
277
          if (pScreenInfo->iResizeMode != notAllowed)
261
278
            {
262
279
#if CYGDEBUG
263
 
              winDebug ("winCreateBoundingWindowWindowed - Window has "
264
 
                      "scrollbars\n");
 
280
              winDebug ("winCreateBoundingWindowWindowed - Window is resizable\n");
265
281
#endif
266
282
 
267
283
              iWidth += 2 * GetSystemMetrics (SM_CXSIZEFRAME);
271
287
          else
272
288
            {
273
289
#if CYGDEBUG
274
 
              winDebug ("winCreateBoundingWindowWindowed - Window does not have "
275
 
                      "scrollbars\n");
 
290
              winDebug ("winCreateBoundingWindowWindowed - Window is not resizable\n");
276
291
#endif
277
292
 
278
293
              iWidth += 2 * GetSystemMetrics (SM_CXFIXEDFRAME);
296
311
        }
297
312
    }
298
313
 
299
 
  /* Clean up the scrollbars flag, if necessary */
300
 
  if ((!pScreenInfo->fDecoration
301
 
#ifdef XWIN_MULTIWINDOWEXTWM
302
 
       || pScreenInfo->fMWExtWM
303
 
#endif
304
 
       || pScreenInfo->fRootless
305
 
#ifdef XWIN_MULTIWINDOW
306
 
       || pScreenInfo->fMultiWindow
307
 
#endif
308
 
       )
309
 
      && pScreenInfo->fScrollbars)
310
 
    {
311
 
      /* We cannot have scrollbars if we do not have a window border */
312
 
      pScreenInfo->fScrollbars = FALSE;
313
 
    }
314
 
 
 
314
  /* Make sure window is no bigger than work area */
315
315
  if (TRUE 
316
316
#ifdef XWIN_MULTIWINDOWEXTWM
317
317
       && !pScreenInfo->fMWExtWM
396
396
          rcClient.bottom, rcClient.top);
397
397
  
398
398
  /* We adjust the visual size if the user did not specify it */
399
 
  if (!(pScreenInfo->fScrollbars && pScreenInfo->fUserGaveHeightAndWidth))
 
399
  if (!((pScreenInfo->iResizeMode == resizeWithScrollbars) && pScreenInfo->fUserGaveHeightAndWidth))
400
400
    {
401
401
      /*
402
402
       * User did not give a height and width with scrollbars enabled,