🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #9234

Bug in icon positioning for subframes

#9234
From: Chuck Musciano
Date: Wed, 23 Nov 1988 09:23
33 lines
1628 bytes
When you create a subframe in SunView for dialog boxes and the like, using

	window_create(base_frame, FRAME, ... );

the subframe is erroneously assigned an icon slot on the screen, even
though subframes cannot be closed to an icon.  In order to prevent this,
you need to explicitly set the icon position of the subframe.  Setting
this via the FRAME_CLOSED_RECT attribute does not work.  You must perform
the following gross hack:

	static	char	pos_hack[5] = {"", "-WP", "      ", "      ", NULL};
	Rect	*fr;

	...
	fr = (Rect *) window_get(base_frame, FRAME_CLOSED_RECT);
	sprintf(pos_hack[2], "%d", fr->r_left);
	sprintf(pos_hack[3], "%d", fr->r_top);
	window_create(base_frame, FRAME, 
			 FRAME_ARGS, 4, pos_hack,
			 ...
		      0);

If anyone else has a better way of doing this, I'd like to know.

By the way, I see that SunView 2 is now named "View 2".  So now you can
say things like "I do too use View 2.  Do you?"  Theodore Geisel will be
pleased :-)

Chuck Musciano
Advanced Technology Department
Harris Corporation
(407) 727-6131
ARPA: chuck@trantor.harris-atd.com
Technical Details
Message-ID: <8811141601.AA04935@trantor.harris-atd.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!rice!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!rice!sun-spots-request
From: chuck@trantor.harris-atd.com (Chuck Musciano)
Newsgroups: comp.sys.sun
Subject: Bug in icon positioning for subframes
Message-ID: <8811141601.AA04935@trantor.harris-atd.com>
Date: 23 Nov 88 09:23:38 GMT
Sender: usenet@rice.edu
Reply-To: Sun-Spots@Rice.edu
Organization: Rice University, Houston, Texas
Lines: 33
Approved: Sun-Spots@rice.edu
Original-Date: Mon, 14 Nov 88 11:00:22 EST
X-Sun-Spots-Digest: Volume 7, Issue 24, message 11 of 12