MCPcopy Create free account
hub / github.com/VirtualGL/virtualgl / VirtualWin

Method VirtualWin

server/VirtualWin.cpp:48–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46// ancestor, and information specific to its corresponding X window
47
48VirtualWin::VirtualWin(Display *dpy_, Window win) :
49 VirtualDrawable(dpy_, win)
50{
51 eventdpy = NULL;
52 oldDraw = NULL; newWidth = newHeight = -1;
53 x11trans = NULL;
54 #ifdef USEXV
55 xvtrans = NULL;
56 #endif
57 vglconn = NULL;
58 profGamma.setName("Gamma ");
59 profAnaglyph.setName("Anaglyph ");
60 profPassive.setName("Stereo Gen");
61 syncdpy = false;
62 dirty = false;
63 rdirty = false;
64 fconfig_setdefaultsfromdpy(dpy);
65 plugin = NULL;
66 deletedByWM = false;
67 handleWMDelete = false;
68 newConfig = false;
69 swapInterval = 0;
70 alreadyWarnedPluginRenderMode = false;
71 XWindowAttributes xwa;
72 if(!XGetWindowAttributes(dpy, win, &xwa) || !xwa.visual)
73 throw(Error(__FUNCTION__, "Invalid window", -1));
74 if(!fconfig.wm && !(xwa.your_event_mask & StructureNotifyMask))
75 {
76 if(!(eventdpy = _XOpenDisplay(DisplayString(dpy))))
77 THROW("Could not clone X display connection");
78 XSelectInput(eventdpy, win, StructureNotifyMask);
79 if(fconfig.verbose)
80 vglout.println("[VGL] Selecting structure notify events in window 0x%.8x",
81 win);
82 }
83 stereoVisual = false;
84 if(edpy == EGL_NO_DISPLAY)
85 stereoVisual = glxvisual::visAttrib(dpy, DefaultScreen(dpy),
86 xwa.visual->visualid, GLX_STEREO);
87}
88
89
90VirtualWin::~VirtualWin(void)

Callers

nothing calls this directly

Calls 5

visAttribFunction · 0.85
setNameMethod · 0.80
printlnMethod · 0.80
ErrorClass · 0.50

Tested by

no test coverage detected