HDTenEightyP/NetNews huggingface dataset:
From: debbieg@mathworks.UUCP
Newsgroups: comp.windows.x
Subject: Blitting through a clipmask
Date: 23 Jul 92 20:18:27 GMT
Organization: The Internet

Hi,

I'm having a problem with clipmasks and blitting.
Here's the situation:


		+-------------------------------------------+
		|                                           |
		|                ............               |
		|                .          .               |
		|                .          .               |
		|                .          .               |
		|                .          .               |
		|                .          .               |
		|                .          .               |
		|                .          .               |
		|                .      +-------+           |
		|                .      |   .   |           |
		|                .      |   .   |           |
		|                .      +-------+           |
		|                .          .               |
		|                ............               |
		|                                           |
		|                                           |
		+-------------------------------------------+

The outer box is my window.  The dotted ('.') box is the current
GC clipmask.  The small box is the area where I want to blit
an image.

The image could look something like this:

	+--------+
	|xxx/\xxx|
	|xx/  \xx|
	|x/    \x|
	|/      \|
	|\      /|
	|x\    /x|
	|xx\  /xx|
	|xxx\/xxx|
	+--------+

Where x is unknown and the blank part is filled with what I want
to be displayed on the screen.
I also have a clipmask set up to look just like the image except
that the x's are 0's and the blank part is filled with 1's.

How do I blit the image through my clipmask through the GC's
clipmask onto the screen?  I've tried a lot of things and none of
them seems to work.
Here is the final way I tried:
1) Create a 1 bit blank pixmap and a Screen Depth blank pixmap.
2) Create the clipmask image and the data image.
3) Do an XPutImage using the window's gc to put the clipmask
   image into the Screen Depth blank pixmap.
4) Create a 1 bit gc (its drawable is the 1 bit pixmap)
   with foreground 1 and background 0.
5) XCopyPlane the Screen Depth pixmap to the 1 bit blank pixmap.
6) Set the window's gc's clipmask to the 1 bit pixmap.
7) Set the window's gc's cliporigin to where the image is going
   in the window.
8) XPutImage the image into the window.

Somehow, after step 3, the Screen Depth pixmap is still blank (and doesn't
contain the clipmask ANDed with the window's gc's clipmask like it should)
no matter what I try setting the clip origin to.  When I set the window's
gc's clipmask to None though, the Screen Depth pixmap contains the whole
clipmask image.
How can I get the Screen Depth pixmap to contain the clipmask image ANDed
with the window's gc's clipmask?????
Or can anyone tell me a better way to do this whole thing?

						Thanx,
						Mike Moretti
						The MathWorks
Newsgroups: comp.windows.x
From: maassen@kreon.informatik.rwth-aachen.de (Andreas Maassen)
Subject: WANTED: xdiff and xdtree for plain X
Organization: Rechnerbetrieb Informatik  /  RWTH Aachen
Date: 28 Jul 92 05:13:06 GMT

Recently I learned about xdiff and xdtree. These tools were
written for Motif, but I need them (or something similar) for 
plain X. Did anybody ever adapt them to plain X?

Andreas
(maassen@parsytec.de)

Newsgroups: comp.windows.x
From: dwex@mtgzfs3.att.COM (David E Wexelblat)
Subject: X386 1.2E has been updated to 1.0.1 (incorporating MIT fix-13)
Organization: The Internet
Date: Fri, 24 Jul 1992 15:15:17 GMT

X386 1.2E 1.0.1 is now available.  This update incorporates the recently
released fix-13 from MIT.

[ For those who do not know, X386 1.2 is the Intel-based Unix SVGA server
  provided with X11R5.  X386 1.2E is a set of enhancements to that server. ]

