[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
Moderator: | STAR::VATNE |
|
Created: | Mon Oct 30 1989 |
Last Modified: | Mon Dec 31 1990 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3726 |
Total number of notes: | 19516 |
1011.0. "XCopyArea() Problem !!!" by GLORY::BENORE (Mike Benore, DTN 444-2107) Fri Jun 23 1989 15:18
PROBLEM WITH XCopyArea()
======= ==== ===========
I have a customer, Wayne State University, who is developing
X Windows based CAsE Software. They have been using Ultrix
for a couple of years and started their work on X10 and have
migrated it to X11, using a release from MIT running on
ULTRIX V2.2. They now want to migrate their code to UWS 2.0
and have one machine running UWS, but are having some
problems with what they perceive differences in the MIT
release from XUI. They won't migrate the rest of their
machines to UWS 2.0, and have stalled on buying any
DECstations until we can convince them that our X
implementation will do the job, and they won't lose
portability.
The biggest problem that they are having right now is with
XCopyArea. The following is the note the customer sent with
source code attached and comments that describe the problem.
Any insights on this would be most appreciated, as their
software package is quite nice and we would love to see it
run under Ultrix as well as have them buy DECstations :-)
Thanks,
Mike Benore
usfhsl::benore
This program grabs a protion of the root window, and then
copies that to the same area on the screen. It is not
grabbing any pixels from inferior windows, and only paints a
solid window. hey want it to grab all the information in the
requested area, including inferior windows.
The customer confirmed agian today that this is the only
thing holding them back from moving their software to UWS
2.0.
Thanks again.
------------------------------------------------------------------------------
In the process of upgrading from ULTRIX 2.2 to UWS 2.0 running
DECwindows, we have encountered a problem with the X11 command XCopyArea
when it is used to copy a portion of the root window into a pixmap.
This problem doesn't occur on our microVAX GPX running ULTRIX 2.2.
Any suggestions can be e-mailed to [email protected]
or call at (313)577-0565 (ask for Brent or Nick)
On the next page is a 30-line program which demonstrates the problem.
Thank you for your help.
/* -- The following code demonstrates the problem we are having
-- with XCopyArea with UWS 2.0. Two carriage returns were added
-- to separate the executions of XCopyArea.
*/
#include <stdio.h>
#include <X11/Xlib.h>
Display *dpy;
GC gc;
Pixmap pix;
Drawable d;
XGCValues values;
main()
{
if ((dpy = XOpenDisplay("")) == 0)
{ printf("Cannot Open Display\n"); exit (1); }
/* -- When d is assigned to a window id created by our program,
-- then this code works.
-- The problem occurs when d is assigned the RootWindow.
*/
d = RootWindow(dpy, DefaultScreen(dpy));
if ((pix = XCreatePixmap (dpy, d, 100, 100,
DefaultDepth(dpy,DefaultScreen(dpy))))==0) printf("Can't Create pix\n");
gc = DefaultGC(dpy, DefaultScreen(dpy));
/* -- This is probably needed to copy from any windows on top of the
-- Rootwindow(we tried it without it, it also fails)
*/
XSetSubwindowMode( dpy, gc, IncludeInferiors );
XFlush(dpy);
/* -- Store screen area to pixmap
*/
if(XCopyArea(dpy,d,pix,gc,0,0,100,100,0,0) == 0) printf("Root copy error\n");
else printf("Root window copied to Pixmap.\n");
XFlush(dpy);
getchar();
/* -- Put previously copied area back to the Rootwindow, at the same location
-- (on our machine it throws garbage on the screen).
*/
if(XCopyArea(dpy,pix,d,gc,0,0,100,100,0,0)==0) printf("Pix copy error\n");
else printf("Pixmap copied to Root window.\n");
XFlush(dpy);
getchar();
}
T.R | Title | User | Personal Name | Date | Lines |
---|
1011.1 | | RAB::DESAI | Jatin Desai | Fri Jun 23 1989 16:04 | 6 |
|
This may not be the problem but, I thought applications are not supposed to
change the default graphics context.
Jatin
|
1011.2 | Question answered on Usenet | FUEL::graham | If people lead, leaders will follow | Fri Jun 23 1989 23:45 | 34 |
|
The program works fine on my PMAX (UWS 2.1)....but Ken Lee (WSL) found
the cause of the problem.
The same question had been posted to the USENET [comp.windows.x]
Kris...
-------
From: [email protected] (Ken Lee)
Subject: Re: XCopyArea Problem With UWS 2.0
Date: 23 Jun 89 21:35:40 GMT
In article <[email protected]>, [email protected] (Virtual Interactive
Programming) writes:
> In the process of upgrading from ULTRIX 2.2 to UWS 2.0 running
> DECwindows, we have encountered a problem with the X11 command XCopyArea
> when it is used to copy a portion of the root window into a pixmap.
Well, I ran your program as-is on a DECstation 3100 and a VAXstation 2000.
Both worked perfectly. Both were running ULTRIX UWS2.1 DECwindows
(should be publicly available now), so you may want to upgrade.
I believe that your problem was a bug in the UWS2.0 X server. Early MIT
sample servers suffered from the same bug (copy area with IncludeInferiors).
Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: [email protected]
Uucp: uunet!decwrl!klee
|
1011.3 | No, not a XCopyArea() Problem | MUHWSS::SCHMADERER | | Thu Sep 14 1989 13:39 | 12 |
| I cannot agree.
I'm running UWS 2.1 on a GPX and the problem is still there.
I figured out that this is not a problem of XCopyArea() nor one of the
server. The problem is caused by our window manager. If you kill dxwm
everything works fine, even if you start uwm.
Please see also note 1431 for further informations.
Guenter.
|