Lines Matching refs:ast_xw

28 ast_xw_t ast_xw;
122 sigprocmask(SIG_BLOCK, &newprocmask, &ast_xw.xw_procmask);
130 sigprocmask(SIG_SETMASK, &ast_xw.xw_procmask, (sigset_t *)NULL);
152 XMapRaised(ast_xw.xw_display, ast_xw.xw_window);
156 (ulong_t)ast_xw.xw_window);
171 XSync(ast_xw.xw_display, False);
182 if (ast_xw.xw_display == NULL)
185 XUnmapWindow(ast_xw.xw_display, ast_xw.xw_window);
189 (ulong_t)ast_xw.xw_window);
201 XSync(ast_xw.xw_display, False);
213 if (ast_xw.xw_dispname == NULL)
214 ast_xw.xw_dispname = ":0.0";
216 if (ast_xw.xw_display == NULL) {
217 ast_xw.xw_display = XOpenDisplay(ast_xw.xw_dispname);
219 if (ast_xw.xw_display == NULL) {
223 ast_xw.xw_dispname);
231 ast_xw.xw_dispname, ast_xw.xw_display);
235 XSynchronize(ast_xw.xw_display, True);
248 register Window const root = RootWindow(ast_xw.xw_display,
249 ast_xw.xw_screen);
253 if (ast_xw.xw_cursor != 0)
256 emptypixmap = XCreateBitmapFromData(ast_xw.xw_display, root, "", 1, 1);
258 ast_xw.xw_cursor = XCreatePixmapCursor(ast_xw.xw_display,
265 (ulong_t)ast_xw.xw_cursor);
267 XFreePixmap(ast_xw.xw_display, emptypixmap);
277 register Window const root = RootWindow(ast_xw.xw_display,
278 ast_xw.xw_screen);
279 register int const width = DisplayWidth(ast_xw.xw_display,
280 ast_xw.xw_screen);
281 register int const height = DisplayHeight(ast_xw.xw_display,
282 ast_xw.xw_screen);
285 if (ast_xw.xw_window != NULL)
289 xswa.cursor = ast_xw.xw_cursor;
296 ast_xw.xw_window = XCreateWindow(ast_xw.xw_display,
309 (ulong_t)ast_xw.xw_window);
311 XStoreName(ast_xw.xw_display, ast_xw.xw_window, "libvtsSUNWast");
321 if (ast_xw.xw_grab_server == True)
324 ast_xw.xw_grab_server = XGrabServer(ast_xw.xw_display);
337 if (ast_xw.xw_grab_server != True)
340 ast_xw.xw_grab_server = !XUngrabServer(ast_xw.xw_display);
355 if (ast_xw.xw_grab_keyboard == True)
358 status = XGrabKeyboard(ast_xw.xw_display, ast_xw.xw_window,
360 ast_xw.xw_grab_keyboard = status == GrabSuccess;
364 (ulong_t)ast_xw.xw_window,
385 if (ast_xw.xw_grab_keyboard != True)
388 status = XUngrabKeyboard(ast_xw.xw_display, CurrentTime);
390 ast_xw.xw_grab_keyboard = False;
405 if (ast_xw.xw_grab_pointer == True)
408 status = XGrabPointer(ast_xw.xw_display, ast_xw.xw_window,
410 None, ast_xw.xw_cursor, CurrentTime);
412 ast_xw.xw_grab_pointer = status == GrabSuccess;
417 (ulong_t)ast_xw.xw_window,
440 if (ast_xw.xw_grab_pointer != True)
443 status = XUngrabPointer(ast_xw.xw_display, CurrentTime);
445 ast_xw.xw_grab_pointer = False;
459 XGetScreenSaver(ast_xw.xw_display,
460 &ast_xw.xw_ss_timeout,
461 &ast_xw.xw_ss_interval,
462 &ast_xw.xw_ss_prefer_blanking,
463 &ast_xw.xw_ss_allow_exposures);
465 ast_xw.xw_ss_saved = True;
469 ast_xw.xw_ss_timeout,
470 ast_xw.xw_ss_interval,
471 ast_xw.xw_ss_prefer_blanking,
472 ast_xw.xw_ss_allow_exposures);
476 XResetScreenSaver(ast_xw.xw_display);
478 ast_xw.xw_ss_disabled = True;
480 XSetScreenSaver(ast_xw.xw_display,
482 ast_xw.xw_ss_interval,
483 ast_xw.xw_ss_prefer_blanking,
484 ast_xw.xw_ss_allow_exposures);
489 ast_xw.xw_ss_interval,
490 ast_xw.xw_ss_prefer_blanking,
491 ast_xw.xw_ss_allow_exposures);
501 if (ast_xw.xw_ss_saved != True ||
502 ast_xw.xw_ss_disabled != True) {
503 ast_xw.xw_ss_disabled = False;
504 ast_xw.xw_ss_saved = False;
508 XSetScreenSaver(ast_xw.xw_display,
509 ast_xw.xw_ss_timeout,
510 ast_xw.xw_ss_interval,
511 ast_xw.xw_ss_prefer_blanking,
512 ast_xw.xw_ss_allow_exposures);
514 ast_xw.xw_ss_disabled = False;
518 ast_xw.xw_ss_timeout,
519 ast_xw.xw_ss_interval,
520 ast_xw.xw_ss_prefer_blanking,
521 ast_xw.xw_ss_allow_exposures);
523 ast_xw.xw_ss_saved = False;
540 status = DPMSQueryExtension(ast_xw.xw_display,
552 ast_xw.xw_dpms_saved = DPMSInfo(ast_xw.xw_display,
553 &ast_xw.xw_dpms_power, &ast_xw.xw_dpms_state);
557 ast_xw.xw_dpms_saved,
558 ast_xw.xw_dpms_power,
559 ast_xw.xw_dpms_state);
561 if (ast_xw.xw_dpms_saved != True ||
562 ast_xw.xw_dpms_state != True)
566 ast_xw.xw_dpms_disabled = True;
568 DPMSDisable(ast_xw.xw_display);
584 if (ast_xw.xw_dpms_saved != True ||
585 ast_xw.xw_dpms_disabled != True) {
586 ast_xw.xw_dpms_disabled = False;
587 ast_xw.xw_dpms_saved = False;
591 DPMSEnable(ast_xw.xw_display);
593 ast_xw.xw_dpms_disabled = False;
598 ast_xw.xw_dpms_saved = False;
635 signo = sigsetjmp(ast_xw.xw_sigjmpbuf, 1);
652 sigprocmask(SIG_SETMASK, &ast_xw.xw_procmask, &oldprocmask);
704 siglongjmp(ast_xw.xw_sigjmpbuf, signo);
740 if (ast_xw.xw_display == NULL)
743 while (XPending(ast_xw.xw_display)) {
744 XNextEvent(ast_xw.xw_display, &event);