Irek Szczesniak | 8 Mar 2005 20:05
Favicon

how to tell a window is completely redrawn?

Hello,

I need to wait for a window to be completely redrawn, and then take a
picture of it with XGetImage.  This window is not mine, and the only
thing I know about it is its ID.

How can I tell that the X server has compeletly redrawn the window?

I would appreciate your time and advice.

Thank you,
Irek
Deron Johnson | 8 Mar 2005 22:08
Picon

Re: how to tell a window is completely redrawn?

XGetImage ensures that all pending rendering has made it out to the
screen. So you shouldn't need to do anything extra if the XGetImage
is inside the program which is doing the drawing.

However, if the XGetImage is in another process from the one doing
the drawing, you'll have to establish your own interprocess
communication protocol for the app to tell your XGetImage process
when it has flushed its final drawing request to the X server.

In general, if you want to make sure that the rendering of an
arbitrary X request has been written to the frame buffer, you
simply need to do an XFlush followed by an XGetImage of one
pixel from the window. This is sufficient to ensure that the contents
of all rendering queues (including those in the DDX and the hardware
itself) have been flushed out to the frame buffer.

Irek Szczesniak wrote:
> Hello,
> 
> I need to wait for a window to be completely redrawn, and then take a
> picture of it with XGetImage.  This window is not mine, and the only
> thing I know about it is its ID.
> 
> How can I tell that the X server has compeletly redrawn the window?
> 
> I would appreciate your time and advice.
> 
> 
> Thank you,
> Irek
(Continue reading)

Irek Szczesniak | 9 Mar 2005 00:34
Favicon

Re: how to tell a window is completely redrawn?

Thank you for your e-mail!  I appreciate your advice.

On Tue, 8 Mar 2005, Deron Johnson wrote:

> However, if the XGetImage is in another process from the one doing
> the drawing, you'll have to establish your own interprocess
> communication protocol for the app to tell your XGetImage process
> when it has flushed its final drawing request to the X server.

I have no way of establishing such a communication.  These
applications do not know that I want to take pictures of their
windows.  Modifying the applications and recompiling them is not
possible.

> In general, if you want to make sure that the rendering of an
> arbitrary X request has been written to the frame buffer, you simply
> need to do an XFlush followed by an XGetImage of one pixel from the
> window. This is sufficient to ensure that the contents of all
> rendering queues (including those in the DDX and the hardware
> itself) have been flushed out to the frame buffer.

Based on what you wrote, I tested this:

XMapRaised(dpy, window);
XFlush(dpy);

image = XGetImage (dpy, window, x, y, 1, 1, AllPlanes, format);
image = XGetImage (dpy, window, x, y, width, height, AllPlanes, format);

Unfortunately, it does not work as expected, i.e. I get a picture of
(Continue reading)

John McCutchan | 9 Mar 2005 00:37

Re: how to tell a window is completely redrawn?

This list is dead! use xorg@...

--

-- 
John McCutchan <ttb@...>
Irek Szczesniak | 14 Mar 2005 06:02
Favicon

Why does Xvfb not support the backing store?

I am running an X server (X.Org v. 6.8.1 on GNU/Linux Fedora Core 3,
2.6.10-1.770_FC3smp, i686) with backing store capability turned on
(the "+bs" option used when starting the server).  Moreover, I am
forcing the default backing store of all windows to be WhenMapped (the
"-wm" option used when starting the server).  The server is run with
this command:

/usr/X11R6/bin/X :0 -audit 0 +bs -wm -auth /var/gdm/:0.Xauth vt7

I started several applications, whose windows overlapped.  Then I got
the window ID's of these applications with:

xwininfo -root -children

