Lines Matching defs:mga_xw
28 mga_xw_t mga_xw;
123 sigprocmask(SIG_BLOCK, &newprocmask, &mga_xw.xw_procmask);
131 sigprocmask(SIG_SETMASK, &mga_xw.xw_procmask, (sigset_t *) NULL);
166 XMapRaised(mga_xw.xw_display, mga_xw.xw_window);
170 (unsigned long) mga_xw.xw_window);
180 if (mga_xw.xw_display == NULL)
183 XUnmapWindow(mga_xw.xw_display, mga_xw.xw_window);
187 (unsigned long) mga_xw.xw_window);
207 if (mga_xw.xw_dispname == NULL)
208 mga_xw.xw_dispname = ":0.0";
210 if (mga_xw.xw_display == NULL) {
211 mga_xw.xw_display = XOpenDisplay(mga_xw.xw_dispname);
213 if (mga_xw.xw_display == NULL) {
217 mga_xw.xw_dispname);
225 mga_xw.xw_dispname, mga_xw.xw_display);
229 XSynchronize(mga_xw.xw_display, True);
242 register Window const root = RootWindow(mga_xw.xw_display,
243 mga_xw.xw_screen);
247 if (mga_xw.xw_cursor != 0)
250 emptypixmap = XCreateBitmapFromData(mga_xw.xw_display, root, "", 1, 1);
252 mga_xw.xw_cursor = XCreatePixmapCursor(mga_xw.xw_display,
259 (unsigned long) mga_xw.xw_cursor);
261 XFreePixmap(mga_xw.xw_display, emptypixmap);
271 register Window const root = RootWindow(mga_xw.xw_display,
272 mga_xw.xw_screen);
273 register int const width = DisplayWidth(mga_xw.xw_display,
274 mga_xw.xw_screen);
275 register int const height = DisplayHeight(mga_xw.xw_display,
276 mga_xw.xw_screen);
279 if (mga_xw.xw_window != NULL)
283 xswa.cursor = mga_xw.xw_cursor;
290 mga_xw.xw_window = XCreateWindow(mga_xw.xw_display,
303 (unsigned long) mga_xw.xw_window);
313 if (mga_xw.xw_grab_server == True)
316 mga_xw.xw_grab_server = XGrabServer(mga_xw.xw_display);
329 if (mga_xw.xw_grab_server != True)
332 mga_xw.xw_grab_server = !XUngrabServer(mga_xw.xw_display);
347 if (mga_xw.xw_grab_keyboard == True)
350 status = XGrabKeyboard(mga_xw.xw_display, mga_xw.xw_window,
352 mga_xw.xw_grab_keyboard = status == GrabSuccess;
356 (unsigned long) mga_xw.xw_window,
377 if (mga_xw.xw_grab_keyboard != True)
380 status = XUngrabKeyboard(mga_xw.xw_display, CurrentTime);
382 mga_xw.xw_grab_keyboard = False;
398 if (mga_xw.xw_grab_pointer == True)
401 status = XGrabPointer(mga_xw.xw_display, mga_xw.xw_window,
403 None, mga_xw.xw_cursor, CurrentTime);
405 mga_xw.xw_grab_pointer = status == GrabSuccess;
410 (unsigned long) mga_xw.xw_window,
433 if (mga_xw.xw_grab_pointer != True)
436 status = XUngrabPointer(mga_xw.xw_display, CurrentTime);
438 mga_xw.xw_grab_pointer = False;
452 XGetScreenSaver(mga_xw.xw_display,
453 &mga_xw.xw_ss_timeout,
454 &mga_xw.xw_ss_interval,
455 &mga_xw.xw_ss_prefer_blanking,
456 &mga_xw.xw_ss_allow_exposures);
458 mga_xw.xw_ss_saved = True;
462 mga_xw.xw_ss_timeout,
463 mga_xw.xw_ss_interval,
464 mga_xw.xw_ss_prefer_blanking,
465 mga_xw.xw_ss_allow_exposures);
469 XResetScreenSaver(mga_xw.xw_display);
471 mga_xw.xw_ss_disabled = True;
473 XSetScreenSaver(mga_xw.xw_display,
475 mga_xw.xw_ss_interval,
476 mga_xw.xw_ss_prefer_blanking,
477 mga_xw.xw_ss_allow_exposures);
482 mga_xw.xw_ss_interval,
483 mga_xw.xw_ss_prefer_blanking,
484 mga_xw.xw_ss_allow_exposures);
494 if (mga_xw.xw_ss_saved != True ||
495 mga_xw.xw_ss_disabled != True) {
496 mga_xw.xw_ss_disabled = False;
497 mga_xw.xw_ss_saved = False;
501 XSetScreenSaver(mga_xw.xw_display,
502 mga_xw.xw_ss_timeout,
503 mga_xw.xw_ss_interval,
504 mga_xw.xw_ss_prefer_blanking,
505 mga_xw.xw_ss_allow_exposures);
507 mga_xw.xw_ss_disabled = False;
511 mga_xw.xw_ss_timeout,
512 mga_xw.xw_ss_interval,
513 mga_xw.xw_ss_prefer_blanking,
514 mga_xw.xw_ss_allow_exposures);
516 mga_xw.xw_ss_saved = False;
533 status = DPMSQueryExtension(mga_xw.xw_display,
545 mga_xw.xw_dpms_saved = DPMSInfo(mga_xw.xw_display,
546 &mga_xw.xw_dpms_power, &mga_xw.xw_dpms_state);
550 mga_xw.xw_dpms_saved,
551 mga_xw.xw_dpms_power,
552 mga_xw.xw_dpms_state);
554 if (mga_xw.xw_dpms_saved != True ||
555 mga_xw.xw_dpms_state != True)
559 mga_xw.xw_dpms_disabled = True;
561 DPMSDisable(mga_xw.xw_display);
577 if (mga_xw.xw_dpms_saved != True ||
578 mga_xw.xw_dpms_disabled != True) {
579 mga_xw.xw_dpms_disabled = False;
580 mga_xw.xw_dpms_saved = False;
584 DPMSEnable(mga_xw.xw_display);
586 mga_xw.xw_dpms_disabled = False;
591 mga_xw.xw_dpms_saved = False;
629 signo = sigsetjmp(mga_xw.xw_sigjmpbuf, 1);
646 sigprocmask(SIG_SETMASK, &mga_xw.xw_procmask, &oldprocmask);
696 siglongjmp(mga_xw.xw_sigjmpbuf, signo);