~ubuntu-branches/ubuntu/precise/xterm/precise-updates

« back to all changes in this revision

Viewing changes to scrollbar.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2011-02-10 18:48:37 UTC
  • mto: (1.4.11 upstream) (11.1.24 sid)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: james.westby@ubuntu.com-20110210184837-zr6xtudedxk969gp
ImportĀ upstreamĀ versionĀ 268

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $XTermId: scrollbar.c,v 1.173 2010/06/15 22:47:34 tom Exp $ */
 
1
/* $XTermId: scrollbar.c,v 1.179 2011/02/09 10:05:19 tom Exp $ */
2
2
 
3
3
/*
4
 
 * Copyright 2000-2009,2010 by Thomas E. Dickey
 
4
 * Copyright 2000-2010,2011 by Thomas E. Dickey
5
5
 *
6
6
 *                         All Rights Reserved
7
7
 *
174
174
    /* These are obsolete, but old clients may use them */
175
175
    xw->hints.width = MaxCols(screen) * FontWidth(screen) + xw->hints.min_width;
176
176
    xw->hints.height = MaxRows(screen) * FontHeight(screen) + xw->hints.min_height;
 
177
#if OPT_MAXIMIZE
 
178
    /* assure single-increment resize for fullscreen */
 
179
    if (xw->screen.fullscreen) {
 
180
        xw->hints.width_inc = 1;
 
181
        xw->hints.height_inc = 1;
 
182
    }
 
183
#endif /* OPT_MAXIMIZE */
177
184
#endif
178
185
 
179
 
    XSetWMNormalHints(screen->display, XtWindow(SHELL_OF(xw)), &xw->hints);
 
186
    XSetWMNormalHints(screen->display, VShellWindow(xw), &xw->hints);
180
187
 
181
188
    reqWidth = (Dimension) (MaxCols(screen) * FontWidth(screen) + min_wide);
182
189
    reqHeight = (Dimension) (MaxRows(screen) * FontHeight(screen) + min_high);
183
190
 
 
191
#if OPT_MAXIMIZE
 
192
    /* compensate for fullscreen mode */
 
193
    if (screen->fullscreen) {
 
194
        Screen *xscreen = DefaultScreenOfDisplay(xw->screen.display);
 
195
        reqWidth = (Dimension) WidthOfScreen(xscreen);
 
196
        reqHeight = (Dimension) HeightOfScreen(xscreen);
 
197
        ScreenResize(xw, reqWidth, reqHeight, &xw->flags);
 
198
    }
 
199
#endif /* OPT_MAXIMIZE */
 
200
 
184
201
    TRACE(("...requesting screensize chars %dx%d, pixels %dx%d\n",
185
202
           MaxRows(screen),
186
203
           MaxCols(screen),
213
230
        xw->hints.height = repHeight;
214
231
        xw->hints.width = repWidth;
215
232
        TRACE_HINTS(&xw->hints);
216
 
        XSetWMNormalHints(screen->display, VShellWindow, &xw->hints);
 
233
        XSetWMNormalHints(screen->display, VShellWindow(xw), &xw->hints);
217
234
    }
218
235
#endif
219
236
    XSync(screen->display, False);      /* synchronize */
583
600
    if (!a || !b)
584
601
        return 0;
585
602
 
586
 
    while (1) {
 
603
    for (;;) {
587
604
        ca = x_toupper(*a);
588
605
        cb = x_toupper(*b);
589
606
        if (ca != cb || ca == '\0')
900
917
    }
901
918
}
902
919
 
 
920
/* ARGSUSED */
903
921
void
904
922
HandleScrollLock(Widget w,
905
923
                 XEvent * event GCC_UNUSED,