Hi all.
I need to run some-program which makes screen capturing via xlib library in
separate xserver session. So, I start my ubuntu 14 and `origin` xserver session
(lets call it this way) starts. After that I run
startx some-program
After running this command a black screen appears and on this black screen I
see my program and it works as expected. That's ok - this is what I need.
However, firstly I want to continue using my computer and secondly I must run N
such programs in N separate xserver sessions. The problem is that when I try to
return to my `origin` session by pressing ctrl+alt+f7 some-program continues
working however, its screen captures become simple black rectangles (no any
content).
This is my code of some-program using which I capture screen:
Display* display = XOpenDisplay(NULL);
Window root = DefaultRootWindow(display);
XWindowAttributes attributes = {0};
XGetWindowAttributes(display, root, &attributes);
int width, height;
width = attributes.width;
height = attributes.height;
XImage* img = XGetImage(display, root, 0, 0 , width, height, AllPlanes,
ZPixmap);
...
XDestroyImage(img);
Could anyone say what should I do in order to capture screen in separate
xserver session while it is not active (the user is using another xsession).
--
Alex Sviridov
_______________________________________________
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s