~ctwm/ctwm/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
    Changes from version 1.0 to 1.1
    -------------------------------


    1 - Correction of a few bugs

    2 - Add the OpaqueResize flag : similar to OpaqueMove, but redraw the window
	you are resizing at each motion event. Extremely resource consuming, but
	beautiful with fast server/client/network.

    3 - Now if you don't specify any background/foreground/pixmap indication for
	the  root window,  ctwm leave it  alone so you  can have  your own  root
        background pixmap.

    4 - You can now specify  on the command line a list of workspaces in which a
        new client opens. The syntaxe is :

          whatever_client -xrm 'ctwm.workspace: name1 name2 ... namen'
   or     whatever_client -xrm 'ctwm.workspace: all'

   where 'name1', 'name2', ..., 'namen' are names of workspaces and 'all' refers
to all workspaces.

    example : 

	xload -xrm 'ctwm.workspace : all'

    5 - Add the  OccupyAll command in  .ctwmrc, you can now specify at startup a
	list of windows that occupy all the workspaces.

    example :

OccupyAll {
    "xload"
    "xconsole"
    "xbiff"
}

    6 - Add the f.gotoworkspace function. It goes the workspace specified by its
	name.

    example :

"F1"      =    : root           : f.gotoworkspace "cognac"


    Changes from version 1.1 to 1.2
    -------------------------------


    1 - you  can  now  directly  edit  workspace names  in their  buttons.  only
	printable characters, delete and backspace keys are honored.

    2 - Ctwm  now handle  shaped colored  icons in  XPM  format. This  added the
	variable XPMIconDirectory, and slightly modified the syntax of the Icons
	command. The XPM icon file names should be prefixed by the character '@'
	to distinguished them from the ordinary bitmap files.

Example :

XPMIconDirectory  "/usr/lib/X11/X11/XPM"

Icons {
    "Axe"    "@xedit.xpm"
    "xterm"  "@xterm.xpm"
    "xrn"    "@xrn.xpm"
    "HPterm" "@hpterm.xpm"
    "XAlarm" "@datebook.xpm"
    "Xman"   "@xman.xpm"
}

  These above xpm pixmap are given.


    3 - Many bugs fixed :

	- Icon regions now works.
	- the absence of ShowIconManager is taken into account.
	- The -iconic flag is honored.
	- The -xrm 'ctwm.workspace' works as expected.
	- I think that f.warpto[to|ring] works correctly i.e warps.
	  also to the correct workspace if the destination window
	  doesn't occupy the current workspace.
	- A few minor bugs fixed.


    Changes from version 1.2 to 1.3
    -------------------------------


    1 - Many bugs fixed :

	- Partial geometry in the  WorkSpaceManagerGeometry  statement no longer
	  cause ctwm to core dump.

	- The occupy window name now is "Occupy Window" instead of "Occupy WIndow"
	  a typo on the uppercase I in window.

	- Several types problems that make good compilers to issue warnings.

	- The  icons of the WorkSpaceManager and Occupy Window windows now behave
	  correctly with ButtonPress.

	- UnknownIcon can now have Xpm icons specified.

	- f.showiconmgr no longer map empty icon managers.

	- The ctwm process is smaller (even smaller than twm).


    2 - Add the Occupy command in .ctwmrc, you can now specify at startup
        which window occupy which workspace.

    example :