Finally, I used the xwd command (there I passed the ID's) to save the
images of the windows.  The image of every window contained no
overlappings, just as I wanted.  Conclusion: the backing store is
working.

Up to this point things work as expected, but they go wrong when I try
to repeat the same process with Xvfb, i.e. the X virtual frame buffer.
So I run Xvfb with:

/usr/X11R6/bin/Xvfb :1 -audit 0 +bs -wm -auth /var/gdm/:0.Xauth

Next, I run the applications and get the ID's.  Finally, I get the
images with the xwd command.  Result: the window images have
overlappings.  Conclusion: the backing store ain't working!

QUESTION: why does Xvfb not use the backing store even though I
(Continue reading)

Gert Cuykens | 22 Mar 2005 13:46
Picon
Gravatar

readeon 9800XT

This conf works perfect but i would like to use 3d accelleration and
all the feauters of this cart as much as possible. Can someone modify
my xorg.conf please

 SeSection "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        RgbPath      "/usr/X11R6/lib/X11/rgb"
        ModulePath   "/usr/X11R6/lib/modules"
        FontPath     "/usr/X11R6/lib/X11/fonts/misc/"
        FontPath     "/usr/X11R6/lib/X11/fonts/TTF/"
        FontPath     "/usr/X11R6/lib/X11/fonts/Speedo/"
        FontPath     "/usr/X11R6/lib/X11/fonts/Type1/"
        FontPath     "/usr/X11R6/lib/X11/fonts/CID/"
        FontPath     "/usr/X11R6/lib/X11/fonts/75dpi/"
        FontPath     "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection

Section "Module"
        Load  "dbe"
        Load  "dri"
        Load  "extmod"
        Load  "glx"
        Load  "record"
        Load  "xtrap"
(Continue reading)

Gert Cuykens | 22 Mar 2005 19:26
Picon
Gravatar

Re: readeon 9800XT

thx ps what about this ? What are the default settings ? where can i
find more information about this options ?

      ### Available Driver options are:-
       ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
       ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
       ### [arg]: arg optional
       #Option     "NoAccel"                   # [<bool>]
       #Option     "SWcursor"                  # [<bool>]
       #Option     "Dac6Bit"                   # [<bool>]
       #Option     "Dac8Bit"                   # [<bool>]
       #Option     "ForcePCIMode"              # [<bool>]
       #Option     "BusType"                   # [<str>]
       #Option     "CPPIOMode"                 # [<bool>]
       #Option     "CPusecTimeout"             # <i>
       #Option     "AGPMode"                   # <i>
       #Option     "AGPFastWrite"              # [<bool>]
       #Option     "AGPSize"                   # <i>
       #Option     "GARTSize"                  # <i>
       #Option     "RingSize"                  # <i>
       #Option     "BufferSize"                # <i>
       #Option     "EnableDepthMoves"          # [<bool>]
       #Option     "EnablePageFlip"            # [<bool>]
       #Option     "NoBackBuffer"              # [<bool>]
       #Option     "PanelOff"                  # [<bool>]
       #Option     "DDCMode"                   # [<bool>]
       #Option     "MonitorLayout"             # [<str>]
       #Option     "IgnoreEDID"                # [<bool>]
       #Option     "OverlayOnCRTC2"            # [<bool>]
       #Option     "CloneMode"                 # [<str>]
(Continue reading)

Alex Deucher | 22 Mar 2005 19:37
Picon

Re: readeon 9800XT

On Tue, 22 Mar 2005 19:26:28 +0100, Gert Cuykens
<gert.cuykens@...> wrote:
> thx ps what about this ? What are the default settings ? where can i
> find more information about this options ?

'man radeon'

> 
>       ### Available Driver options are:-
>        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
>        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
>        ### [arg]: arg optional
>        #Option     "NoAccel"                   # [<bool>]
>        #Option     "SWcursor"                  # [<bool>]
>        #Option     "Dac6Bit"                   # [<bool>]
>        #Option     "Dac8Bit"                   # [<bool>]
>        #Option     "ForcePCIMode"              # [<bool>]
>        #Option     "BusType"                   # [<str>]
>        #Option     "CPPIOMode"                 # [<bool>]
>        #Option     "CPusecTimeout"             # <i>
>        #Option     "AGPMode"                   # <i>
>        #Option     "AGPFastWrite"              # [<bool>]
>        #Option     "AGPSize"                   # <i>
>        #Option     "GARTSize"                  # <i>
>        #Option     "RingSize"                  # <i>
>        #Option     "BufferSize"                # <i>
>        #Option     "EnableDepthMoves"          # [<bool>]
>        #Option     "EnablePageFlip"            # [<bool>]
>        #Option     "NoBackBuffer"              # [<bool>]
>        #Option     "PanelOff"                  # [<bool>]
(Continue reading)

Yossi.Itzkovich | 28 Mar 2005 06:12

finding process id of a window


Hi,

I have few  X applications, started from the command line with identical
command line, but each has a different DISPLAY environment variable.
Is there a way to get the process id of a process from its window ?

Using xlsclients I can get the command line of the application, but since
all of them use same command line, I can't find unique process id.

Thanks for your help.

Yossi

Gmane