Lines Matching refs:dsp
171 Display *dsp = NULL; /* server display connection */
248 XGrabHosts(dsp)
249 Display *dsp;
251 XHosts = XListHosts(dsp, &HostAccessCount, &HostAccessState);
253 XRemoveHosts(dsp, XHosts, HostAccessCount);
254 XEnableAccessControl(dsp);
258 XUngrabHosts(dsp)
259 Display *dsp;
262 XAddHosts(dsp, XHosts, HostAccessCount);
266 XDisableAccessControl(dsp);
282 status = XGrabKeyboard(dsp, win[0], True,
286 status = XGrabKeyboard(dsp, win[0], True,
292 status = XGrabPointer(dsp, win[0], True, AllPointerEventMask,
297 status = XGrabPointer(dsp, win[0], True, AllPointerEventMask,
316 (void) XGrabPointer(dsp, win[0], True, AllPointerEventMask,
328 XSync(dsp, False);
330 XUngrabHosts(dsp);
331 XUngrabPointer(dsp, CurrentTime);
332 XUngrabKeyboard(dsp, CurrentTime);
334 XSetScreenSaver(dsp, sstimeout, ssinterval, ssblanking, ssexposures);
335 XFlush(dsp);
336 XCloseDisplay(dsp);
363 while (!XPending(dsp)) {
369 XFlush(dsp);
378 XNextEvent(dsp, &event);
398 if (XPending(dsp) > 100) { /* 100 is arbitrarily big enough */
401 status = XCheckMaskEvent(dsp,
404 XBell(dsp, 100);
415 XSync(dsp, True); /* flush input buffer */
418 XSetForeground(dsp, Scr[screen].gc, bgcol[screen].pixel);
426 XFillRectangle(dsp, win[screen], Scr[screen].gc,
430 XDrawString(dsp, win[screen], textgc[screen],
438 if (XPending(dsp) > 100) { /* 100 is arbitrarily big enough */
441 status = XCheckMaskEvent(dsp,
444 XBell(dsp, 100);
458 XRaiseWindow(dsp, win[screen]);
536 Screen *scr = ScreenOfDisplay(dsp, screen);
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);
564 XSetForeground(dsp, Scr[screen].gc, bgcol[screen].pixel);
566 XFillRectangle(dsp, win[screen], Scr[screen].gc,
571 XDrawString(dsp, win[screen], textgc[screen],
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]);
887 XDrawString(dsp, win[screen], textgc[screen],
889 XDrawString(dsp, win[screen], textgc[screen],
891 XDrawString(dsp, win[screen], textgc[screen],
897 XDrawString(dsp, win[screen], textgc[screen],
902 XFlush(dsp);
1050 XSync(dsp, True); /* flush input buffer */
1056 XFillRectangle(dsp, win[screen], Scr[screen].gc,
1085 XUnmapWindow(dsp, icon[screen]);
1098 while (!XPending(dsp)) {
1101 XFlush(dsp);
1104 XNextEvent(dsp, &event);
1107 XRaiseWindow(dsp, event.xany.window);
1111 if (event.xbutton.root == RootWindow(dsp, screen))
1114 XPutBackEvent(dsp, &event);
1154 XGrabHosts(dsp);
1191 font = XLoadQueryFont(dsp, fontname);
1195 font = XLoadQueryFont(dsp, FALLBACK_FONTNAME);
1206 screens = ScreenCount(dsp);
1211 Screen *scr = ScreenOfDisplay(dsp, screen);
1212 Visual *vis = XDefaultVisual(dsp, screen);
1216 cmap = XCreateColormap(dsp, root[screen], vis, AllocNone);
1218 XAllocNamedColor(dsp, cmap, "White", &sswhite[screen], &tmp);
1219 XAllocNamedColor(dsp, cmap, "Black", &ssblack[screen], &tmp);
1222 if (!XAllocNamedColor(dsp, cmap, background,
1224 XAllocNamedColor(dsp, cmap, "White", &bgcol[screen], &tmp);
1226 if (!XAllocNamedColor(dsp, cmap, foreground,
1228 XAllocNamedColor(dsp, cmap, "Black", &fgcol[screen], &tmp);
1240 if (!XAllocNamedColor(dsp, cmap, background,
1243 XAllocNamedColor(dsp, cmap, "White", &bgcol[screen], &tmp);
1245 if (!XAllocNamedColor(dsp, cmap, foreground,
1248 XAllocNamedColor(dsp, cmap, "Black", &fgcol[screen], &tmp);
1261 if (!XAllocColor(dsp, cmap, &xcolor))
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;
1303 icon[screen] = XCreateWindow(dsp, win[screen],
1309 XMapWindow(dsp, win[screen]);
1310 XRaiseWindow(dsp, win[screen]);
1311 XInstallColormap(dsp, cmap);
1315 Scr[screen].gc = XCreateGC(dsp, win[screen],
1321 textgc[screen] = XCreateGC(dsp, win[screen],
1324 lockc = XCreateBitmapFromData(dsp, root[0], no_bits, 1, 1);
1325 lockm = XCreateBitmapFromData(dsp, root[0], no_bits, 1, 1);
1326 mycursor = XCreatePixmapCursor(dsp, lockc, lockm,
1328 passwdcursor = XCreateFontCursor(dsp, XC_left_ptr);
1329 XFreePixmap(dsp, lockc);
1330 XFreePixmap(dsp, lockm);
1334 XGetScreenSaver(dsp, &sstimeout, &ssinterval,
1336 XSetScreenSaver(dsp, 0, 0, 0, 0); /* disable screen saver */