Occupy {
              "xload"  {"all"}
    Window    "xterm"  {"here" "there" "elsewhere"}
              "xv"     {"images"}
    WorkSpace "images" {"xloadimage"}
}


    Changes from version 1.3 to 2.0
    -------------------------------

    1 - A few bugs fixed :

	- Resize at window creation with button2 works.

	- Some others i don't remember.

    2 - Better  support of  monochrome  displays  :  video inverse instead of 3d
	buttons.

    3 - WorkSpaceManager  and  Occupy Window are now resizable.  Don't forget to
	verify you have a powerful server before resizing the  workspace manager
	with OpaqueResize set.

    4 - X11R4 support with Imakefile.X11R4 (i didn't try so tell me).

    5 - The  visibility  of the workspace  manager  is now  consistant  with the
	visibility of the icon managers. This mean that by default the workspace
	manager is  *NOT*  visible at startup.  Use the  ShowWorkSpaceManager to
	make it visible at startup.

    6 - Two new functions :  f.showworkspacemgr and f.hideworkspacemgr have been
	added. They do what you imagine.

    7 - And now, the cherry on the cake. The workspace manager has now 2 states,
	the button state (the usual one) and the map state (the new one). In the
	map state  the buttons  are replaced  by windows displaying  a synthetic
	view of the  corresponding workspaces.  All the non-iconified windows of
	the workspace are shown as small windows with the  icon name  written in
	it.  It looks like  the virtual screen of  [t]vtwm, but, of course, much
	nicer.

	In this state, you can modify directly the occupation of your windows by
	manipulating these little windows.

	   - Button1 move a window from a workspace to another.
	   - Button2 copy a window from a workspace to another.
	   - Button3 remove a window from a workspace.

	Clicking in the  "root" of these windows warps you  to the corresponding
	workspace.  Clicking and releasing Button1 or Button2 quickly in a small
	window  go to the corresponding  workspace and warps  the pointer to the
	corresponding window.

	The Control-Key  (Press and Release)  in workspace  manager toggles  the
	buttons and map state.

	Four variables and Three functions manipulates this :

	    - StartInMapState : The map state is selected at startup, default is
	      buttons state.

	    - MapWindowCurrentWorkSpace : The aspect of the current workspace in
	      the map window.

	    - MapWindowDefaultWorkSpace :  Specify the aspect of the non-current
	      workspaces in the map window.

	    - MapWindowBackground :
	    - MapWindowForeground :  Specify the aspect of the small  windows in
	      the map window on a per-client basis.

	    - f.setbuttonsstate : You can guess.

	    - f.setmapstate : You can guess.

	    - f.togglestate : You can guess.


    8 - AutoRaise with RaiseDelay. Thanks to Johan Vromans (jv@mh.nl) who gave me
	this patch.  I think  Warren Jessop  (whj@cs.washington.edu) wrote it for
	twm.


    Changes from version 2.0 to 2.1
    -------------------------------

    1 - Cleanup code to make gcc happy.

    2 - Bugs fixed

	- IconMaskHint honored.
	- Workaround a bug on  HP7xx/8.07  servers for RaiseLower in  Map window.
	  The stacking  order in the MapWindow  was not correct on those servers.
	  use :

	  EXTRA_DEFINES = -DBUGGY_HP700_SERVER

	  in your Imakefile  if you plan to use this server.  It doesn't break on
	  others servers.

	- No longer core dump if  MapWindowCurrentWorkSpace or  MapWindowDefault-
	  WorkSpace are specified before WorkSpaces in .ctwmrc

	- Small windows  handling in  the WorkspaceMap  window works even  if the
	  Workspace  Manager  window  has a  title  (that  was not  the case with
	  ctwm-2.0).

	- ForceIcon works for Xpm icons.

	- Occupation of "transient for" window is correct.

	- RestartPreviousState  necessary to  keep previous  window occupation on
	  restart.

	- If a window  dies while  Occupy Window is mapped,  the Occupy Window is
	  correctly unmapped.

    3 - Ctwm now maintains the  WM_CURRENTWORKSPACE  property on the root  window
	and  WM_OCCUPATION  on every  windows.  They mean what  you think.  These
	properties  are string  properties  and are in  clear text  instead of an
	obscure mask.  If an external application changes  these properties  ctwm
	respond with the correct actions,  changing the current  workspace or the
	occupation of a window.  I give a small example  (gtw.c).  An application
	can manage its  occupation and it is  even possible to  write an external
	workspace manager. It is of course not ICCCM compliant because ICCCM says
	nothing on multiple workspaces. The special names "all" and "current" can
	be used.  And you can specify relative occupations if the workspace names
	list begin with a  '+' or '-' (ex:  +current adds a window to the current
	workspace).
	
    4 - 3 new functions :

	- f.pin : Pin/Unpin a menu on the screen. Only usable inside a root menu.

	- f.vanish : Remove  a window from  the current workspace.  Works only if
		     the window occupies at least one other workspace.

	- f.warphere "win-name" : Adds the window whose name matches  win-name to
			       the current workspace and warps the pointer to it.

    5 - And a new keyword : NoShowOccupyAll : tells ctwm not  to  show  OccupyAll
			windows in the WorkSpaceMap window.

    6 - All window names can now be specified as (shell-like) regular expressions.




    Changes from version 2.1 to 2.2
    -------------------------------


    1 - Bugs :

	- Redraw small windows when icon name changes.
	- Kill window from the title bar menu
	- Partial geometry on Workspace manager can core dump.
	- AutoRaise and tiny windows in the Workspace Map.

    2 - Transient windows and non group leader windows are now always on the top
	of their leader.

    3 - When an icon name changes, the icon itself changes automatically according
	the Icons list in your .ctwmrc. This is very useful for clients that have
	several states. For example xrn or some X mail readers can have two
	differents icons for new mail (news) / no new mail (news).

    4 - A new keyword : TransientHasOccupation has been added for people annoyed
	by the fact that since ctwm-2.1, transient-for non group-leader windows
	have the same occupation that their leader. If you specify this, these
	windows have their own occupation.

    5 - A new keyword : AutoOccupy. If specified, the occupation of a client is
	changed automatically when it's name or icon name changes, according to
	the Occupy list in your .ctwmrc. For example a mail reader can popup
	instantly in the current workspace when mail arrives.

    6 - A new keyword : DontPaintRootWindow. If specified, the root window is
	not painted, whatever you told in the Workspaces specification. This is
	useful to have pixmaps in the Workspace Map but not on the root window.

    7 - You can use XPM pixmaps for your background root window. Use xpm:filename
	instead of @filename. The latter is still accepted. Of course if your
	XPM file has transparent parts, there are not transparent on the root
	window, i.e. you dont see the electron gun through it.

    8 - XPMIconDirectory is replaced by PixmapDirectory. (XPMIconDirectory is
	still accepted).

    9 - You can now use colored root background pixmap and icons in many formats.
	Ctwm use the imconv library from the San Diego Supercomputer Center.
	To use these formats, specify : 'im:filename' for the pixmap name.

	- The following format are supported :

	     bmp    Microsoft Windows bitmap image file
	     cur    Microsoft Windows cursor image file
	     eps    Adobe Encapsulated PostScript file
	     gif    Compuserve Graphics image file
	     hdf    Hierarchical Data File
	     ico    Microsoft Windows icon image file
	     icon   Sun Icon and Cursor file
	     iff    Sun TAAC Image File Format
	     mpnt   Apple Macintosh MacPaint file
	     pbm    PBM Portable Bit Map file
	     pcx    ZSoft IBM PC Paintbrush file
	     pgm    PBM Portable Gray Map file
	     pic    PIXAR picture file
	     pict   Apple Macintosh QuickDraw/PICT file
	     pix    Alias image file
	     ppm    PBM Portable Pixel Map file
	     pnm    PBM Portable aNy Map file
	     ps     Adobe PostScript file
	     ras    Sun Rasterfile
	     rgb    SGI RGB image file
	     rla    Wavefront raster image file
	     rle    Utah Run length encoded image file
	     synu   SDSC Synu image file
	     tga    Truevision Targa image file
	     tiff   Tagged image file
	     viff   Khoros Visualization image file
	     x      AVS X image file
	     xbm    X11 bitmap file
	     xwd    X Window System window dump image file

	- You can find the imconv package at ftp.sdsc.edu. in the directory
	  /pub/sdsc/graphics/imtools.
	- If (width > screenwidth / 2) || (height > screenheight / 2) the image is
	  centered else it is tiled.
	- If you don't have the libim library or don't want to use it, undefine
	  IMCONV in Imakefile.


	But take care :

	- It is very memory consuming (on the server side).
	- It is very color cells consuming.
	- The ctwm executable is much larger executable.
	- Startup is much much slower (but not the workspace swap).
	- It works only for 8 planes pixmaps and 8 planes screens. If there is
	  an imconv specialist somewhere that can generelize this, he is 
	  welcome.

	

    10 - Two new functions : f.nextworkspace, f.prevworkspace.

    11 - Xpm examples files are now automatically installed in $(TWMDIR)

    12 - An example of .ctwmrc is given, showing some aspect of ctwm
	 (example.ctwmrc). It is not a complete .ctwmrc, only the ctwm
	 aspects are shown.

    13 - A new file PROBLEMS has been added that lists some problems you
	can have while using ctwm and some solutions.

 
Is there any good pixmap designer out there, that i can add beautiful
icons and background to the distribution. Don't use too many colors,
try to use the same few already used in the example icons.


    Changes from version 2.2 to 3.0
    -------------------------------

    1 - A few bugs fixes.

    2 - A 3D presentation of menus, titles and IconManagers can be selected with :
	UseThreeDMenus, UseThreeDTitles and UseThreeDIconManagers. If
	UseThreeDTitles is set the default values for TitleButtonBorderWidth,
	FramePadding, TitlePadding, ButtonIndent are set to 0 pixels. I am not
	that proud of the appearance of 3D titles but 3D menus look nice. If
	UseThreeDTitles is set the flag SunkFocusWindowTitle tells ctwm to sunk
	the title of the window that the focus. 3D features look ugly on
	monochrome displays, but I have no such display for testing purpose. If a
	monochrome display owner can have a look, he is welcome. The contrast
	of the clear and dark shadows can be tuned via the ClearShadowContrast
	and DarkShadowContrast parameters. These parameters are percentages.
	The formulas used are :

		clear.{RGB} = (65535 - color.{RGB}) * (ClearShadowContrast / 100),
		dark.{RGB}  = color.{RGB} * ((100 - DarkShadowContrast) / 100),

	If you choose UseThreeDIconManagers, icon titles are also 3D. By defaults
	new colors are allocated for shadows, but you can specify BeNiceToColormap
	to inform ctwm to use stipple instead of new colors, the effect is
	less beautiful, but acceptable.


    3 - A new keyword : NoIconTitle with an optionnal window list.

    4 - A new keyword : TransientOnTop with an integer parameter. This
	paramater is a percentage and tells ctwm to put transient (and
	non-group leader) windows always on top of their leader only if
	their surface is smaller than this fraction of the surface of
	their leader.

    5 - OpaqueMove and OpaqueResize now accept an optionnal list of windows
	as parameter. They also have their NoOpaqueMove and NoOpaqueResize
	counterpart with the same syntax.

    6 - Two new keywords : OpaqueMoveThreshold and OpaqueResizeThreshold
	with one integer parameter. The parameter represent a percentage of
	the screen surface. If Opaque{Move,Resize} is active for a window,
	(via point 4) the opaque {move, resize} is done only if the window
	surface is smaller than this percentage of the screen. The default
	is large enough.

    7 - Startup is optionally piped into m4 before ctwm parse it, ypu can
	now have a common startup file for ctwm, tvtwm, etc ... It can be
	disabled at compile time by undefining USEM4 in Imakefile. It can
	be disabled at execution time by using the -n option. Take care if
	you have backquotes (`) in your .ctwmrc file. This character is
	special to m4. In that case, put something like :

changequote(``,'')

	at the beginning of your .ctwmrc.

    8 - The startup looks nicer (I think). If you use XPM and the file
	welcome.xpm is present in your PixmapDirectory, it is displayed
	while the startup is in progress. Unfortunately, the PixmapDirectory
	is known only after the .ctwmrc is loaded, and this loading is
	a large part of the startup time. So you can define the environnement
	variable CTWM_WELCOME_FILE to point to an XPM file, in which case
	it will be displayed very quickly.
	
    9 - A new function : f.separator, valid only in menus. The effect is to
	add a line separator between the previous and the following entry.
	The name selector part in the menu is not used. f.separator works
	only with conventionnal menus, not with 3D menus.

   10 - Thanks to bret@essex.ac.uk, the man page is integrated with the original
	twm one, and is of a much better quality.

   11 - While moving a window, the position is displayed in a similar way as
	the size when resizing.

   12 - The info window now display the compile time options of the current
	version of ctwm.

   13 - A default IconRegion is now appended at the end of the user provided
	list to help the (numerous) people which do not configure them correctly.

   14 - You can now specify xpm pixmap title buttons and TitleHighlight.
	There is 5 built-in scalable pixmap for buttons, :xpm:menu, :xpm:dot,
	:xpm:resize, :xpm:zoom and :xpm:bar.

   15 - Ctwm now restarts when receiving signal SIGHUP, so to restart it from
	a shell, use : kill -1 the_ctwm_pid

   16 - 2 New keywords : WMgrVertButtonIndent and WMgrHorizButtonIndent with
	1 parameter, specifying the vertical and horizontal space beetween
	buttons in the workspace manager.

   17 - Some more xpm files given. Among them several backgrounds.

   18 - Ctwm set the property WM_WORKSPACELIST (type STRING) on the root
	window, this property contains the null separated list of all the
	workspaces. Now the WM_OCCUPATION property on each window is a null
	separated list instead of a space separated list, it was wrong since
	workspace names can contain spaces. So, the first you will start the
	this version, your windows will show up anywhere.

   19 - A new library libctwm.a and an include file ctwm.h are given. The
	library contains functions for an external program to have some
	control over ctwm. The functions are :

	Bool    CtwmIsRunning                   ();
	char    **CtwmWorkspaces                ();
	char    *CtwmCurrentWorkspace           ();
	int     CtwmChangeWorkspace             ();
	char    **CtwmCurrentOccupation         ();
	int     CtwmSetOccupation               ();
	int     CtwmAddToCurrentWorkspace       ();

	There is no documentation. A program demolib.c is given to help.