[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg
Subject: =?UTF-8?B?WGxpYjogY2FwdHVyZSBzY3JlZW4gaW4gc2VwYXJhdGUgeHNlcnZlciBzZXNz?= =?UTF-8?B?aW9u?=
From: Alex Sviridov <ooo_saturn7 () mail ! ru>
Date: 2017-02-07 18:47:43
Message-ID: 1486493263.856872222 () f256 ! i ! mail ! ru
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
[Attachment #4 (text/plain)]
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
[Attachment #5 (text/html)]
<HTML><BODY>Hi all.<br><br>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<br><br> startx some-program<br>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. <br><br>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).<br><br>This is my code of \
some-program using which I capture screen:<br><br> Display* display \
= XOpenDisplay(NULL);<br> Window root = \
DefaultRootWindow(display);<br> XWindowAttributes attributes = \
{0};<br> XGetWindowAttributes(display, root, \
&attributes);<br> int width, height;<br> \
width = attributes.width;<br> height = \
attributes.height;<br> XImage* img = XGetImage(display, root, 0, 0 \
, width, height, AllPlanes, ZPixmap);<br> ...<br> \
XDestroyImage(img);<br><br>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).<br><br><br>-- <br>Alex Sviridov</BODY></HTML>
[Attachment #6 (text/plain)]
_______________________________________________
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic