Lines Matching refs:screen
24 * xlock.c - X11 client to lock a display and show a screen saver.
60 * 28-Oct-90: center prompt screen.
82 * added -screensaver (don't disable screen saver) for the paranoid.
123 * Added screen saver override.
172 int screen; /* current screen */
177 static Window win[MAXSCREENS]; /* window used to cover screen */
182 static XColor bgcol[MAXSCREENS];/* background of text screen */
183 XColor ssblack[MAXSCREENS];/* black color for screen saver screen */
184 XColor sswhite[MAXSCREENS];/* white color for screen saver screen */
195 static int sstimeout; /* screen saver parameters */
351 int thisscreen = screen;
354 for (screen = 0; screen < screens; screen++)
355 if (thisscreen == screen)
356 init(icon[screen]);
358 init(win[screen]);
364 for (screen = 0; screen < screens; screen++)
365 if (thisscreen == screen)
366 callback(icon[screen]);
368 callback(win[screen]);
372 screen = thisscreen;
377 screen = thisscreen;
418 XSetForeground(dsp, Scr[screen].gc, bgcol[screen].pixel);
426 XFillRectangle(dsp, win[screen], Scr[screen].gc,
430 XDrawString(dsp, win[screen], textgc[screen],
449 if (((XButtonEvent *) & event)->window == icon[screen]) {
458 XRaiseWindow(dsp, win[screen]);
536 Screen *scr = ScreenOfDisplay(dsp, screen);
538 left = iconx[screen] + ICONW + font->max_bounds.width;
539 y = icony[screen] + font->ascent + font->ascent + font->descent + 2;
541 XSetForeground(dsp, Scr[screen].gc, bgcol[screen].pixel);
543 XFillRectangle(dsp, win[screen], Scr[screen].gc,
547 XDrawString(dsp, win[screen], textgc[screen],
549 XDrawString(dsp, win[screen], textgc[screen],
560 Screen *scr = ScreenOfDisplay(dsp, screen);
562 y = icony[screen] + ICONH + font->ascent + 2;
564 XSetForeground(dsp, Scr[screen].gc, bgcol[screen].pixel);
566 XFillRectangle(dsp, win[screen], Scr[screen].gc,
567 iconx[screen], y - font->ascent,
568 WIDTH - iconx[screen],
571 XDrawString(dsp, win[screen], textgc[screen],
572 iconx[screen], y, infoMsg, strlen(infoMsg));
669 /* Audit start of screen lock -- equivalent to logout ;-) */
693 * audit_unlock - audit screen unlock
873 XGetWindowAttributes(dsp, win[screen], &xgwa);
877 XSetForeground(dsp, Scr[screen].gc, bgcol[screen].pixel);
878 XFillRectangle(dsp, win[screen], Scr[screen].gc,
881 XMapWindow(dsp, icon[screen]);
882 XRaiseWindow(dsp, icon[screen]);
884 left = iconx[screen] + ICONW + font->max_bounds.width;
885 y = icony[screen] + font->ascent;
887 XDrawString(dsp, win[screen], textgc[screen],
889 XDrawString(dsp, win[screen], textgc[screen],
891 XDrawString(dsp, win[screen], textgc[screen],
895 y = icony[screen] - (font->descent + 2);
897 XDrawString(dsp, win[screen], textgc[screen],
898 iconx[screen], y, text_info, strlen(text_info));
904 y = icony[screen] + ICONH + font->ascent + 2
1056 XFillRectangle(dsp, win[screen], Scr[screen].gc,
1085 XUnmapWindow(dsp, icon[screen]);
1095 for (screen = 0; screen < screens; screen++)
1096 init(win[screen]);
1099 for (screen = 0; screen < screens; screen++)
1100 callback(win[screen]);
1110 for (screen = 0; screen < screens; screen++)
1111 if (event.xbutton.root == RootWindow(dsp, screen))
1209 for (screen = 0; screen < screens; screen++) {
1211 Screen *scr = ScreenOfDisplay(dsp, screen);
1212 Visual *vis = XDefaultVisual(dsp, screen);
1214 root[screen] = RootWindowOfScreen(scr);
1216 cmap = XCreateColormap(dsp, root[screen], vis, AllocNone);
1218 XAllocNamedColor(dsp, cmap, "White", &sswhite[screen], &tmp);
1219 XAllocNamedColor(dsp, cmap, "Black", &ssblack[screen], &tmp);
1223 &bgcol[screen], &tmp)) {
1224 XAllocNamedColor(dsp, cmap, "White", &bgcol[screen], &tmp);
1227 &fgcol[screen], &tmp)) {
1228 XAllocNamedColor(dsp, cmap, "Black", &fgcol[screen], &tmp);
1230 Scr[screen].pixels[0] = fgcol[screen].pixel;
1231 Scr[screen].pixels[1] = bgcol[screen].pixel;
1232 Scr[screen].npixels = 2;
1241 &bgcol[screen], &tmp)) {
1243 XAllocNamedColor(dsp, cmap, "White", &bgcol[screen], &tmp);
1246 &fgcol[screen], &tmp)) {
1248 XAllocNamedColor(dsp, cmap, "Black", &fgcol[screen], &tmp);
1252 Scr[screen].npixels = 0;
1264 Scr[screen].pixels[i] = xcolor.pixel;
1265 Scr[screen].npixels++;
1268 fprintf(stderr, "%d pixels allocated\n", Scr[screen].npixels);
1272 xswa.background_pixel = ssblack[screen].pixel;
1276 win[screen] = XCreateWindow(dsp, root[screen], 0, 0, WIDTH, HEIGHT, 0,
1286 XChangeProperty(dsp, win[screen],
1292 iconx[screen] = (DisplayWidth(dsp, screen) -
1295 icony[screen] = DisplayHeight(dsp, screen) / 6;
1297 xswa.border_pixel = fgcol[screen].pixel;
1298 xswa.background_pixel = bgcol[screen].pixel;
1303 icon[screen] = XCreateWindow(dsp, win[screen],
1304 iconx[screen], icony[screen],
1309 XMapWindow(dsp, win[screen]);
1310 XRaiseWindow(dsp, win[screen]);
1313 xgcv.foreground = sswhite[screen].pixel;
1314 xgcv.background = ssblack[screen].pixel;
1315 Scr[screen].gc = XCreateGC(dsp, win[screen],
1318 xgcv.foreground = fgcol[screen].pixel;
1319 xgcv.background = bgcol[screen].pixel;
1321 textgc[screen] = XCreateGC(dsp, win[screen],
1327 &fgcol[screen], &bgcol[screen], 0, 0);
1336 XSetScreenSaver(dsp, 0, 0, 0, 0); /* disable screen saver */