The following files are available:

	X386-1.2E-1.0.1.diff.Z		Patch kit reletive to X11R5-PL13
	1.0-1.0.1.diff.Z		Patch kit for 1.0.1 relative to 1.0
					(This includes MIT's fix-13)
	Type1.patch1.Z			patch required for the Type1 font
					code to work with PL13, relative
					to the X386 1.2E Type1.tar.Z

These are available from:

	export.lcs.mit.edu (under /pub/contrib/X386-1.2E)
	ftp.physics.su.oz.au (under /pub/X386)
	ftp.win.tue.nl (under /pub/X386)

An update to the SVR4 binary distribution, containing those files that have
changed, can be found in the files core-1.0.1.tar.Z-?? on

	ftp.physics.su.oz.au (under/pub/X386/SVR4)
	ftp.win.tue.nl (under /pub/X386/SVR4)


-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
David Wexelblat             | dwex@mtgzfs3.att.com  | Somebody get me a 
AT&T Bell Laboratories      | ...!att!mtgzfs3!dwex  |   cheeseburger!
200 Laurel Ave - 4B-421     |                       |      
Middletown, NJ  07748       | (908) 957-5871        | --Steve Miller Band
Newsgroups: comp.windows.x
From: william@lanai.cs.ucla.edu (William Cheng)
Newsgroups: comp.windows.x
Subject: Re: draw or paint progrsm for x
Date: 24 Jul 92 15:56:55 GMT
Distribution: comp
Organization: UCLA Computer Science Department

In article <PEDZ.92Jul22234422@slack.austin.ibm.com> pedz@slack.austin.ibm.com (Perry Smith) writes:
>I have an RS/6000 so I am not sure if I have X11R4 or 5 or something
>strange in between.  I'm looking for a drawing program or a paint
>program.  I know about xpaint but it is a little less than I would
>like plus it requires a strange library that the 6000 does not have.
>I could find and get the library work but from the description of
>xpaint, it doesn't sound like it is worth my time.
>
>The idle thing it seems to me would be something that used post
>script.  I have Ghostscript and all the support for that.  But I would
>be happy with something that used straight X.

You can try tgif.  It's based on Xlib.  It can also import PostScript
files (can't edit them, just annotate them).

You can get tgif through anonymous ftp from the /contrib directory on
export.lcs.mit.edu.  Just get all the /contrib/tgif-2.12* files.
The .Z extension means that the file is compressed (you need to run
'uncompress'), and .tar extension means that the file is tared (you
need to run 'tar xvf tgif-2.12-p7.tar'), and the files with the word
'patch' in it are patch files (you need to run
'patch -p -N < tgif-2.12-patch8' and so on).
-- 
Bill Cheng // UCLA Computer Science Department // (310) 575-4507
3564-C Boelter Hall // Los Angeles, California 90024 // USA
william@CS.UCLA.EDU      ...!{uunet|ucbvax}!cs.ucla.edu!william
Newsgroups: comp.windows.x
From: kaleb@thyme.jpl.nasa.gov (Kaleb Keithley)
Subject: Re: Kills from Window Manager
Organization: Jet Propulsion Laboratory, Pasadena, CA
Date: Fri, 24 Jul 92 22:16:34 GMT

In article mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
>In article oj@pictel.com (Oliver Jones) writes:
>> In article mouse@thunder.mcrcim.mcgill.edu (der Mouse) writes:
>>> operations, if any, I see no reason why it should bother
>>> participating in WM_DELETE_WINDOW. ...  Do you see any such reason?
>
>> Yes.  If the wm uses XKillClient to get rid of the application, then
>> the application's route to oblivion is through its XIO error handler.
>> [...this produces a possibly disturbing error message...]
>
>So install an I/O error handler that exits quietly instead of printing
>a noisy complaint first.  (Or implement WM_DELETE_WINDOW, but the
>
>> If you're using Athena, it takes less than a dozen lines of code to
>
>Even in bare Xlib, the I/O error handler solution takes only two lines,

IMHO, (which nobody asked for, but I'll offer it anyway) applications that 
don't participate in WM_DELETE_WINDOW are about on par with programs written 
as follows:

void main () { ... }

Yes, programs written with either error can and generally do work, but
in my experience, these errors generally indicate that the programmer
doesn't understand some of the finer details of C and/or X.

Furthermore, writing your own IOErrorHandler function to trap the single 
error seems nearly equivalent to not checking return values from sytem
calls.  You might get by 99&44/100% of the time, but why risk it?

Now, in looking at my preceding comments, I realize that someone might 
consider my comments to be mildly inflammatory.  But let me assure you 
that they are *not* intended that way.

-- 

Kaleb Keithley                          kaleb@thyme.jpl.nasa.gov

Not authorized, in any way, shape, or form, to speak for anyone.
Newsgroups: comp.windows.x
From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
Subject: Re: X: User simplicity vs code complexity
Organization: McGill Research Centre for Intelligent Machines
Date: Wed, 29 Jul 92 23:47:15 GMT

In article <TPAQUETTE.92Jul23134924@gumby.ita.lgc.com>, tpaquette@ita.lgc.com (Trevor Paquette) writes:

> I came up with "X is the perfect example of User simplicity is
> directly proportional to code complexity."  Do you agree/disagree
> with this statement and why?

Disagree.  X is not the perfect anything, as far as I've yet seen.

Also, it's not clear whether "user" is the application programmer or
the application user.

> There are many calls that do basically the same thing (XAllocColor vs
> XAllocColorCells).

Two enlightening snippets from the Xlib document:

----
	To allocate a read-only color cell, use XAllocColor.
----
	To allocate read/write color cell and color plane combinations
	for a PseudoColor model, use XAllocColorCells.
----

Do you still think they do basically the same thing?

					der Mouse

			    mouse@larry.mcrcim.mcgill.edu
Newsgroups: comp.windows.x
From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
Subject: Re: Finding the current cursor
Organization: McGill Research Centre for Intelligent Machines
Date: Sat, 25 Jul 92 11:06:19 GMT

In article <1992Jul23.141226.19607@rchland.ibm.com>, shmdgljd@rchland.vnet.ibm.com (Jay Schmidgall) writes:
> In article <1992Jul22.161928.19371@andersen.co.uk>, you write:
>> During an application I need to change the cursor, I do this with
>> XdefineCursor.  I would like to be able to store the original cursor
>> so that I can change it back.
> I don't think you need to store the original cursor at all; instead,
> store your new cursor.  Then, when you're done, undefine the new
> cursor.  The original cursor is automagically restored.

This doesn't restore the original cursor per se; rather, it causes the
window to use its parent's cursor.  This may or may not be what the
cursor was before the XDefineCursor call was made; it is equivalent to
assuming the original cursor was None.

					der Mouse

			    mouse@larry.mcrcim.mcgill.edu
From: jaa@vpmes018.uucp (alan anderson)
Newsgroups: comp.windows.x
Subject: X Server for ATI
Date: 27 Jul 92 22:58:24 GMT
Distribution: usa
Organization: Varco-Pruden


	Does a "public" X11R5-Server exists for an ATI Ultra Card?
	I need the code for an X11R5 Server that supports VGA as well as
	8514A 16 Color Mode.

		Thanks
		Alan Anderson

	United Dominion Building
	6000 Poplar, Suite 400
	Memphis, TN 38119
Newsgroups: comp.windows.x
From: chris@ods.com (Chris Atkins)
Subject: Re: HELP xdm setup on single sun.
Organization: Optical Data Systems, Inc.
X-Newsreader: Tin 1.1 PL4
Date: Wed, 22 Jul 1992 19:47:15 GMT

djones@mltsa.UUCP writes:
: Hi, This must have been asked about a million times !
: I am trying to get xdm (X11R5) running on a SUN(ipx). Simply to control
: the 'local' display. I have two questions.
: 
: (1) I followed the example given in the man page and the
: greeting I get keeps talking of "unsecure session". What
: do I need to do to make it "secure" ?
: 
Based on the xdm man page from O'Reilly Volume 3, the "unsecure session" 
message is there because the configuration file requests X authorization but
there is no authorization in use when the greeting is brought up.  You have 
2 choices to get rid of this, 
1) set DisplayManager*authorize: false
   This turns off authorization.
2) Set up to use authorization.  I can't help you out much with this one.  You
   might try setting up an outhorization file for the server.

: (2) What is the "best" way to start xdm. I added a line at the
: end of rc.local to fire it up, viz xdm -config /blah../lib/X11/xdm/xdm-config
: Is there a "better" way ?
: 
To start up xdm add the following to the end of your rc.local:
if [ -f /usr2/X11/bin/X11/xdm ]; then
        /usr2/X11/bin/X11/xdm -daemon -config /xdm/xdm-config
fi

If you wish to start up different window environments (ie. motif, ow2, ow3) at
login time, you can add the following translations to the Xresources file.
        Ctrl<Key>F1:    set-session-argument(failsafe) finish-field() \n\
        <Key>F1:        set-session-argument(x) finish-field() \n\
        <Key>F2:        set-session-argument(ow2) finish-field() \n\
        <Key>F3:        set-session-argument(ow3) finish-field() \n\
        <Key>Return:    set-session-argument() finish-field()
the argument to set-session-argument is passed to the Xsession file.

One thing I found out was that it was difficult to get setup to be able to
use both xterm and any of sun's shell type tools(shell tool, cmd tool, etc.)
To overcome this problem, I did the following:
I added the following line to the default Xsession script:
stty echoe echoctl echoke

In my ~/.xsession file I put the following:
/usr2/X11/bin/X11/xterm -geometry 80x24+10+200 -sb -iconic -name Xsession -l -lf
 "$HOME/Xlog" -xrm "Xsession*sensitive: False" -e $HOME/.xsession-nodeamon $1

$1 is passed in from the set-session-argument above.

The $HOME/.xsession-nodeamon script looks like this:
#!/bin/csh
# this is the program that is run as the client
# for the display manager.
#
source $HOME/.cshrc
setenv WINSYS $1
source $HOME/.login
source $HOME/.xinitrc

The variable WINSYS is passed to my .login script and I use it to setup my
path, and load library path based on whether I am running motif, ow2 or ow3.  I
also determine the window manager to start and pass that to .xinitrc via an
environment variable.

I am not sure why I had to create a dummy xterm and then do my .xinitrc script
from it to get both the sun tools and xterm to work, but it does work.

Good luck,
Chris Atkins
chris@ods.com

Newsgroups: comp.windows.x
From: oj@pictel.com (Oliver Jones)
Subject: Re: Need doc on X11R4 SHAPE extensions (and/or suggestions)
Organization: PictureTel Corporation
Date: Thu, 23 Jul 1992 11:00:07 GMT

In article <2HsiNB1w164w@fatcity.cts.com>, time@fatcity.cts.com (Tim Erskine) writes:

> I need [...].  [...] the MIT X11R4 extensions which included SHAPE
> functions.  Where might I find documentation on this (and for that
> matter other extentions) subject?

Check out issue 3 of "The X Resource."  Paula Ferguson's article
does a nice tutorial job on the SHAPE extension.
From: snail@lsl.co.uk
Newsgroups: comp.windows.x
Subject: Re: Memory leaks
Date: 30 Jul 92 11:27:16 GMT
Organization: Laser-Scan Ltd., Cambridge

In article <9207291738.AA05158@mtesol>, sinan@mtesol.boeing.COM (Sinan Karasu) writes:
> 
>  When is a memory leak a memory leak. If I do many malloc's with
> no dalloc's , does the memory remain leaked when the program exits?
> Is the answer different in different OSs such as Sun,SCO etc... ?
> Sinan

When a program starts it is given it's own stack space and it's own heap space.
Memory is allocated in the heap space. When the program exits, the stack space
and the heap space are passed back into the OS's hands. You do not leak
memory this way. This is even true for MSDOS, since you only ever have one
main program, and all TSRs should be well behaved and not grab memory and 
leave it lying around. For UNIX and VMS you'll be OK. If you access memory
outside the stack or heap or BSS space then you'll get a segmentation fault or
access violation and you program will enter it's signal handler and probably
die (ie: You'll know about it!)

The answer for MSDOS and GEMDOS/TOS (Atari ST) can be more complicated, since
the program effectively
has access to the whole memory of the computer, but can actually tell the
OS that it only wants some of the memory, and gives it back to the OS. The
program can then ask for more if it need more later (by doing a DOS level
call rather than a malloc etc). What happens if the program does this and then
exits I don't know (ie Is that last DOS level call freed? I don't think it is..
I think you'd have to explicitly do another DOS level call). Anyway you don't
use MSDOS or GEMDOS/TOS anyway do you?

On MSDOS if you access memory outside the heap/stack/bss areas then chances are
you'll clobber one of the expansion cards or low memory and overwrite the
CMOS RAM that configures the computer (yes I've done this too, with a rogue
mouse driver program) and most likely hang the computer (RESET time)


OK, thats enough, not exactly X WINDOWS is it?

Stephen Kellett
snail@lsl.co.uk
From: bobmcg@castle.ed.ac.UK (Bob McGonigle)
Newsgroups: comp.windows.x
Subject: Europena X User group Conference
Date: 27 Jul 92 14:05:25 GMT
Organization: The Internet


EUROPEAN X USER GROUP CONFERENCE

ANNOUNCEMENT AND CALL FOR ADDITIONAL PAPERS

24-25 September 1992

Brunel University, Uxbridge, Great Britain
  (5 minutes from Heathrow)

The conference this year comprises the conference itself, a choice of
optional tutorials, a vendor exhibition and demonstrations.

TUTORIALS

The tutorials will be held on the morning of Thursday 24th September.
Four subject areas are offered:

X Window System Administration,
PEX programming,
Starting off with X, and
Debugging X Windows programs.

CONFERENCE

The conference commences at mid-day on Thursday 24th September and
continues through the whole of Friday.  It will include major speakers
from the USA such as Bob Scheifler, Donna Converse, Oliver Jones and
Doug Young.  A wide range of topics will be covered including:

GUI tools in high level languages,
fonts made easy,
X in group working, and 
Help via X Windows.

ADDITIONAL PAPERS

There is still an opportunity for you to present a paper on your
favourite subject at the conference. To contact the paper committee, you
should fax your name, address, telephone, email address and proposed
topic of paper to the secretariat. Someone will then contact you to
discuss further details.

VENDOR EXHIBITION

The exhibition will be the only one dedicated to X and exhibitors will
be showing products and services offered to the X community.

DEMONSTRATIONS

There will also be demonstrations by developers working within the X
environment, plus video presentations of various applications.

COST

The conference fee is 250 pounds.
Price includes refreshments and lunch, plus the conference dinner on the
Thursday evening.

Optional tutorial fee is 50 pounds.
Choose one of the above four subject areas.

Accommodation - 27.50 pounds per person per night.
Bed and Breakfast in en-suite rooms. Available Wed 23rd, Thur 24th and
Fri 25th September.

SPECIAL OFFER

Members of the User Group may be eligible for a 10% discount for early
registration and payment. Ask for details.

EXHIBITION STANDS

If you would like to exhibit your organisation's
products/services/research developments, please contact the secretariat.

TO BOOK

Registration forms and further information are available from:

  EXUG Secretariat
  PO Box 458
  Cambridge 
  CB4 4AA
  Great Britain

  Tel: +44 (0) 223 426534
  fax: +44 (0) 223 420251
From: hewitt@usafa.af.mil (Joe Hewitt)
Newsgroups: comp.windows.x
Subject: Changing Colormap RGB values...
Keywords: colormap RGB XView
Date: 23 Jul 92 03:17:12 GMT
Distribution: comp.windows.x
Organization: U.S. Air Force Academy, Colorado



Problem:    How to dynamically change the RGB values in a colormap entry
            so that all objects using that colormap index automatically
            change to the new color (in XView or Xlib).

H/W & S/W:  Sun SS 2 running OW 2.

Project:    I am developing a simple app using XView to allow users
            to interactively change the RGB component values of a
           	given colormap index.  The idea is when the colormap
			components change, all objects drawn using that index
			automatically assume the new color without any application
			procedure getting called to do the drawing.

Request:    I would like to see sample code that changes the RGB
			values on the fly.  Can someone help?

Many thanks in advance.

Cheers!

--Joe
-- 
 )       (         / \               )   )             _/__/_
 \   ^   /       _/__/___    _      /__ / _  _    _ o  /  /
  \_/ \_/   o   (_/   (__)__(/__   /   / (/__(_/\_)_(_(__(__  
W. Joe Hewitt, 1Lt, USAF                  hewitt@usafa.af.mil
From: mfg@castle.ed.ac.uk (M Gordon)
Newsgroups: comp.windows.x
Subject: Re: Bug in editres
Date: 28 Jul 92 07:46:05 GMT
Organization: Edinburgh University

stumpf@Informatik.TU-Muenchen.DE (Markus Stumpf) writes:
>The whole widget tree of the xfontsel application is displayed as
>single widgets within the TREE-widget as parent. This TREE widget is a widget
>in the Editres application!
>Thus each widget of the xfontsel application has it's expressen in a
>command widget inside the editres application!
>If you now select the editres application's widget tree, you recursivly
>get the editres AND the already existing widgets for the xfontsel application!

Yes, I realised this last night after thinking about it a bit more.
I suppose it makes sense for it to work this way, although if you
select one of the widgets that came from the widget tree displayed
for xfonstsel you get a "This widget no longer exists in the client"
error, which could be confusing.  The moral seems to be "DON'T USE
EDITRES ON IT'S OWN WINDOW"

-- 
                                                         _   _   _    _   _	
Michael Gordon - mfg@castle.ed.ac.uk OR ee.ed.ac.uk     | |_| |_| |__| |_| |   
EE Dept, Edinburgh University                           | . . . .      . . |    
It's not an optical illusion, it just looks like one    |_________|~~|_____|    
Newsgroups: comp.windows.x
From: cgp@Arco.COM (Chris Phillips  (214) 754-6419)
Subject: Re: faking xlock with kill -STOP <X server PID>
Organization: ARCO Oil and Gas Company
Distribution: usa
Date: Thu, 23 Jul 1992 15:02:28 GMT

In article <1992Jul22.203318.24969@porthos.cc.bellcore.com> bucci1@donner.uucp (25853-pastor) writes:
>In article <1992Jul21.143641.20596@Arco.COM>, cgp@Arco.COM (Chris Phillips  (214) 754-6419) writes:
>> 	$ sleep 5; kill -STOP <X server PID>
>
>We were wondering exactly what you meant by "X server PID".  When we 
>used the PID for the window manager, the applications still ran, but all
>input was locked out.  If we stopped the original ksh, the window manager
>still allowed the user to close the window of the original xterm (and thus 
>terminate that display completely).

$ ps -e		# your flags may vary
[...]
 14517  hft/0  0:17 X
[...]
$ sleep 5; kill -STOP 14517

Chris