Re: Mapping Xt/Motif Widgets to an offscreen Pixmap



The X Printing servers basically implement this - using
your third idea below.

My X is currently set up such that a Xprt is started, and
its identity is fed into the shell environment via
/etc/profile.d/xprint.sh which initialises $XPSERVERLIST,
usually to a value such as ":33".

That is then the display you can connect to in your
application (apart from your real display, that is), to
do stuff such as printing.

The source to Xinvest contains code that does this. See
http://xinvest.sunsite.dk .

Danny

On Mon, 11 Jul 2005 13:25:59 -0700, madgoat wrote:

> I am creating an application that needs to take screenshots of
> Xt/Motif Widgets that are built on the fly. All I need is an image, so
> I don't need to map them to a physical display (I'd actually rather
> avoid that). Ideally I would like Xt/Motif to draw everything into a
> Pixmap that I could then manipulate with Xlib routines to get what I
> need, but I cannot find any way to alter the Drawable associated with
> Xt Widgets.
>
> Short of tricking Xt into doing that, there are other possibilities
> that I feel achieve the same thing, but may vary in difficulty of
> implementation:
>
> * Create the shell containing the widget(s) off the visible area of
> the Screen (ie. negative values for x and y, a little investigation got
> XGetImage to return null, however)
> * Create a non-physical Screen on the Display and set the Screen of
> the shell to that, the idea being trick X into thinking it has more
> screens that it really does and the behavior would be like having
> another monitor that is always turned off, the user wouldn't notice
> what I was doing on it.
> * Create another X Server that is not connected to a frame buffer,
> connect Xt to that and the rest of my application to the real display
> and copy images between them.
>
> I would like to take the route of least resistance, so to speak, I'd
> like to avoid changing the X server configuration if at all possible,
> but if not I am open to that.
>
> Thanks,
> Aaron Reffett

--
Danny Backx - danny.backx-at-scarlet.be

.



Relevant Pages

  • Re: ssh X11forwarding wont work, please help
    ... whereas saying "export DISPLAY made me think "the display server". ... set by ssh, the shell freezes after i start an x application. ... rules and the X Server at machine1 is listening for TCP connections. ...
    (comp.os.linux.x)
  • Re: Ethereal
    ... So he must, if bash is his shell, do a: ... Well, something similar, since he presumably is not running an X server ... a machine with a willing X server running. ... But it' hardly going to display without an X server to display ...
    (alt.os.linux)
  • Re: Passing parameters to a telnet session?
    ... A mechanism exists for the "telnet" client to send arbitrary ... line), PRINTER, and DISPLAY by default. ... The Debian version of the server, however, for security reasons, will ... unrestricted shell such as Bash, even if you create a special-purpose ...
    (Debian-User)
  • RE: MySQL/PHPMyAdmin on FC3 Connection Problem
    ... // You can disable a server config entry by setting host to ''. ... MySQL server ... MySQL control user settings ... table to describe the display fields ...
    (Fedora)
  • not prettey! Display problem
    ... X.Org X server -- core server ... X.Org X server -- AceCad input driver ... X.Org X server -- APM display driver ...
    (Debian-User)