How can I get data from dialog of window?

107 Views Asked by At

I am a newbie in Xlib world. In my project,I want to share my window to another via Remote desktop protocol, but they only saw content of window and didn't see anything if click on menu item of window. I used XGetImage to get data of specifies window. But If that window contain dialog ( see image here) I couldn't get data of dialog . I use freeRDP source code, I modify in X11_shadow.c function:

int x11_shadow_screen_grab(x11ShadowSubsystem* subsystem){
...
 image = XGetImage(subsystem->display, 58720435, 0, 0, surface->width, 
 surface->height, AllPlanes,ZPixmap); //with 58720435 is window id of chrome
... }

In my opinion, the most important here is how can I get data of dialog in Window. I have a solution : 1. get window id of that dialog ( I am not sure the dialog has owner Window ID) 2. Use XGetImage get data of that dialog. But It's not working. I works on Linux environment. Are there any solutions for my problems?

Thank you very much

0

There are 0 best solutions below