Compare commits

...

60 Commits

Author SHA1 Message Date
Morgan Aldridge
8eb3738420 Updated mlvwm version number to 0.9.4 2021-09-09 11:40:07 -04:00
Morgan Aldridge
5d6b7e17c5 Updated CHANGELOG re:fixed xdotool window move & new SwallowFocusClick config command. Issue #25, Issue #24. 2021-09-09 11:23:00 -04:00
Morgan Aldridge
7a3daaebf4 Updated manual page to describe the new 'SwallowFocusClick' config command. Issue #24 2021-09-09 11:08:41 -04:00
Morgan Aldridge
2d324d13cf Updated handle_button_press() to appropriately pass initial click in inactive windows, plus added 'SwallowFocusClick' config command to disable the functionality. Issue #24 2021-09-09 11:01:44 -04:00
Morgan Aldridge
f6b4a84199 Fixed config file parsing to prevent false-positive command matches in some edge cases 2021-09-09 10:57:44 -04:00
Morgan Aldridge
692432b807 Update handle_configure_request() to not modify tmp_win before calling SetUpFrame(), plus reduced vars used. Issue #25 2021-09-05 11:07:17 -04:00
Morgan Aldridge
b039615084 Uncomment setting tmp_win->frame_x & tmp_win->frame_y in handle_configure_request() to fix xdotool not moving windows. Issue #25 2021-09-05 10:53:24 -04:00
Morgan Aldridge
24578885f2 META: Fix broken screenshot thumbnails in README.md 2021-05-30 10:38:48 -04:00
Morgan Aldridge
694d9c26a1 META: Added screenshots to README.md 2021-05-30 10:34:38 -04:00
Morgan Aldridge
70e08cf7cf Updated mlvwm version number to 0.9.3 2021-04-01 08:29:26 -04:00
Morgan Aldridge
71b9f4bb7a Updated CHANGELOG re:styling improvements. Issue #16 2021-03-25 16:15:02 -04:00
Morgan Aldridge
7bbc1f1bde Added initial CONTRIBUTING.md and linked to from README.md. Issue #14 2021-03-25 09:05:41 -04:00
Morgan Aldridge
9aaa7f42a6 Updated README.md Installation section to note installing via package managers 2021-03-25 09:00:44 -04:00
Morgan Aldridge
eb4c348b6a Fix typo & spacing in History section of README.md 2021-03-25 08:51:31 -04:00
Morgan Aldridge
885f80f1e0 META: ignore vim temporary files 2021-03-25 08:21:03 -04:00
Morgan Aldridge
1abad78a41 Grayscale scroll bar background pattern for default theme. Issue #16 2021-03-24 09:10:01 -04:00
Morgan Aldridge
6984cda115 More accurate rendering of title bar, esp. for default System7 theme. Issue #16 2021-03-24 08:11:46 -04:00
Morgan Aldridge
5fd232652b More accurate rendering & positioning of close & min/max title bar buttons, esp. for default System7 theme. Issue #16 2021-03-24 07:34:35 -04:00
Morgan Aldridge
708a30f602 Fixed top left & right rounded corners in System8 theme. Issue #16, issue #17 2021-03-18 09:48:22 -04:00
Morgan Aldridge
9a32e76a33 Reduce window shadows by 1px. Issue #16, issue #20 2021-03-17 17:58:38 -04:00
Morgan Aldridge
e822ec57b9 Merge branch 'master' into scroll-bar-theme-improvements 2021-03-17 15:27:52 -04:00
Morgan Aldridge
c4fc6df49c Merge branch 'TheMorc-pixelmodifications' into master 2021-03-17 15:16:55 -04:00
Morgan Aldridge
e0823a6a15 Borders: Restore stripes around titlebar buttons & text on monochrome displays 2021-03-17 15:08:33 -04:00
Morgan Aldridge
89a829e8e2 Merge branch 'pixelmodifications' of https://github.com/TheMorc/mlvwm into TheMorc-pixelmodifications 2021-03-17 14:45:59 -04:00
Morgan Aldridge
817ec609b9 More accurate rendering of scroll bars. Issue #16 2021-03-14 13:09:58 -04:00
Morgan Aldridge
c1c65d7a44 Updated manual page to reflect new default ScrollBarWidth. Issue #16 2021-03-14 11:47:18 -04:00
Morgan Aldridge
6822305905 More accurate rendering of scroll bars. Issue #16 2021-03-14 11:40:42 -04:00
Morgan Aldridge
da10f2cf46 More accurate rendering of resize boxes. Issue #16 2021-03-13 10:01:41 -05:00
Morgan Aldridge
95da6807a5 More accurate rendering of scrollbars. Issue #16 2021-03-13 09:28:23 -05:00
Morgan Aldridge
352a147fc8 Default scrollbar width to 16px. Issue #16 2021-03-13 09:27:36 -05:00
Morgan Aldridge
7d51d64c60 Merge branch 'pixelmodifications' of https://github.com/TheMorc/mlvwm into TheMorc-pixelmodifications 2021-03-12 13:23:15 -05:00
Morgan Aldridge
e4a31ff47a Updated CHANGELOG regarding new RoundedScreenCorners configuration setting. Issue #15 2021-03-12 12:09:00 -05:00
Morgan Aldridge
da399d1bd9 Added RoundedScreenCorners config setting to manual page. Issue #15 2021-03-12 12:05:40 -05:00
Morgan Aldridge
30eecc92de
Merge pull request #12 from TheMorc/roundedcorners
Add RoundedScreenCorners config setting. Issue #15
2021-03-12 11:59:21 -05:00
TheMorc
8370f234a2 MLVWM: change the default font size from 14 to 12 2021-03-10 18:42:32 +01:00
TheMorc
b36ef7942d Borders: Fix stripes and whitespace around titlebar buttons & text 2021-03-10 18:42:32 +01:00
Morgan Aldridge
ed66d041e8 Merge branch 'pixelmodifications' of https://github.com/TheMorc/mlvwm into TheMorc-pixelmodifications 2021-03-07 15:33:31 -05:00
TheMorc
464b322653 MLVWM: change the default font size from 14 to 12 2021-03-07 20:36:21 +01:00
TheMorc
02d34fa5dd Borders: Fix stripes and whitespace around titlebar buttons & text 2021-03-07 20:36:21 +01:00
Morgan Aldridge
b02b7a0a95 Merge branch 'pixelmodifications' of https://github.com/TheMorc/mlvwm into TheMorc-pixelmodifications 2021-03-07 13:28:03 -05:00
Morgan Aldridge
d40c836bba
Merge pull request #11 from TheMorc/gitignore
Meta: Add .gitignore
2021-03-07 12:54:53 -05:00
TheMorc
5770821197 Meta: Add .gitignore
Adding .gitignore so we don't mistakenly push compiled stuff over
to the repo. Now also with ignored files for QtCreator.
2021-03-07 18:48:00 +01:00
TheMorc
9ea97d0641 Borders: Fix stripes and whitespace around titlebar buttons & text 2021-03-07 11:38:52 +01:00
TheMorc
882e556d35 Add_Window&Borders: Move placement of titlebar buttons
These changes don't seem to break the System7 theme at all.
2021-03-07 11:17:39 +01:00
TheMorc
0a3517159f Borders&Event: Fix rectangle size on MinMax button 2021-03-07 10:58:19 +01:00
TheMorc
4cd1d76fe1 Menus: Change menubar size to 20 2021-03-07 10:55:35 +01:00
TheMorc
8370be7cc1 Add RoundedScreenCorners config setting
This setting enables drawing of all rounded screen corners

(small interesting thing: Mac OS 9 had rounded screen corners but
they must've disabled them later because I don't have them on my
snow 2003 iBook G3.)
2021-03-06 19:35:32 +01:00
Morgan Aldridge
4910df83f7 Update CHANGELOG 2021-01-30 15:06:32 -05:00
Morgan Aldridge
09ea1b39d4 Duplicate command string in RestartSystem() as it'll get freed in Done() before it's used. Issue #10 2021-01-30 15:01:56 -05:00
Morgan Aldridge
e65b6ff507 Added new README.md for GitHub 2020-12-31 10:12:57 -05:00
Morgan Aldridge
3eabf02106 Update CHANGELOG 2020-12-30 18:03:51 -05:00
Morgan Aldridge
0121f255f8 Merge branch 'sprintf-to-snprintf' 2020-12-30 18:02:43 -05:00
Morgan Aldridge
b6b147bdfe Update man page authors section and add a history section 2020-12-30 17:50:43 -05:00
Morgan Aldridge
5c4b663a68 Updated man page to include description of EdgeResistance configuration option. Issue #8 2020-12-30 17:34:59 -05:00
Morgan Aldridge
5ed03df783 Convert strcat()s to snprintf()s. Issue #6 2020-12-27 11:30:39 -05:00
Morgan Aldridge
7c8f22ff56 Convert sprintf()s to snprintf()s. Issue #6 2020-12-25 20:51:46 -05:00
Morgan Aldridge
67e74cbdd1 Fix compiler warnings 2020-12-22 17:14:05 -05:00
Morgan Aldridge
6c2a9da7c6 Updated TaC's email address in copyright headers, at his request 2020-12-19 12:35:02 -05:00
Morgan Aldridge
e40f2cf685 Imported mlvwm 0.9.1 release 2015-04-04 20:01:23 -04:00
Morgan Aldridge
9c8f9eaaf2 Imported mlvwm 0.9.0 release 2015-04-04 19:58:04 -04:00
44 changed files with 1066 additions and 744 deletions

6
.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
man/mlvwm._man
mlvwm/mlvwm
**/Makefile*
**/*.o
mlvwm.*
**/*.swp

View File

@ -1,3 +1,30 @@
0.9.2 -> 0.9.4
Improved config command parsing in ReadConfigFile()
Add SwallowFocusClick configuration command
Fixed handle_configure_request() to support moving windows
0.9.2 -> 0.9.3
Fix RestartSystem()/Done() to correctly restart into other window managers
Add RoundedScreenCorners configuration
Changed default font size to 12px
Changed default scroll bar width/height to 16px
Changed default menu bar height to 20px
More accurate sizing & styling of window title bars & controls, scroll bars, and resize handle
0.9.1 -> 0.9.2
Change sprintf() & strcat() to snprintf()
0.9.0 -> 0.9.1
change Restack
change menu selected functions
0.8.9 -> 0.9.0
Add EdgeResistance
Change menu create function
\ can be use to joint configuration line
Some small bug fix.
Change Swallow margin.
0.8.8 -> 0.8.9
Change scroll bar expose function and befavior
Add one click menu(OneClickMenu)

View File

@ -1,3 +1,14 @@
0.9.0 -> 0.9.1
Restack を変更
メニューの選択時の動作のバグを修正
0.8.9 -> 0.9.0
EdgeResistance を追加
メニュウの作成方法を変更
\ で設定の連結
細かいバグ修正
Swallow のマージンを変更
0.8.8 -> 0.8.9
スクロールバーの書換えと移動関数を変更
OneClickMenu を追加

View File

@ -116,6 +116,8 @@ The item which can be set by the initialization file is as the next.
Enable Opaque resize.
OneClickMenu
Click pull down menu and more one click execute selection.
EdgeResistance x y
Edge resistance force.
ZoomWait
Setting Hide animation speed. Default is 10ms. The unit is ms.
RotateDesk

View File

@ -94,6 +94,7 @@ Description
OpaqueResize $B%j%5%$%:;~$KCf?H$rI=<($7$?$^$^0\F0(B
OneClickMenu $B%/%j%C%/$G%a%K%e!<$,%W%k%@%&%s$7$F!"$b$&0l2s$N%/%j%C%/(B
$B$G<B9T(B
EdgeResistance $B%&%$%s%I%&$,2hLL$N30$K=P$k$?$a$KI,MW$J0\F0NL$r(B x, y $B$GDI2C(B
ZoomWait Hide $B$N%"%K%a!<%7%g%s%9%T!<%I$r(B ms $B$G;XDj!#%G%U%)%k%H$O(B
10ms$B!#(B
RotateDesk $B%G%9%/%H%C%W$N2C;;!"8:;;$r%m!<%F!<%7%g%s$9$k!#(B

37
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,37 @@
# Contributing to MLVWM
We welcome feedback, bug fixes, and feature request. Ultimately, what gets accepted and merged into the project is up to the current project maintainer ([Morgan Aldridge](https://github.com/morgant)) and what they feel is appropriate for all users of the project, but you are encouraged to submit any suggestions.
Please submit bugs and feature requests via the projects [issue tracker](https://github.com/morgant/mlvwm/issues).
## What You Need
You will need the following to contribute:
* A [GitHub](http://github.com) account for submitting pull requests
* X11
## Making Changes
Follow these steps when making changes. That way, they will most likely be accepted with few headaches and very little back and forth.
1. Fork the [mlvwm](https://github.com/morgant/mlvwm) project on GitHub.
2. Create a topic branch from the `master` branch. Name your branch appropriately, reflecting the intended changes (e.g. “sprintf-to-snprintf” or “scroll-bar-theme-improvements”)
3. Make your edits (please try to conform to our [style guide](#style-guide)).
4. Make commits in logical units and with concise but explanatory commit messages. Please reference any appropriate issue numbers, e.g. "Issue #16".
5. Ensure your changes build without additional warnings or errors. We suggest testing in `Xephyr`.
## Submitting Changes
When youve completed your changes and are ready to merge them into the main project, follow these steps to submit them for review.
1. Push the changes to your fork of the [mlvwm](https://github.com/morgant/mlvwm) project on GitHub
2. Submit a pull request to the [mlvwm](https://github.com/morgant/mlvwm) project
Thats all there is to it.
If you followed the [making changes](#making-changes) guidelines and the changes are aligned with the vision of the project, it should be a smooth process to merge them.
## Style Guide
This is a very old codebase from before syle guides were a thing and we haven't yet tackled standardizing the formatting. So, for the time being, please try to use the same style as surrounding code, including either spaces or tabs for indendation (whichever is used locally), spacing around parentheses, etc. Please remove any trailing whitespace from lines.

View File

@ -1,7 +1,7 @@
XCOMM Imakefile for MLVWM
#define IHaveSubdirs
SUBDIRS = mlvwm sample_rc
SUBDIRS = mlvwm sample_rc man
#define PassCDebugFlags
MakeSubdirs($(SUBDIRS))

4
README
View File

@ -12,6 +12,10 @@ xmkmf -a;
make.
But, it must be compiled with gcc for SunOS4.x.
make install
make install.man
are install mlvwm and manual.
The designation of the installation directory can be done by the
change of configure.h. Sauce complying with Locale came in. Make
HasLocale YES in configure.h. Cope additionally and suitably though

View File

@ -10,6 +10,11 @@ make
でコンパイルできます。ただし SunOS 4.x の場合 gcc でコンパイルする必要
があります。
インストールは
make install
make install.man
で行ないます、
インストールディレクトリの指定は configure.h の変更で行なえます。
Locale 対応のソースが入りました。configure.h の中で、 HasLocale を YES
にして下さい。その他にも、 configure.h の修正はかなり行ないましたが、

83
README.md Normal file
View File

@ -0,0 +1,83 @@
# MLVWM
[![MLVWM System 7 Theme](/img/System7-640x360.png?raw=true)](#SCREENSHOTS)
## OVERVIEW
MLVWM (Macintosh-Like Virtual Window Manager) is an X11 window manager with a classic MacOS appearance. Its primary features include:
* Emulation of MacOS 7 & 8 menu bar & window decorations
* Optional multiple virtual desktops
* A main menu bar across the top of the screen, with:
* Configurable global and per-application menus
* Menu items trigger application functionality via keyboard shorcuts or commands
* An icon menu which shows all windows and supports:
* Switching desktops
* Selecting, hiding, and showing windows
* A balloon help menu
* The ability to "swallow" small windows into the menu bar
* Windows which support:
* Title bars with optional close, zoom, and shade buttons
* Resize handle
* Optional double-click to toggle window shade
* Drag as solid window or just outline
* Balloon help which shows X window information
* Global keyboard shortcuts
* Numerous configuration options to tune functionality
## SCREENSHOTS
Default theme (System 7-like):
[![Default System 7 Theme](/img/System7-640x360.png?raw=true)](/img/System7-1920x1080.png)
`System8` theme (MacOS 8/9-like):
[![MacOS 8/9 Theme](/img/MacOS8-640x360.png?raw=true)](/img/MacOS8-1920x1080.png)
## INSTALLATION
### Building from Source
Build & installation currently still requires [imake](https://en.wikipedia.org/wiki/Imake) & make. While the original documentation says that `xmkmf -a` should work, we've found it's usually necessary to do the following:
cd man && xmkmf && cd -
cd sample_rc && xmkmf && cd -
cd mlvwm && xmkmf && cd -
xmkmf
make && make install
### Package Managers
Native packages are provided on some operating systems, including:
* OpenBSD: `pkg_add mlvwm`
## CONFIGURATION
While some sample configuration files are included in the `sample_rc` directory, we highly suggest using the configuration files from the [mlvwmrc](https://github.com/morgant/mlvwmrc) project.
## DOCUMENTATION
We suggest reading the manual page (`man mlvwm`; English), but you may also find the original documentation helpful:
* README: [English](README), [日本語](README.jp)
* CONFIGURATION: [English](CONFIGURATION), [日本語](CONFIGURATION.jp)
* CHANGELOG: [English](CHANGELOG), [日本語](CHANGELOG.jp)
* Website: [English](http://www2u.biglobe.ne.jp/~y-miyata/mlvwm.html)
Note: the English documentation above was automatically generated from the Japanese documentation.
## CONTRIBUTING
Contributions are welcome and appreciated. Please read and follow the [CONTRIBUTING](CONTRIBUTING.md) guidelines.
## HISTORY
MLVWM was originally developed in 1997 by Takashi HASEGAWA, based on FVWM, while studying at Nagoya University. Active development proceeded through 2000. In 2020, Morgan Aldridge obtained permission to continue maintenance & development.
## LICENSE
This software is distributed as freeware as long as the original copyright remains in the source code and all documentation. Some files retain their original MIT license and one file is in the public domain.
Macintosh and MacOS are registered trademarks of Apple, Inc. (née Apple Computer, Inc.)

View File

@ -33,7 +33,7 @@ XCOMM
#ifdef MlvwmLibDir
MLVWMLIBDIR = MlvwmLibDir
#else
MLVWMLIBDIR = $(USRLIBDIR)/mlvwm
MLVWMLIBDIR = $(USRLIBDIR)/X11/mlvwm
#endif
#ifndef HasLocale
@ -69,7 +69,7 @@ XCOMM
#endif
XCOMM
XCOMM CDEBUGFLAGS = -g -Wall -Wshadow
CDEBUGFLAGS = -g -Wall -Wshadow
XCOMM CDEBUGFLAGS = -O2 -Wall
XCOMM CDEBUGFLAGS = -g -Wall
XCOMM CDEBUGFLAGS = -g

BIN
img/MacOS8-1920x1080.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

BIN
img/MacOS8-640x360.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

BIN
img/System7-1920x1080.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

BIN
img/System7-640x360.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

8
man/Imakefile Normal file
View File

@ -0,0 +1,8 @@
XCOMM Imakefile for MLVWM
#include "../configure.h"
XCOMM Do not change from here !
all::
InstallManPage(mlvwm,$(MANDIR))

View File

@ -1,316 +0,0 @@
.\" t
.\" @(#)mlvwm.1
'\"macro stdmacro
.de EX \"Begin example
.ne 5
.if n .sp 1
.if t .sp .5
.nf
.in +.5i
..
.de EE
.fi
.in -.5i
.if n .sp 1
.if t .sp .5
..
.ta .3i .6i .9i 1.2i 1.5i 1.8i
.nr X
.TH mlvwm 1 "11 Feb 1997"
.SH NAME
mlvwm \- Macintosh Like Virtual Window Manager
.SH SYNOPSIS
\f4mlvwm [ \fIoptions\fP ]
.SH DESCRIPTION
.I mlvwm
is a window manager for X11 designed to look and feel like
the Macintosh<tm> environment. It provides multiple desktops, separate
menu bars for different applications, and the ability to interact with
applications from that menu bar. It does this by sending key sequences
to the application, such as ctrl-X or alt-Y.
.SH OPTIONS
These are the command line options that are recognized by \fImlvwm\fP:
.IP "\fB-f\fP \fIconfig_file\fP"
Causes \fImlvwm\fP to use \fIconfig_fule\fP as it's configuration file.
.IP "\fB-d\fP \fIdisplay_name\fP"
Brings \fImlvwm\fP on display \fIdisplay_name\fP instead of the name
taken from the DISPLAY environment variable.
.IP "\fB-c\fP\t"
Compatible mode. When windows are moved or resized, the border displayed
is a dotted line instead of solid. This causes a slight speed decline.
.IP "\fB-debug\fP"
Debug mode. Displays debugging information.
.SH CONFIGURATION FILES
The configuration file is used to describe shortcut key bindings, menus,
fonts, and various other settings. It is typically ".mlvwmrc" in your
home directory, and if that does not exist it falls back to the system
default. A different config file can be defined using the -f option
shown above.
Lines beginning with '#' are ignored by \fImlvwm\fP.
.SH BUILT IN FUNCTIONS
There are a number of built in functions in \fImlvwm\fP that may be
used in the configuration file. If there is an error in the config file,
\fImlvwm\fP will try it's best to go on. If it can't find a particular
icon, it will complain on startup and leave the space blank where the
icon was meant to go. Likewise, if you have a command misspelled or something
to that effect, it will simply put up an error message and continue on
through the rest of the config file.
The following commands can be used in menus, keyboard short cuts,
and anything else along those lines:
.IP "Exec \fBapp_name\fP \fBcommand\fP"
Executes an external command as stated by \fBcommand\fP. \fBapp_name\fP
should be set to whatever the name of the application is that will be
executed.
.IP "Nop\t"
Does nothing.
.IP "Refresh"
Refreshes the screen.
.IP "Restart [\fBwindow_manager\fP]"
Restarts \fImlvwm\fP or, if \fBwindow_mananger\fP is defined, restart into
that window manager.
.IP "Exit\t"
Quits \fImlvwm\fP.
.IP "Desk [\fB+\fP|\fB-\fP|\fBnumber\fP]"
Changes desktops to \fBnumber\fP or, if + or - is the argument, goes up
one or down one desktop, respectively.
.IP "NextWindow"
Switches to the next active window. Windows that are hidden or defined
in SkipSelect are not chosen. This includes windows in other desktops
in it's list of windows to choose from.
.IP "PreviousWindow"
Swtiches to the previous active window. Windows that are hidden or defined
in SkipSelect are not chosen. This includes windows in other desktops
in it's list of windows to choose from.
.IP "NextSameDeskWindow"
Switches to the next active window. Windows that are hidden or defined
in SkipSelect are not chosen. Windows in other desktops are not chosen.
.IP "PreviousSameDeskWindow"
Switches to the previous active window. Windows that are hidden or defined
in SkipSelect are not chosen. Windows in other desktops are not chosen.
.IP "ShadedUnShadeActive"
Shades or UnShades active window.
.IP "HideActive"
Hides active window.
.IP "HideOthers"
Hides all other windows except the active one.
.IP "ShowAll"
All hidden windows are unhidden.
.IP "MoveWindow"
Move a window, chosen after this command is selected.
.IP "ResizeWindow"
Resize a window, chosen after this command is selected.
.IP "KillWindow"
Kills a chosen window.
.IP "SendMessage \fBsequence\fP"
A keypress is sent to the active window. The keys pressed are defined
in a similar fashion to those in the ShortCut command. You specify a
special key with it's corresponding capital letter identifier and a +
symbol. For instance, if you wanted to set the sequence: Ctrl-x, you
would use C+x.
The following commands are used to change or describe \fImlvwm\fP's
functionality:
.IP "Desktopnum \fBnum\fP"
The number of desktops available. Defaults to 1.
.IP "StickShade"
Shaded windows are present no matter what desktop you are on, instead
of staying on a particular desktop. This is not the default behavior.
.IP "StickHide"
Hidden windows are present no matter what desktop you are on, instead
of staying on a particular desktop. This is not the default behavior.
This means that if you hide a window in one desktop, and move to another,
then unhide it, it will appear in that desktop, instead of the desktop
it was originally in.
.IP "ShadeMap"
When a window is unhidden, shading remains. The default is for shading
to be canceled when a window is unhidden.
.IP "DoubleClickTime \fBtime\fP"
The number of milliseconds in which you must click the mouse button twice
in order to register a double click.
.IP "FollowToMouse"
The active window is the window the mouse is currently over. If you move
the mouse away from the current window and/or over another, you lose
focus in the current one. This is not set up by default.
.IP "FlushMenu \fBspeed\fP \fBflashes\fP"
Determines how fast the flashes are when you choose an option from a menu,
as well as how many times it does so.
.IP "IconPath \fBpath\fP"
Specify the path \fImlvwm\fP is to search in order to find it's icons.
Separate directories should be separated with a : and listed in the order
you wish them to be searched. This needs to be defined before any
references to icons are made.
.IP "IconMenuIcon \fBicon\fP"
This is the icon to be used with the windowlist menu on right side of the
menu bar.
.IP "MenuBarFont \fBfont\fP"
The font the menu bar is to use.
.IP "MenuFont \fBfont\fP"
The font the menus are to use.
.IP "TitleBarFont \fBfont\fP"
The font on the title bars of windows.
.IP "Read \fBfilename\fP"
Reads in a separate configuration file.
.IP "Menu \fBname\fP[, \fBoptions\fP] ... END"
Starts a menu block for the specified \fBname\fP menu. After the name of
the menu, some options may be defined as listed below to change the behavior
of that menu. All lines following the Menu command are read in as menu
items until an END statement is reached. Description of menu items will
be discussed after the options.
Menu options are as follows:
Right - places the menu on the right side of the menu bar.
Left - places the menu on the left side of the menu bar. This is default.
Icon \fBicon\fP - assigns an icon to be displayed on the menu bar instead
of a label.
Label \fBlabel\fP - assigns a label to be displayed on the menu bar instead
of an icon.
Stick - menu label is shown any time, in spite of the designation of which
application it is associated with via the MenuBar command.
NonStick - opposite of Stick. This is default.
Menu items are described as follows:
"label" options
Multiple options are separated by commas. Options you can choose are as
follows:
Gray - grays out a menu item.
Black - makes a menu item black.
Check - places a check mark next to item.
NonCheck - doesn't place a check mark next to item.
Select - makes a menu item selectable.
NonSelect - prevents a menu item from being selectable.
Icon \fBicon\fP - specifies an icon to place next to the menu item's label.
Action \fBcommand\fP - performs any built in \fBcommand\fP.
.IP "Swallow \fBappname\fP \fBoptions\fP"
Swallows an application into the menu bar. \fBoptions\fP are separated
by commas. \fBappname\fP should match the name of the application that
will be swallowed. The following options are allowed:
Right - places the menu on the right side of the menu bar. This is default.
Left - places the menu on the left side of the menu bar.
Action \fBcommand\fP - performs any built in \fBcommand\fP. This is where
an Exec should be performed of the application to be swallowed.
Stick - menu label is shown any time, in spite of the designation of which
application it is associated with via the MenuBar command. This is default.
NonStick - opposite of Stick.
.IP "MenuBar \fBappname\fP ... END"
This describes the names of the menus to be displayed, given a particular
\fBappname\fP is active. The keyword \fBdefault\fP can be placed for
\fBappname\fP to set up a menu bar for any application that does not
have it's own specific menu bar. Menus are listed one per line after
the MenuBar line, and closed off with an END statement.
.IP "Style ... END"
This is used to describe certain attributes of particular windows, such
as decorations, MenuBars, mini-icons, and various other attributes.
The wildcards, * and ?, can be used. Lines are set up as follows:
"appname" \fBoptions\fP
Multiple \fBoptions\fP are separated by commas, and can be chosen from
the following:
NormalDecoration - Places standard decorations (ie all the defaults)
around a particular window.
NoSbarH - Horizontal scroll bar is removed.
NoSbarV - Vertical scroll bar is removed.
NoResizeR - no resize 'button'. This is automatic if both NoSbarH and NoSbarV
are defined.
NoTitle - Removed title bar.
NoMinMaxR - Min/Max 'button' is removed. Automatic when NoTitle defined.
NoCloseR - Close 'button' is removed. Automatic when NoTitle defined.
NoWinList - Prevents window from being show on the window list.
NoFocus - Does not allow window to get focus.
StayOnTop - Window stays above all other windows on the screen.
Sticky - Window stays on screen even if you change desktops.
SkipSelect - Prevents window from getting chosen by NextWindow, PreviousWindow,
PreviousSameDeskWindow, and NextSameDeskWindow.
EnableScroll - Activates scroll bars.
MaxmizeScale - The percentage the window will increase in size when it
maximized.
MiniIcon \fBicon\fP - \fBicon\fP is used to represent that particular window.
MenuBar \fBmenubar\fP - Switches the menu bar to \fBmenubar\fP when that
application is active.
.IP "ShortCut ... END"
Binds key combinations to functions. Short cuts are listed one per line
in the following format:
KeyName KeyboardModifier Command
After all Short cuts are listed, an END statement should be placed.
KeyboardModifier's are as follows:
.EX
S - Shift key
C - Control key
M - Mod1 key
1 - Mod1 key
2 - Mod2 key
3 - Mod3 key
4 - Mod4 key
5 - Mod5 key
A - Any Modifier
N - No Modifier
.EE
.SH FILES
.nf
$HOME/.mlvwmrc
$MLVWMLIBDIR/system.mlvwmrc
.fi
.SH COPYRIGHT NOTICES
This program is distributed as freeware. The copyright remains with
the author.
Macintosh is a registered trademark of Apple Computer, Inc.
.SH AUTHOR
Takashi HASEGAWA
.I tak@bioele.nuee.nagoya-u.ac.jp

388
man/mlvwm.man Executable file
View File

@ -0,0 +1,388 @@
.\" t
.\" @(#)mlvwm.1
'\"macro stdmacro
.de EX \"Begin example
.ne 5
.if n .sp 1
.if t .sp .5
.nf
.in +.5i
..
.de EE
.fi
.in -.5i
.if n .sp 1
.if t .sp .5
..
.ta .3i .6i .9i 1.2i 1.5i 1.8i
.nr X
.TH mlvwm 1 "11 Feb 1997"
.SH NAME
mlvwm \- Macintosh Like Virtual Window Manager
.SH SYNOPSIS
\fBmlvwm \fP[ \fB\-f\fP \fIinitfile\fP ] [ \fB\-d\fP \fIdpy\fP ]
[ \fB\-debug\fP ]
.SH DESCRIPTION
.I mlvwm
is a window manager for X11 designed to look and feel like
the Macintosh<tm> environment. It provides multiple desktops, separate
menu bars for different applications, and the ability to interact with
applications from that menu bar. It does this by sending key sequences
to the application, such as ctrl-X or alt-Y.
.SH OPTIONS
These are the command line options that are recognized by \fImlvwm\fP:
.IP "\fB-f\fP \fIconfig_file\fP"
Causes \fImlvwm\fP to use \fIconfig_fule\fP as it's configuration file.
.IP "\fB-d\fP \fIdisplay_name\fP"
Brings \fImlvwm\fP on display \fIdisplay_name\fP instead of the name
taken from the DISPLAY environment variable.
.IP "\fB-debug\fP"
Debug mode. Displays debugging information.
.SH CONFIGURATION FILES
The configuration file is used to describe shortcut key bindings, menus,
fonts, and various other settings. It is typically ".mlvwmrc" in your
home directory, and if that does not exist it falls back to the system
default. A different config file can be defined using the -f option
shown above.
Lines beginning with '#' are ignored by \fImlvwm\fP.
.SH BUILT IN FUNCTIONS
There are a number of built in functions in \fImlvwm\fP that may be
used in the configuration file. If there is an error in the config file,
\fImlvwm\fP will try it's best to go on. If it can't find a particular
icon, it will complain on startup and leave the space blank where the
icon was meant to go. Likewise, if you have a command misspelled or something
to that effect, it will simply put up an error message and continue on
through the rest of the config file.
The following commands can be used in menus, keyboard short cuts,
and anything else along those lines:
.IP "\fBExec\fP \fIapp_name command\fP"
Executes an external command as stated by \fIcommand\fP. \fIapp_name\fP
should be set to whatever the name of the application is that will be
executed.
.IP "\fBNop\fP"
Does nothing.
.IP "\fBRefresh\fP"
Refreshes the screen.
.IP "\fBRestart\fP [\fIwindow_manager\fP]"
Restarts \fImlvwm\fP or, if \fIwindow_mananger\fP is defined, restart into
that window manager.
.IP "\fBExit\fP\t"
Quits \fImlvwm\fP.
.IP "\fBDesk\fP [\fI+\fP|\fI-\fP|\fInumber\fP]"
Changes desktops to \fInumber\fP or, if + or - is the argument, goes up
one or down one desktop, respectively.
.IP "\fBNextWindow\fP"
Switches to the next active window. Windows that are hidden or defined
in SkipSelect are not chosen. This includes windows in other desktops
in it's list of windows to choose from.
.IP "\fBPreviousWindow\fP"
Swtiches to the previous active window. Windows that are hidden or defined
in SkipSelect are not chosen. This includes windows in other desktops
in it's list of windows to choose from.
.IP "\fBNextSameDeskWindow\fP"
Switches to the next active window. Windows that are hidden or defined
in SkipSelect are not chosen. Windows in other desktops are not chosen.
.IP "\fBPreviousSameDeskWindow\fP"
Switches to the previous active window. Windows that are hidden or defined
in SkipSelect are not chosen. Windows in other desktops are not chosen.
.IP "\fBShadedUnShadeActive\fP"
Shades or UnShades active window.
.IP "\fBHideActive\fP"
Hides active window.
.IP "\fBHideOthers\fP"
Hides all other windows except the active one.
.IP "\fBShowAll\fP"
All hidden windows are unhidden.
.IP "\fBMoveWindow\fP"
Move a window, chosen after this command is selected.
.IP "\fBResizeWindow\fP"
Resize a window, chosen after this command is selected.
.IP "\fBKillWindow\fP"
Kills a chosen window.
.IP "\fBSendMessage\fP \fIsequence\fP"
A keypress is sent to the active window. The keys pressed are defined
in a similar fashion to those in the ShortCut command. You specify a
special key with it's corresponding capital letter identifier and a +
symbol. For instance, if you wanted to set the sequence: Ctrl-x, you
would use C+x.
.IP "\fBWait\fP [\fIApplication name|\fIApplication class\fP]"
Wait to start application.
.IP "\fBShowBalloon\fP"
This function can be bound to a key in order to show balloon.
.SH DESCRIPTION
The following commands are used to change or describe \fImlvwm\fP's
functionality:
.IP "\fBDesktopnum\fP \fInum\fP"
The number of desktops available. Defaults to 1.
.IP "\fBStickShade\fP"
Shaded windows are present no matter what desktop you are on, instead
of staying on a particular desktop. This is not the default behavior.
.IP "\fBStickHide\fP"
Hidden windows are present no matter what desktop you are on, instead
of staying on a particular desktop. This is not the default behavior.
This means that if you hide a window in one desktop, and move to another,
then unhide it, it will appear in that desktop, instead of the desktop
it was originally in.
.IP "\fBShadeMap\fP"
When a window is unhidden, shading remains. The default is for shading
to be canceled when a window is unhidden.
.IP "\fBDoubleClickTime\fP \fItime\fP"
The number of milliseconds in which you must click the mouse button twice
in order to register a double click.
.IP "\fBCompatible\fP"
When windows are moved or resized, the border displayed is a dotted
line instead of solid. This causes a slight speed decline.
.IP "\fBFollowToMouse\fP"
The active window is the window the mouse is currently over. If you move
the mouse away from the current window and/or over another, you lose
focus in the current one. This is not set up by default.
.IP "\fBSlopyFocus\fP"
It turns on FollowToMouse with the modification of not loosing
focus when in the root window.
.IP "\fBSwallowFocusClick\fP"
Initial clicks in inactive windows will be ignored. This is not set by
default.
.IP "\fBSystem8\fP"
Change to window decoration to System 8(Only Color Monitor).
.IP "\fBRoundedScreenCorners\fP"
Enable rounded screen corners.
.IP "\fBOpaqueMove\fP"
Enable Opaque move.
.IP "\fBOpaqueResize\fP"
Enable Opaque resize.
.IP "\fBEdgeResistance\fP \fIx\fP \fIy\fP"
Determines the amount of force needed to drag a window beyond the bounds
of the screen. Default is 0px. The unit is px.
.IP "\fBOneClickMenu\fP"
Click pull down menu and more one click execute selection.
.IP "\fBZoomWait\fP \fIms\fB"
Setting Hide animation speed. Default is 10ms. The unit is ms.
.IP "\fBRotateDesk\fP"
Rotate desktop number at Desk + and Desk -.
.IP "\fBDisplayDeskNumber\fP"
Display window name with desktop number on window list.
.IP "\fBIconifyShade\fP"
WindowShade is regarded as Inocify.
.IP "\fBIconifyHide\fP"
HideWindow is regarded as Iconify.
.IP "\fBScrollBarWidth\fP \fIn\fP
The variable scroll window is set \fIn\fP and defaults to 16 if
unspecified.
.IP "\fBFlushMenu\fP \fIspeed\fP \fIflashes\fP"
Determines how fast the flashes are when you choose an option from a menu,
as well as how many times it does so.
.IP "\fBIconPath\fP \fIpath\fP"
Specify the path \fImlvwm\fP is to search in order to find it's icons.
Separate directories should be separated with a : and listed in the order
you wish them to be searched. This needs to be defined before any
references to icons are made.
.IP "\fBIconMenuIcon\fP \fIicon\fP"
This is the icon to be used with the windowlist menu on right side of the
menu bar.
.IP "\fBUseRootWin\fP"
ignore button event on Root Window.
.IP "\fBUseBalloon\fP \fIstr1\fP \fIstr2\fP, \fBIcon\fP \fIiconname\fP
Use balloon help. str1 is displayed as menu item when Balloon help is
not displayed.
.IP "\fBInitFunction\fP"
.IP "\fBRestartFunction\fP"
Define the function when start and restart the mlvwm.
.IP "\fBMenuBarFont\fP \fIfont\fP"
The font the menu bar is to use.
.IP "\fBMenuFont\fP \fIfont\fP"
The font the menus are to use.
.IP "\fBTitleBarFont\fP \fIfont\fP"
The font on the title bars of windows.
.IP "\fBRead\fP \fIfilename\fP"
Reads in a separate configuration file.
.IP "\fBRestartPreviousState\fP"
It allows to regenerate the screen as it was before the
previous window manager was shutdown or the current window
manager was restarted.
.IP "\fBMenu\fP \fIname\fP[, \fIoptions\fP] ... \fBEND\fP"
Starts a menu block for the specified \fIname\fP menu. After the name of
the menu, some options may be defined as listed below to change the behavior
of that menu. All lines following the Menu command are read in as menu
items until an \fBEND\fP statement is reached. Description of menu
items will be discussed after the options.
Menu options are as follows:
\fBRight\fP - places the menu on the right side of the menu bar.
\fBLeft\fP - places the menu on the left side of the menu bar. This is default.
\fBIcon\fP \fIicon\fP - assigns an icon to be displayed on the menu
bar instead of a label.
\fBLabel\fP \fIlabel\fP - assigns a label to be displayed on the menu
bar instead of an icon.
\fBStick\fP - menu label is shown any time, in spite of the
designation of which application it is associated with via the MenuBar
command.
\fBNonStick\fP - opposite of Stick. This is default.
Menu items are described as follows:
"label" options
Multiple options are separated by commas. Options you can choose are as
follows:
\fBGray\fP - grays out a menu item.
\fBBlack\fP - makes a menu item black.
\fBCheck\fP - places a check mark next to item.
\fBNonCheck\fP - doesn't place a check mark next to item.
\fBSelect\fP - makes a menu item selectable.
\fBNonSelect\fP - prevents a menu item from being selectable.
\fBSubMenu\fP \fIMenuName\fP
A submenu is specified.
\fBIcon\fP \fIicon\fP - specifies an icon to place next to the menu
item's label.
\fBAction\fP \fIcommand\fP - performs any built in \fIcommand\fP.
\fBSwallow\fP \fIappname\fP \fIoptions\fP
Swallows an application into the menu bar. \fIoptions\fP are separated
by commas. \fIappname\fP should match the name of the application that
will be swallowed. The following options are allowed:
\fBRight\fP - places the menu on the right side of the menu bar. This
is default.
\fBLeft\fP - places the menu on the left side of the menu bar.
\fBAction\fP \fIcommand\fP - performs any built in \fIcommand\fP.
This is where an Exec should be performed of the application to be swallowed.
\fBStick\fP - menu label is shown any time, in spite of the
designation of which application it is associated with via the MenuBar
command. This is default.
\fBNonStick\fP - opposite of Stick.
.IP "\fBMenuBar\fP \fIappname\fP ... \fBEND\fP"
This describes the names of the menus to be displayed, given a particular
\fIappname\fP is active. The keyword \fBdefault\fP can be placed for
\fIappname\fP to set up a menu bar for any application that does not
have it's own specific menu bar. Menus are listed one per line after
the MenuBar line, and closed off with an \fBEND\fP statement.
.IP "\fBStyle\fP \fIstrings\fP \fBEND\fP"
This is used to describe certain attributes of particular windows, such
as decorations, MenuBars, mini-icons, and various other attributes.
The wildcards, * and ?, can be used. Lines are set up as follows:
"\fIappname\fP" \fIoptions\fP
Multiple \fIoptions\fP are separated by commas, and can be chosen from
the following:
\fBNormalDecoration\fP - Places standard decorations (ie all the defaults)
around a particular window.
\fBNoSbarH\fP - Horizontal scroll bar is removed.
\fBNoSbarV\fP - Vertical scroll bar is removed.
\fBNoResizeR\fP - no resize 'button'. This is automatic if both
NoSbarH and NoSbarV are defined.
\fBNoTitle\fP - Removed title bar.
\fBNoMinMaxR\fP - Min/Max 'button' is removed. Automatic when NoTitle
defined.
\fBNoCloseR\fP - Close 'button' is removed. Automatic when NoTitle defined.
\fBNoWinList\fP - Prevents window from being show on the window list.
\fBNoFocus\fP - Does not allow window to get focus.
\fBStayOnTop\fP - Window stays above all other windows on the screen.
\fBSticky\fP - Window stays on screen even if you change desktops.
\fBSkipSelect\fP - Prevents window from getting chosen by \fBNextWindow\fP,
\fBPreviousWindow\fP, \fBPreviousSameDeskWindow\fP, and
\fBNextSameDeskWindow\fP.
\fBEnableScroll\fP - Activates scroll bars.
\fBMaxmizeScale\fP - The percentage the window will increase in size
when it maximized.
\fBMiniIcon\fP \fIicon\fP - \fIicon\fP is used to represent that
particular window.
\fBNoTransientDecorate\fP - No decorations for transient window.
\fBMenuBar\fP \fImenubar\fP - Switches the menu bar to \fImenubar\fP when that
application is active.
.IP "\fBShortCut\fP \fIstring\fP END"
Binds key combinations to functions. Short cuts are listed one per line
in the following format:
\fIKeyName\fP \fIKeyboardModifier\fP \fICommand\fP
After all Short cuts are listed, an END statement should be placed.
KeyboardModifier's are as follows:
.EX
\fBS\fP - Shift key
\fBC\fP - Control key
\fBM\fP - Mod1 key
\fB1\fP - Mod1 key
\fB2\fP - Mod2 key
\fB3\fP - Mod3 key
\fB4\fP - Mod4 key
\fB5\fP - Mod5 key
\fBA\fP - Any Modifier
\fBN\fP - No Modifier
.EE
.SH FILES
.nf
$HOME/.mlvwmrc
$MLVWMLIBDIR/system.mlvwmrc
.fi
.SH COPYRIGHT NOTICES
This program is distributed as freeware. The copyright remains with
the author.
Macintosh is a registered trademark of Apple Computer, Inc.
.SH AUTHORS
TakaC HASEGAWA
.I tac.hasegawa@gmail.com
Morgan Aldridge
.I morgant@makkintosshu.com
.SH HISTORY
.I mlvwm
was developed by TakaC HASEGAWA in 1997 and is based on the FVWM window
manager.

View File

@ -1,113 +0,0 @@
add_window.o: add_window.c /usr/include/stdio.h \
/usr/include/sys/types.h /usr/include/machine/ansi.h \
/usr/include/machine/types.h /usr/include/sys/cdefs.h \
/usr/include/machine/endian.h /usr/include/stdlib.h mlvwm.h \
/usr/X11R6/include/X11/Xlib.h /usr/X11R6/include/X11/X.h \
/usr/X11R6/include/X11/Xfuncproto.h /usr/X11R6/include/X11/Xosdefs.h \
/usr/include/stddef.h /usr/X11R6/include/X11/Xutil.h \
/usr/X11R6/include/X11/cursorfont.h /usr/X11R6/include/X11/xpm.h \
sun_headers.h /usr/include/sys/wait.h screen.h menus.h config.h \
borders.h misc.h /usr/include/unistd.h /usr/include/sys/unistd.h \
/usr/X11R6/include/X11/Xatom.h /usr/X11R6/include/X11/Xresource.h \
/usr/X11R6/include/X11/extensions/shape.h
balloon.o: balloon.c /usr/include/stdio.h /usr/include/sys/types.h \
/usr/include/machine/ansi.h /usr/include/machine/types.h \
/usr/include/sys/cdefs.h /usr/include/machine/endian.h \
/usr/include/stdlib.h mlvwm.h /usr/X11R6/include/X11/Xlib.h \
/usr/X11R6/include/X11/X.h /usr/X11R6/include/X11/Xfuncproto.h \
/usr/X11R6/include/X11/Xosdefs.h /usr/include/stddef.h \
/usr/X11R6/include/X11/Xutil.h /usr/X11R6/include/X11/cursorfont.h \
/usr/X11R6/include/X11/xpm.h sun_headers.h /usr/include/sys/wait.h \
screen.h menus.h config.h misc.h /usr/include/unistd.h \
/usr/include/sys/unistd.h event.h \
/usr/X11R6/include/X11/extensions/shape.h
borders.o: borders.c /usr/include/stdio.h /usr/include/sys/types.h \
/usr/include/machine/ansi.h /usr/include/machine/types.h \
/usr/include/sys/cdefs.h /usr/include/machine/endian.h \
/usr/include/stdlib.h /usr/include/string.h mlvwm.h \
/usr/X11R6/include/X11/Xlib.h /usr/X11R6/include/X11/X.h \
/usr/X11R6/include/X11/Xfuncproto.h /usr/X11R6/include/X11/Xosdefs.h \
/usr/include/stddef.h /usr/X11R6/include/X11/Xutil.h \
/usr/X11R6/include/X11/cursorfont.h /usr/X11R6/include/X11/xpm.h \
sun_headers.h /usr/include/sys/wait.h screen.h menus.h config.h \
misc.h /usr/include/unistd.h /usr/include/sys/unistd.h borders.h \
/usr/X11R6/include/X11/extensions/shape.h
config.o: config.c /usr/include/stdio.h /usr/include/sys/types.h \
/usr/include/machine/ansi.h /usr/include/machine/types.h \
/usr/include/sys/cdefs.h /usr/include/machine/endian.h \
/usr/include/stdlib.h /usr/include/string.h /usr/include/ctype.h \
/usr/include/runetype.h mlvwm.h /usr/X11R6/include/X11/Xlib.h \
/usr/X11R6/include/X11/X.h /usr/X11R6/include/X11/Xfuncproto.h \
/usr/X11R6/include/X11/Xosdefs.h /usr/include/stddef.h \
/usr/X11R6/include/X11/Xutil.h /usr/X11R6/include/X11/cursorfont.h \
/usr/X11R6/include/X11/xpm.h sun_headers.h /usr/include/sys/wait.h \
screen.h menus.h config.h misc.h /usr/include/unistd.h \
/usr/include/sys/unistd.h
event.o: event.c /usr/include/stdio.h /usr/include/sys/types.h \
/usr/include/machine/ansi.h /usr/include/machine/types.h \
/usr/include/sys/cdefs.h /usr/include/machine/endian.h \
/usr/include/stdlib.h /usr/include/unistd.h /usr/include/sys/unistd.h \
/usr/include/string.h /usr/include/sys/time.h /usr/include/time.h \
/usr/X11R6/include/X11/Xatom.h mlvwm.h /usr/X11R6/include/X11/Xlib.h \
/usr/X11R6/include/X11/X.h /usr/X11R6/include/X11/Xfuncproto.h \
/usr/X11R6/include/X11/Xosdefs.h /usr/include/stddef.h \
/usr/X11R6/include/X11/Xutil.h /usr/X11R6/include/X11/cursorfont.h \
/usr/X11R6/include/X11/xpm.h sun_headers.h /usr/include/sys/wait.h \
screen.h menus.h config.h borders.h add_window.h functions.h misc.h \
balloon.h /usr/X11R6/include/X11/extensions/shape.h
functions.o: functions.c /usr/include/stdio.h /usr/include/sys/types.h \
/usr/include/machine/ansi.h /usr/include/machine/types.h \
/usr/include/sys/cdefs.h /usr/include/machine/endian.h \
/usr/include/stdlib.h /usr/include/string.h /usr/include/unistd.h \
/usr/include/sys/unistd.h mlvwm.h /usr/X11R6/include/X11/Xlib.h \
/usr/X11R6/include/X11/X.h /usr/X11R6/include/X11/Xfuncproto.h \
/usr/X11R6/include/X11/Xosdefs.h /usr/include/stddef.h \
/usr/X11R6/include/X11/Xutil.h /usr/X11R6/include/X11/cursorfont.h \
/usr/X11R6/include/X11/xpm.h sun_headers.h /usr/include/sys/wait.h \
screen.h menus.h config.h functions.h borders.h event.h misc.h \
balloon.h
menus.o: menus.c /usr/include/stdio.h /usr/include/sys/types.h \
/usr/include/machine/ansi.h /usr/include/machine/types.h \
/usr/include/sys/cdefs.h /usr/include/machine/endian.h \
/usr/include/stdlib.h /usr/include/string.h /usr/include/ctype.h \
/usr/include/runetype.h mlvwm.h /usr/X11R6/include/X11/Xlib.h \
/usr/X11R6/include/X11/X.h /usr/X11R6/include/X11/Xfuncproto.h \
/usr/X11R6/include/X11/Xosdefs.h /usr/include/stddef.h \
/usr/X11R6/include/X11/Xutil.h /usr/X11R6/include/X11/cursorfont.h \
/usr/X11R6/include/X11/xpm.h sun_headers.h /usr/include/sys/wait.h \
screen.h menus.h config.h event.h functions.h misc.h \
/usr/include/unistd.h /usr/include/sys/unistd.h add_window.h \
borders.h /usr/X11R6/include/X11/Xatom.h \
/usr/X11R6/include/X11/Xresource.h \
/usr/X11R6/include/X11/extensions/shape.h
misc.o: misc.c /usr/include/stdio.h /usr/include/sys/types.h \
/usr/include/machine/ansi.h /usr/include/machine/types.h \
/usr/include/sys/cdefs.h /usr/include/machine/endian.h \
/usr/include/stdlib.h /usr/include/string.h /usr/include/ctype.h \
/usr/include/runetype.h /usr/include/unistd.h \
/usr/include/sys/unistd.h /usr/include/sys/time.h /usr/include/time.h \
mlvwm.h /usr/X11R6/include/X11/Xlib.h /usr/X11R6/include/X11/X.h \
/usr/X11R6/include/X11/Xfuncproto.h /usr/X11R6/include/X11/Xosdefs.h \
/usr/include/stddef.h /usr/X11R6/include/X11/Xutil.h \
/usr/X11R6/include/X11/cursorfont.h /usr/X11R6/include/X11/xpm.h \
sun_headers.h /usr/include/sys/wait.h menus.h screen.h config.h
mlvwm.o: mlvwm.c /usr/include/stdio.h /usr/include/sys/types.h \
/usr/include/machine/ansi.h /usr/include/machine/types.h \
/usr/include/sys/cdefs.h /usr/include/machine/endian.h \
/usr/include/stdlib.h /usr/include/signal.h /usr/include/sys/signal.h \
/usr/include/machine/signal.h /usr/include/machine/trap.h \
/usr/include/string.h /usr/include/unistd.h /usr/include/sys/unistd.h \
/usr/include/fcntl.h mlvwm.h /usr/X11R6/include/X11/Xlib.h \
/usr/X11R6/include/X11/X.h /usr/X11R6/include/X11/Xfuncproto.h \
/usr/X11R6/include/X11/Xosdefs.h /usr/include/stddef.h \
/usr/X11R6/include/X11/Xutil.h /usr/X11R6/include/X11/cursorfont.h \
/usr/X11R6/include/X11/xpm.h sun_headers.h /usr/include/sys/wait.h \
screen.h menus.h config.h event.h add_window.h functions.h misc.h \
/usr/X11R6/include/X11/Xproto.h /usr/X11R6/include/X11/Xmd.h \
/usr/X11R6/include/X11/Xprotostr.h /usr/X11R6/include/X11/Xatom.h \
/usr/X11R6/include/X11/Xresource.h \
/usr/X11R6/include/X11/extensions/shape.h \
/usr/X11R6/include/X11/Xlocale.h /usr/include/locale.h
wild.o: wild.c /usr/include/stdio.h /usr/include/sys/types.h \
/usr/include/machine/ansi.h /usr/include/machine/types.h \
/usr/include/sys/cdefs.h /usr/include/machine/endian.h

View File

@ -2,7 +2,7 @@ XCOMM Imakefile for MLVWM
#include "../configure.h"
VERSION = 0.8.9
VERSION = 0.9.4
COMPILE_OPTIONS = -DVERSION=\"$(VERSION)\" \
-DCONFIGNAME=\"$(MLVWMRC)\" \
-DMLVWMLIBDIR=\"$(MLVWMLIBDIR)\"

View File

@ -1,10 +1,10 @@
VERSION=\"0.6.2\"
CFLAGS = -g -Wall -DVERSION=$(VERSION) -fpcc-struct-return -DCONFIGNAME=\".mlvwmrc\"
VERSION=\"0.9.3\"
CFLAGS = -g -Wall -DVERSION=$(VERSION) -fpcc-struct-return -DCONFIGNAME=\".mlvwmrc\" -DUSE_LOCALE -DMLVWMLIBDIR=\"/usr/X11R6/lib/X11/mlvwm\"
CC = gcc
LDFLAGS = -lXpm -lXext -lX11
CPPFLAGS = -I/usr/X11R6/include
SRC = add_window.c borders.c config.c event.c menus.c mlvwm.c functions.c\
sound.c
SRC = add_window.c balloon.c borders.c config.c \
event.c functions.c menus.c misc.c mlvwm.c wild.c
OBJS = $(SRC:.c=.o)
TARGET = mlvwm

View File

@ -1,6 +1,6 @@
/****************************************************************************/
/* This module is based on fvwm, but has been siginificantly modified */
/* by TakaC Hasegawa (tak@bioele.nuee.nagoya-u.ac.jp) */
/* by TakaC Hasegawa (tac.hasegawa@gmail.com) */
/****************************************************************************/
/****************************************************************************
* This module is based on Twm, but has been siginificantly modified
@ -35,6 +35,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mlvwm.h"
#include "screen.h"
@ -77,7 +78,7 @@ styles *lookupstyles( char *name, XClassHint *class )
style = nptr;
}
}
if( style->iconname && !(style->miniicon) )
if( style && style->iconname && !(style->miniicon) )
style->miniicon = ReadIcon( style->iconname, NULL, False );
return style;
}
@ -203,7 +204,7 @@ void create_titlebar( MlvwmWindow *tmp_win )
if( tmp_win->flags&CLOSER ){
attributes.cursor = Scr.MlvwmCursors[DESTROY];
tmp_win->close_b = XCreateWindow( dpy, tmp_win->title_w,
Scr.flags&SYSTEM8?4:BOXSIZE+1,
Scr.flags&SYSTEM8?2:BOXSIZE-3,
(TITLE_HEIGHT-BOXSIZE)/2,
BOXSIZE, BOXSIZE, 0,
CopyFromParent, InputOutput,
@ -214,7 +215,7 @@ void create_titlebar( MlvwmWindow *tmp_win )
if( tmp_win->flags&MINMAXR ){
attributes.cursor = Scr.MlvwmCursors[SELECT];
tmp_win->minmax_b = XCreateWindow( dpy, tmp_win->title_w,
tmp_win->frame_w-BOXSIZE*2-1,
tmp_win->frame_w-(BOXSIZE*2-3),
(TITLE_HEIGHT-BOXSIZE)/2,
BOXSIZE, BOXSIZE, 0,
CopyFromParent, InputOutput,
@ -576,14 +577,14 @@ MlvwmWindow *AddWindow( Window win )
tmp_win->frame_y =
tmp_win->attr.y+tmp_win->frame_h < Scr.MyDisplayHeight ?
tmp_win->frame_y : Scr.MyDisplayHeight-tmp_win->frame_h-2;
if( tmp_win->frame_y<MENUB_H )
tmp_win->frame_y = MENUB_H;
}
else{
tmp_win->frame_x -= diff_x;
tmp_win->frame_y -= diff_y;
}
if( tmp_win->frame_y<MENUB_H ) tmp_win->frame_y = MENUB_H;
valuemask = CWCursor | CWEventMask | CWBackPixel;
attributes.cursor = Scr.MlvwmCursors[TITLE_CURSOR];

View File

@ -1,6 +1,6 @@
/****************************************************************************
* This module is all original code
* by TakaC Hasegawa (tak@bioele.nuee.nagoya-u.ac.jp
* by TakaC Hasegawa (tac.hasegawa@gmail.com)
* Copyright 1996, TakaC Hasegawa
* You may use this code for any purpose, as long as the original
* copyright remains in the source code and all documentation

View File

@ -1,17 +1,19 @@
/****************************************************************************/
/* This module is mostly all new */
/* by TakaC Hasegawa (tak@bioele.nuee.nagoya-u.ac.jp) */
/* by TakaC Hasegawa (tac.hasegawa@gmail.com) */
/* Copyright 1996 TakaC Hasegawa. No restrictions are placed on this code, */
/* as long as the copyright notice is preserved */
/****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mlvwm.h"
#include "screen.h"
#include "misc.h"
#include "event.h"
#include "balloon.h"
#include <X11/extensions/shape.h>
@ -155,7 +157,7 @@ void ShapeBalloon( int fx, int fy, int xoff, int yoff, int woff, int hoff, int w
void BalloonSize( int *lh, int *lw, int *offset, int *w, int *h, MlvwmWindow *mw )
{
int lp;
char contents[256];
char contents[MAX_BALLOON_STR_LEN];
int contents_width=0, strw, strh;
int xinc, yinc;
@ -222,7 +224,7 @@ void BalloonSize( int *lh, int *lw, int *offset, int *w, int *h, MlvwmWindow *mw
void DrawWindowBalloon( int xoff, int yoff, int lh, int offset, int lw, MlvwmWindow *mw )
{
int lp;
char contents[255];
char contents[MAX_BALLOON_STR_LEN];
int xinc, yinc;
for( lp=0; WinLabel[lp]!=NULL; lp++ ){
@ -283,6 +285,7 @@ void BalloonHelp( void )
return;
}
printf("flags %x\n", tmp_win->flags );
if( Scr.Balloon==None ) CreateBalloonWindow();
BalloonSize( &one_line, &label_width, &offset, &width, &height, tmp_win );

View File

@ -1,6 +1,6 @@
/****************************************************************************/
/* This module is all original code */
/* by TakaC Hasegawa (tak@bioele.nuee.nagoya-u.ac.jp */
/* by TakaC Hasegawa (tac.hasegawa@gmail.com) */
/* Copyright 1996, TakaC Hasegawa */
/* You may use this code for any purpose, as long as the original */
/* copyright remains in the source code and all documentation */
@ -8,5 +8,7 @@
#ifndef _BALLOON_
#define _BALLOON_
#define MAX_BALLOON_STR_LEN 255
extern void BalloonHelp( void );
#endif /* _BALLOON_ */

View File

@ -1,6 +1,6 @@
/****************************************************************************/
/* This module is based on fvwm, but has been siginificantly modified */
/* by TakaC Hasegawa (tak@bioele.nuee.nagoya-u.ac.jp) */
/* by TakaC Hasegawa (tac.hasegawa@gmail.com) */
/****************************************************************************/
/****************************************************************************
* This module is based on Twm, but has been siginificantly modified
@ -55,13 +55,13 @@ void DrawShadowBox( int x, int y, int w, int h, Window win, int d, GC hilight, G
h--;
for( lp=0; lp<d; lp++ ){
if( mode&SHADOW_BOTTOM )
XDrawLine( dpy, win, shadow, x+lp, y+h-lp, x+w-lp, y+h-lp );
XDrawLine( dpy, win, shadow, x+lp+1, y+h-lp, x+w-lp, y+h-lp );
if( mode&SHADOW_LEFT )
XDrawLine( dpy, win, hilight, x+lp, y+lp, x+lp, y+h-lp );
XDrawLine( dpy, win, hilight, x+lp, y+lp, x+lp, y+h-lp-1 );
if( mode&SHADOW_TOP )
XDrawLine( dpy, win, hilight, x+lp, y+lp, x+w-lp, y+lp );
XDrawLine( dpy, win, hilight, x+lp, y+lp, x+w-lp-1, y+lp );
if( mode&SHADOW_RIGHT )
XDrawLine( dpy, win, shadow, x+w-lp, y+lp, x+w-lp, y+h-lp );
XDrawLine( dpy, win, shadow, x+w-lp, y+lp+1, x+w-lp, y+h-lp-1 );
}
}
@ -129,15 +129,15 @@ void SetUpFrame( MlvwmWindow *t, int x, int y, int w, int h, Bool sendEvent )
if( t->flags&MINMAXR ){
if( Scr.flags&SYSTEM8 )
XMoveWindow(dpy, t->minmax_b,
w-BOXSIZE-9-(t->flags&SHADER?BOXSIZE+4:0),
w-BOXSIZE-7-(t->flags&SHADER?BOXSIZE+4:0),
(TITLE_HEIGHT-BOXSIZE)/2);
else
XMoveWindow(dpy, t->minmax_b,
w-BOXSIZE*2-1,
w-(BOXSIZE*2-2),
(TITLE_HEIGHT-BOXSIZE)/2);
}
if( t->flags&SHADER )
XMoveWindow(dpy, t->shade_b, w-BOXSIZE-9,
XMoveWindow(dpy, t->shade_b, w-BOXSIZE-8,
(TITLE_HEIGHT-BOXSIZE)/2);
if( !(t->flags&SHADE) ){
if( t->flags & ( TITLE | SBARV | SBARH | RESIZER ) ){
@ -246,21 +246,21 @@ void SetUpFrame( MlvwmWindow *t, int x, int y, int w, int h, Bool sendEvent )
if( (!(t->wShaped) || t->flags&SHADE) &&
t->flags & ( TITLE | SBARV | SBARH | RESIZER )){
int lp;
XRectangle rect[7];
XRectangle rect[5];
rect[0].x = -1; rect[0].y = -1;
rect[0].width = t->frame_w-1; rect[0].height = t->frame_h-1;
for( lp=0; lp<3; lp++ ){
for( lp=0; lp<2; lp++ ){
rect[lp+1].x = t->frame_w-2+lp; rect[lp+1].y = lp;
rect[lp+1].width = 1; rect[lp+1].height = t->frame_h+1-lp;
rect[lp+1].width = 1; rect[lp+1].height = t->frame_h-lp;
}
for( lp=0; lp<3; lp++ ){
rect[lp+4].x = lp; rect[lp+4].y = t->frame_h-2+lp;
rect[lp+4].width = t->frame_w+1-lp; rect[lp+4].height = 1;
for( lp=0; lp<2; lp++ ){
rect[lp+3].x = lp; rect[lp+3].y = t->frame_h-2+lp;
rect[lp+3].width = t->frame_w-lp; rect[lp+3].height = 1;
}
XShapeCombineRectangles(dpy,t->frame,ShapeBounding,
0,0,rect,7,ShapeSet,YSorted);
0,0,rect,5,ShapeSet,YSorted);
}
if( t->wShaped ) SetShape( t, w );
if (sendEvent && !(t->flags&SHADE) ){
@ -334,13 +334,13 @@ void DrawCloseBox( MlvwmWindow *t, Bool on )
if( Scr.flags&SYSTEM8 ){
XFillRectangle( dpy, t->title_w, Scr.Gray4GC,
4, (TITLE_HEIGHT-BOXSIZE)/2-2,
BOXSIZE+7, BOXSIZE+2 );
BOXSIZE+2, BOXSIZE+2 );
FillGradation( t->close_b );
}
else{
XFillRectangle( dpy, t->title_w, Scr.Gray4GC,
BOXSIZE-1, (TITLE_HEIGHT-BOXSIZE)/2-1,
BOXSIZE+4, BOXSIZE+1 );
BOXSIZE-4, (TITLE_HEIGHT-BOXSIZE)/2-1,
BOXSIZE+2, BOXSIZE+1 );
DrawShadowBox( 0, 0, BOXSIZE, BOXSIZE, t->close_b, 1,
Scr.BlackGC, Scr.WhiteGC, SHADOW_ALL );
DrawShadowBox( 1, 1, BOXSIZE-2, BOXSIZE-2, t->close_b, 1,
@ -376,23 +376,23 @@ void DrawMinMax( MlvwmWindow *t, Bool on )
if( on ){
if( Scr.flags&SYSTEM8 ){
XFillRectangle( dpy, t->title_w, Scr.Gray4GC,
t->frame_w-BOXSIZE-15-
t->frame_w-BOXSIZE-9-
(t->flags&SHADER?BOXSIZE+6:0),
(TITLE_HEIGHT-BOXSIZE)/2-1,
BOXSIZE+8, BOXSIZE+2 );
FillGradation( t->minmax_b );
XDrawRectangle( dpy, t->minmax_b, Scr.BlackGC,
1, 1, BOXSIZE-6, BOXSIZE-6 );
1, 1, BOXSIZE-7, BOXSIZE-7 );
}
else{
XFillRectangle( dpy, t->title_w, Scr.Gray4GC,
t->frame_w-BOXSIZE*2-3,(TITLE_HEIGHT-BOXSIZE)/2-1,
BOXSIZE+4, BOXSIZE+1 );
t->frame_w-(BOXSIZE*2-1),(TITLE_HEIGHT-BOXSIZE)/2-1,
BOXSIZE+2, BOXSIZE+1 );
DrawShadowBox( 0, 0, BOXSIZE, BOXSIZE, t->minmax_b, 1,
Scr.BlackGC, Scr.WhiteGC, SHADOW_ALL );
DrawShadowBox( 1, 1, BOXSIZE-2, BOXSIZE-2, t->minmax_b, 1,
Scr.WhiteGC, Scr.BlackGC, SHADOW_ALL );
DrawShadowBox( 1, 1, BOXSIZE-6, BOXSIZE-6, t->minmax_b, 1,
DrawShadowBox( 1, 1, BOXSIZE-5, BOXSIZE-5, t->minmax_b, 1,
Scr.WhiteGC, Scr.BlackGC, SHADOW_ALL );
}
}
@ -488,42 +488,32 @@ void SetTitleBar( MlvwmWindow *t, Bool on_off )
while( w+20>drawable && titlelength>0 );
if( on_off ){
for( lp=4; lp<14; lp+=3 ){
if( Scr.d_depth>1 ){
if( Scr.flags&SYSTEM8 )
DrawShadowBox( 4, lp-2, t->frame_w-15, 2, t->title_w, 1,
if( Scr.d_depth>1 && Scr.flags&SYSTEM8 ){
for( lp=4; lp<16; lp+=2 ){
DrawShadowBox( 4, lp-1, t->frame_w-14, 2, t->title_w, 1,
Scr.WhiteGC, Scr.Gray1GC, SHADOW_ALL );
else
DrawShadowBox( 4, lp-1, t->frame_w-11, 2, t->title_w, 1,
Scr.Gray1GC, Scr.WhiteGC, SHADOW_ALL );
}
else
XDrawLine( dpy, t->title_w, Scr.BlackGC,
4, lp-1, t->frame_w-7, lp-1 );
}
if( Scr.d_depth>1 ){
if( Scr.flags&SYSTEM8 )
DrawShadowBox( 4, 14, t->frame_w-15, 2, t->title_w, 1,
Scr.WhiteGC, Scr.Gray1GC, SHADOW_ALL );
else
XDrawLine( dpy, t->title_w, Scr.Gray1GC,
4, 15, t->frame_w-9, 15 );
}
else
XDrawLine( dpy, t->title_w, Scr.BlackGC,
4, 15, t->frame_w-7, 15 );
if( Scr.flags&SYSTEM8 ){
DrawShadowBox( 0, 0, t->frame_w-2, TITLE_HEIGHT, t->title_w,
1, Scr.WhiteGC, Scr.Gray2GC, SHADOW_TOP );
if( !(t->flags&SHADE) )
XDrawLine( dpy, t->title_w, Scr.Gray2GC,
2, TITLE_HEIGHT-1, t->frame_w-9, TITLE_HEIGHT-1 );
}
else
else{
for( lp=3; lp<15; lp+=2 ){
if( Scr.d_depth>1 )
XDrawLine( dpy, t->title_w, Scr.Gray1GC, 0, lp, t->frame_w, lp );
else
XDrawLine( dpy, t->title_w, Scr.BlackGC, 0, lp, t->frame_w, lp );
}
DrawShadowBox( 0, 0, t->frame_w-2, TITLE_HEIGHT, t->title_w,
1, Scr.WhiteGC, Scr.Gray2GC, SHADOW_ALL );
}
XFillRectangle( dpy, t->title_w, Scr.Gray4GC,
(t->frame_w-w)/2-10, 1, w+20, TITLE_HEIGHT-2 );
(t->frame_w-w)/2-5, 1, w+10, TITLE_HEIGHT-2 );
dispgc = Scr.BlackGC;
}
else{
@ -535,7 +525,7 @@ void SetTitleBar( MlvwmWindow *t, Bool on_off )
if( t->flags&SHADER ) DrawShadeR( t, on_off );
XDRAWSTRING( dpy, t->title_w, WINDOWFONT, dispgc, (t->frame_w-w)/2,
TITLE_HEIGHT/2-offset, t->name, titlelength );
TITLE_HEIGHT/2-offset+(Scr.flags&SYSTEM8?0:1), t->name, titlelength );
if( Scr.d_depth<2 && !on_off ){
xgcv.function = GXor;
mask = GCFunction;
@ -549,11 +539,11 @@ void SetTitleBar( MlvwmWindow *t, Bool on_off )
}
}
void DrawArrow( Window w, int direction, GC color )
void DrawArrow( Window w, int direction, GC fill, GC outline )
{
XPoint arrow_p[] = {
{9,3},{2,10},{6,10},{6,15},{12,15},{12,10},{16,10},{9,3}, {0,0}},
arrow_p8[] = {{15,11},{9,5},{3,11},{15,11}, {0,0}};
{7,3},{2,8},{5,8},{5,12},{9,12},{9,8},{12,8},{7,3}, {0,0}},
arrow_p8[] = {{7,6},{4,9},{11,9},{8,6},{7,6}, {0,0}};
XPoint *use_p;
int lp, JunkX, point;
@ -561,8 +551,8 @@ void DrawArrow( Window w, int direction, GC color )
else use_p = arrow_p;
for( point=0; use_p[point].x!=0; point++ ){
use_p[point].x = use_p[point].x*SBAR_WH/19.+0.5;
use_p[point].y = use_p[point].y*SBAR_WH/19.+0.5;
use_p[point].x = use_p[point].x*SBAR_WH/16.;
use_p[point].y = use_p[point].y*SBAR_WH/16.;
}
if( direction==C_SBAR_LEFT || direction==C_SBAR_RIGHT ){
@ -578,8 +568,8 @@ void DrawArrow( Window w, int direction, GC color )
if( direction==C_SBAR_DOWN )
for( lp=0; lp<point; lp++ ) use_p[lp].y = SBAR_WH-use_p[lp].y-1;
XFillPolygon( dpy, w, color, use_p, point, Nonconvex, CoordModeOrigin );
XDrawLines( dpy, w, Scr.BlackGC, use_p, point, CoordModeOrigin );
XFillPolygon( dpy, w, fill, use_p, point, Nonconvex, CoordModeOrigin );
XDrawLines( dpy, w, outline, use_p, point, CoordModeOrigin );
}
void DrawSbarAnk( MlvwmWindow *t, int context, Bool on_off )
@ -618,18 +608,17 @@ void DrawSbarAnk( MlvwmWindow *t, int context, Bool on_off )
DrawShadowBox( 0, 0, SBAR_WH, SBAR_WH, win, 1,
Scr.WhiteGC, Scr.Gray2GC, SHADOW_ALL );
scale = 11*SBAR_WH/19.+0.5;
scale = 8*SBAR_WH/16.;
if( context==C_SBAR_H_AN ){
for( lp=0; lp<(SBAR_WH-6)/3; lp++ )
DrawShadowBox( (lp+1)*3, (SBAR_WH-scale)/2+1,
3, scale, win, 1,
for( lp=0; lp<(SBAR_WH-8)/2; lp++ )
DrawShadowBox( (lp+2)*2, (SBAR_WH-scale)/2,
2, scale, win, 1,
Scr.WhiteGC, Scr.BlackGC, SHADOW_ALL );
}
if( context==C_SBAR_V_AN ){
scale = 11*SBAR_WH/19.+0.5;
for( lp=0; lp<(SBAR_WH-6)/3; lp++ )
DrawShadowBox( (SBAR_WH-scale)/2, (lp+1)*3,
scale, 3, win, 1,
for( lp=0; lp<(SBAR_WH-8)/2; lp++ )
DrawShadowBox( (SBAR_WH-scale)/2, (lp+2)*2,
scale, 2, win, 1,
Scr.WhiteGC, Scr.BlackGC, SHADOW_ALL );
}
}
@ -664,6 +653,7 @@ void DrawSbarArrow( MlvwmWindow *t, int context, Bool on_off )
XGCValues xgcv;
XSetWindowAttributes attributes;
Cursor cursor;
GC fill, outline;
switch( context ){
case C_SBAR_UP:
@ -704,11 +694,22 @@ void DrawSbarArrow( MlvwmWindow *t, int context, Bool on_off )
XChangeWindowAttributes( dpy, win, valuemask, &attributes );
XClearWindow( dpy, win );
if( t->flags&SCROLL && size<0 )
if( t->flags&SCROLL && size<0 ) {
DrawShadowBox( 0, 0, SBAR_WH, SBAR_WH, win, 1,
Scr.WhiteGC, Scr.Gray2GC, SHADOW_ALL );
DrawArrow( win, context, Scr.Gray3GC );
if( Scr.flags&SYSTEM8 )
fill = outline = Scr.BlackGC;
else {
fill = Scr.Gray3GC;
outline = Scr.BlackGC;
}
}
else{
fill = outline = Scr.Gray2GC;
if( !(Scr.flags&SYSTEM8) )
fill = Scr.Gray4GC;
}
DrawArrow( win, context, fill, outline);
}
else{
mask = GCForeground;
@ -762,16 +763,29 @@ void DrawSbarBar( MlvwmWindow *t, int context, Bool on_off )
if( on_off ){
if( t->flags&SCROLL && size<0 ){
if( Scr.flags&SYSTEM8 ){
Pixmap bgpix;
bgpix = XCreatePixmap( dpy, Scr.Root, width_f,
height_f, Scr.d_depth );
XFillRectangle(dpy,bgpix,Scr.Gray3GC,0,0,width_f,height_f);
if( Scr.d_depth>1 ){
if( Scr.flags&SYSTEM8 ){
Pixmap bgpix;
bgpix = XCreatePixmap( dpy, Scr.Root, width_f,
height_f, Scr.d_depth );
XFillRectangle(dpy,bgpix,Scr.Gray3GC,0,0,width_f,height_f);
DrawShadowBox( x, y, width, height, bgpix, 1,
DrawShadowBox( x, y, width, height, bgpix, 1,
Scr.Gray2GC, Scr.WhiteGC, SHADOW_ALL );
XSetWindowBackgroundPixmap( dpy, win, bgpix );
XFreePixmap( dpy, bgpix );
XSetWindowBackgroundPixmap( dpy, win, bgpix );
XFreePixmap( dpy, bgpix );
}
else{
XGCValues gcv_gray4, gcv_gray2;
XGetGCValues(dpy, Scr.Gray4GC, GCForeground, &gcv_gray4);
XGetGCValues(dpy, Scr.Gray2GC, GCForeground, &gcv_gray2);
XSetWindowBackgroundPixmap( dpy, win,
XCreatePixmapFromBitmapData( dpy, Scr.Root,
mesh, mesh_w, mesh_h,
gcv_gray2.foreground,
gcv_gray4.foreground,
Scr.d_depth ));
}
}
else{
XSetWindowBackgroundPixmap( dpy, win,
@ -902,26 +916,26 @@ void DrawResizeBox( MlvwmWindow *t, Bool on_off )
if( Scr.flags&SYSTEM8 ){
for(lp=0; lp<3; lp++ ){
XDrawLine( dpy, t->resize_b, Scr.WhiteGC,
2+lp*3, 9+lp*3, 8+lp*3, 3+lp*3 );
3+lp*2, 8+lp*2, 7+lp*2, 4+lp*2 );
XDrawLine( dpy, t->resize_b, Scr.BlackGC,
4+lp*3, 8+lp*3, 9+lp*3, 3+lp*3 );
4+lp*2, 8+lp*2, 8+lp*2, 4+lp*2 );
}
}
else{
point = 6*SBAR_WH/19.+0.5;
scale = 9*SBAR_WH/19.+0.5;
point = 4*SBAR_WH/16.;
scale = 9*SBAR_WH/16.;
DrawShadowBox( point, point, scale, scale, t->resize_b,
1, Scr.WhiteGC, Scr.BlackGC, SHADOW_ALL );
DrawShadowBox( point-1, point-1, scale+2, scale+2, t->resize_b,
1, Scr.BlackGC, Scr.WhiteGC, SHADOW_ALL );
point = 3*SBAR_WH/19.+0.5;
scale = 8*SBAR_WH/19.+0.5;
point = 3*SBAR_WH/16.;
scale = 6*SBAR_WH/16.;
XFillRectangle( dpy, t->resize_b, Scr.Gray4GC,
point, point, scale, scale );
point = 4*SBAR_WH/19.+0.5;
scale = 7*SBAR_WH/19.+0.5;
point = 3*SBAR_WH/16.;
scale = 5*SBAR_WH/16.;
DrawShadowBox( point, point, scale, scale, t->resize_b,
1, Scr.WhiteGC, Scr.BlackGC, SHADOW_ALL );
DrawShadowBox( point-1, point-1, scale+2, scale+2, t->resize_b,
@ -966,6 +980,7 @@ void DrawAllDecorations( MlvwmWindow *t, Bool on_off )
void SetFocus( MlvwmWindow *t )
{
char *str, action[24], *winname;
size_t str_size;
unsigned long mask, valuemask;
XSetWindowAttributes attributes;
XGCValues xgcv;
@ -1016,8 +1031,9 @@ void SetFocus( MlvwmWindow *t )
ChangeMenuLabel( &(Scr.IconMenu), NULL,
t->miniicon==NULL?Scr.SystemIcon:t->miniicon );
if( !(t->flags&TRANSIENT) ){
str = calloc( strlen(t->name)+6, 1 );
sprintf( str, "Hide %s", t->name );
str_size = strlen(t->name)+6;
str = calloc( str_size, 1 );
snprintf( str, str_size, "Hide %s", t->name );
ChangeMenuItemLabel( "ICON", Scr.IconMenu.m_item->label,
str, NULL, SELECTON, M_COPY );
ChangeMenuItemLabel( "ICON", "Hide Others", "Hide Others",

View File

@ -1,6 +1,6 @@
/****************************************************************************/
/* This module is all original code */
/* by TakaC Hasegawa (tak@bioele.nuee.nagoya-u.ac.jp */
/* by TakaC Hasegawa (tac.hasegawa@gmail.com) */
/* Copyright 1996, TakaC Hasegawa */
/* You may use this code for any purpose, as long as the original */
/* copyright remains in the source code and all documentation */
@ -17,7 +17,7 @@
extern void SetShape( MlvwmWindow *, int );
extern void SetUpFrame( MlvwmWindow *, int, int, int, int, Bool );
extern void SetTitleBar( MlvwmWindow *, Bool );
extern void DrawArrow( Window, int, GC );
extern void DrawArrow( Window, int, GC, GC );
extern void DrawSbarAnk( MlvwmWindow *, int, Bool );
extern void DrawSbarArrow( MlvwmWindow *, int, Bool );
extern void DrawSbarBar( MlvwmWindow *, int, Bool );

View File

@ -1,6 +1,6 @@
/****************************************************************************/
/* This module is mostly all new */
/* by TakaC Hasegawa (tak@bioele.nuee.nagoya-u.ac.jp) */
/* by TakaC Hasegawa (tac.hasegawa@gmail.com) */
/* Copyright 1996 TakaC Hasegawa. No restrictions are placed on this code, */
/* as long as the copyright notice is preserved */
/****************************************************************************/
@ -152,11 +152,14 @@ char *SetMaxmizeScale( styles *tmp_style, char *str )
if( (stop = strchr( str, ',' ))!=NULL ) *stop = '\0';
if( strchr( SkipNonSpace(str), 'x' )){
tmp_style->maxmizescale = 0;
sscanf( str, "MaxmizeScale%dx%d",
&(tmp_style->maxmizesize_w), &(tmp_style->maxmizesize_h) );
if( sscanf( str, "MaxmizeScale%dx%d",
&(tmp_style->maxmizesize_w), &(tmp_style->maxmizesize_h) )!=2 )
DrawErrMsgOnMenu( "MaxmizeScale needs ", "width and height" );
}
else{
if( sscanf( str, "MaxmizeScale%d", &(tmp_style->maxmizescale) )!=1 )
DrawErrMsgOnMenu( "MaxmizeScale needs ", "size" );
}
else
sscanf( str, "MaxmizeScale%d", &(tmp_style->maxmizescale) );
if( stop ) stop++;
else stop = str+strlen(str);
@ -238,7 +241,7 @@ void SetStyles( char *line, FILE *fp )
int lp;
for( last = Scr.style_list; last && last->next; last=last->next );
while( fgets( str, 256, fp )!=NULL && strncmp( str, "END", 3) ){
while( fgetline( str, 256, fp )!=NULL && strncmp( str, "END", 3) ){
if( str[0]=='#' ) continue;
top = stripquote( str, &name );
if( name==NULL ){
@ -312,12 +315,12 @@ void SetStartFunction( char *line, FILE *fp )
if( (!strncmp( line, "InitFunction", 12 ) && Scr.Restarting) ||
(!strncmp( line, "RestartFunction", 15 ) && !Scr.Restarting)){
while( fgets( str, 256, fp )!=NULL && strncmp( str, "END", 3) );
while( fgetline( str, 256, fp )!=NULL && strncmp( str, "END", 3) );
return;
}
new = &Scr.StartFunc;
while( fgets( str, 256, fp )!=NULL && strncmp( str, "END", 3) ){
while( fgetline( str, 256, fp )!=NULL && strncmp( str, "END", 3) ){
if( str[0]=='#' ) continue;
*new = calloc( 1, sizeof( ShortCut ) );
top = SkipSpace( str );
@ -335,7 +338,7 @@ void SetShortCut( char *line, FILE *fp )
KeyCode keycode;
int len, tag;
while( fgets( str, 256, fp )!=NULL && strncmp( str, "END", 3) ){
while( fgetline( str, 256, fp )!=NULL && strncmp( str, "END", 3) ){
if( str[0]=='#' ) continue;
top = SkipSpace( str );
end = SkipNonSpace( top );
@ -428,6 +431,11 @@ void SetSloppyFocus( char *line, FILE *fp )
Scr.flags |= SLOPPYFOCUS;
}
void SetSwallowFocusClick( char *line, FILE *fp )
{
Scr.flags |= SWALLOWFOCUSCLICK;
}
void SetStickyHide( char *line, FILE *fp )
{
Scr.flags |= STICKHIDE;
@ -469,7 +477,9 @@ void SetBarWidth( char *line, FILE *fp )
void SetMenuFlush( char *line, FILE *fp )
{
sscanf( line, "FlushMenu%d%d", &(Scr.flush_time), &(Scr.flush_times) );
if( sscanf( line, "FlushMenu%d%d", &(Scr.flush_time), &(Scr.flush_times) )
!=2 )
DrawErrMsgOnMenu( "You must set FlushMenu", " length and times" );
Scr.flush_time *= 1000;
}
@ -698,10 +708,26 @@ void SetUseRootWin( char *line, FILE *fp )
SubstructureNotifyMask );
}
void SetEdgeResist( char *line, FILE *fp )
{
if( sscanf( line, "EdgeResistance%d%d", &(Scr.resist_x), &(Scr.resist_y) )
!=2 ){
DrawErrMsgOnMenu( "EdgeResistance needs ", "x force and y force" );
Scr.resist_x = 0;
Scr.resist_y = 0;
}
}
void SetRoundedCorners( char *line, FILE *fp )
{
Scr.flags |= ROUNDEDCORNERS;
}
config_func main_config[]={
{ "Desktopnum", SetDeskTopNum },
{ "DoubleClickTime", SetDoubleClickTime },
{ "DisplayDeskNumber", SetDisplayDeskNum },
{ "EdgeResistance", SetEdgeResist },
{ "FlushMenu", SetMenuFlush },
{ "FollowToMouse", SetFollowToMouse },
{ "Compatible", SetCompatible },
@ -718,6 +744,7 @@ config_func main_config[]={
{ "Menu", SetMenu},
{ "Read", ReadNewConfigFile },
{ "RestartPreviousState", SetRstPrevState },
{ "RoundedScreenCorners", SetRoundedCorners },
{ "ScrollBarWidth", SetBarWidth },
{ "ShadeMap", SetShadeMap },
{ "ShortCut", SetShortCut },
@ -726,6 +753,7 @@ config_func main_config[]={
{ "StickyHide", SetStickyHide },
{ "Style", SetStyles },
{ "Swallow", SetSwallow },
{ "SwallowFocusClick", SetSwallowFocusClick },
{ "System8", SetSystem8 },
{ "OpaqueMove", SetOpaqueMove },
{ "OpaqueResize", SetOpaqueResize },
@ -740,11 +768,13 @@ config_func main_config[]={
void ReadConfigFile( char *configfile )
{
int lp;
FILE *fp;
char str[256], *file, *cmp;
char str[1024], cmp[1024], *file, *str_start, *cmp_end;
int lp;
size_t len;
#ifdef MLVWMLIBDIR
char *sysrc;
size_t sysrc_size;
#endif
if( (file = LookUpFiles( NULL, configfile, R_OK ))==NULL )
@ -752,12 +782,14 @@ void ReadConfigFile( char *configfile )
#ifdef MLVWMLIBDIR
if( !file ){
if( strcmp( configfile, CONFIGNAME) ){
sysrc = calloc( strlen(MLVWMLIBDIR)+strlen(configfile)+2, 1 );
sprintf( sysrc, "%s/%s", MLVWMLIBDIR, configfile );
sysrc_size = strlen(MLVWMLIBDIR)+strlen(configfile)+2;
sysrc = calloc( sysrc_size, 1 );
snprintf( sysrc, sysrc_size, "%s/%s", MLVWMLIBDIR, configfile );
}
else{
sysrc = calloc( strlen(MLVWMLIBDIR)+strlen(configfile)+9, 1 );
sprintf( sysrc, "%s/system%s", MLVWMLIBDIR, configfile );
sysrc_size = strlen(MLVWMLIBDIR)+strlen(configfile)+9;
sysrc = calloc( sysrc_size, 1 );
snprintf( sysrc, sysrc_size, "%s/system%s", MLVWMLIBDIR, configfile );
}
file = LookUpFiles( NULL, sysrc, R_OK );
free( sysrc );
@ -768,17 +800,24 @@ void ReadConfigFile( char *configfile )
if( file ) free( file );
return;
}
while( fgets( str, 256, fp )!=NULL ){
while( fgetline( str, sizeof(str), fp )!=NULL ){
if( Scr.flags & DEBUGOUT )
DrawStringMenuBar( str );
cmp = str;
if( *cmp == '#' ) continue;
cmp = SkipSpace( cmp );
if( *cmp == '\n' ) continue;
str_start = str;
if( *str_start == '#' ) continue;
str_start = SkipSpace( str_start );
if( *str_start == '\n' ) continue;
snprintf( cmp, sizeof(cmp), "%s", str_start );
cmp_end = SkipNonSpace( cmp );
*cmp_end = '\0';
for( lp=0; main_config[lp].label!=NULL; lp++ ){
if( !strncmp( cmp, main_config[lp].label,
strlen(main_config[lp].label) )){
len = strlen(cmp);
if( strlen(main_config[lp].label) > len )
len = strlen(main_config[lp].label);
if( !strncmp( cmp, main_config[lp].label, len )){
main_config[lp].action( str, fp );
break;
}

View File

@ -1,6 +1,6 @@
/****************************************************************************/
/* This module is all original code */
/* by TakaC Hasegawa (tak@bioele.nuee.nagoya-u.ac.jp */
/* by TakaC Hasegawa (tac.hasegawa@gmail.com) */
/* Copyright 1996, TakaC Hasegawa */
/* You may use this code for any purpose, as long as the original */
/* copyright remains in the source code and all documentation */
@ -44,6 +44,7 @@ struct configure
extern void SetDeskTopNum( char *, FILE * );
extern void SetFollowToMouse( char *, FILE * );
extern void SetSwallowFocusClick( char *, FILE * );
extern void ReadConfigFile( char * );
extern void FreeStyles( void );

View File

@ -1,6 +1,6 @@
/****************************************************************************/
/* This module is based on fvwm, but has been siginificantly modified */
/* by TakaC Hasegawa (tak@bioele.nuee.nagoya-u.ac.jp) */
/* by TakaC Hasegawa (tac.hasegawa@gmail.com) */
/****************************************************************************/
/****************************************************************************
* This module is based on Twm, but has been siginificantly modified
@ -255,6 +255,7 @@ MlvwmWindow *NextActiveWin( MlvwmWindow *t )
!(NextActive->flags&NOWINLIST) &&
!(NextActive->flags&SKIPSELECT) &&
!(NextActive->flags&NOFOCUS) &&
(!t->wmhints || t->wmhints->input!=False) &&
NextActive->Desk==Scr.currentdesk)
break;
}
@ -382,7 +383,7 @@ void handle_configure_request( XEvent *ev )
unsigned long xwcm;
MlvwmWindow *tmp_win;
XConfigureRequestEvent *xcr = &ev->xconfigurerequest;
int x, y, width, height, old_x, old_y;
int x, y, width, height;
int title_height, sbar_v, sbar_h;
Bool notify=False;
@ -417,8 +418,6 @@ void handle_configure_request( XEvent *ev )
x = tmp_win->frame_x;
y = tmp_win->frame_y;
old_x = x;
old_y = y;
width = tmp_win->frame_w;
height = tmp_win->frame_h;
@ -440,24 +439,21 @@ void handle_configure_request( XEvent *ev )
if (xcr->value_mask & CWWidth) width = xcr->width+12;
if (xcr->value_mask & CWHeight) height = xcr->height+12;
}
/*
tmp_win->frame_x = x<0 ? 0 : x;
tmp_win->frame_y = y<MENUB_H ? MENUB_H : y;
*/
tmp_win->win_w = width;
tmp_win->win_h = height;
if( old_x!=x || old_y!=y ) notify = True;
// prevent windows from being moved above menu bar
if (y < MENUB_H)
y = MENUB_H;
if( tmp_win->frame_x!=x || tmp_win->frame_y!=y ) notify = True;
if( !(tmp_win->flags&SCROLL) ||
tmp_win->frame_w>tmp_win->win_w || !(tmp_win->flags&SBARH) )
tmp_win->frame_w = tmp_win->win_w;
width>tmp_win->win_w || !(tmp_win->flags&SBARH) )
width = tmp_win->win_w;
if( !(tmp_win->flags&SCROLL) ||
tmp_win->frame_h>tmp_win->win_h || !(tmp_win->flags&SBARV) )
tmp_win->frame_h = tmp_win->win_h;
height>tmp_win->win_h || !(tmp_win->flags&SBARV) )
height = tmp_win->win_h;
SetUpFrame(tmp_win, tmp_win->frame_x, tmp_win->frame_y,
tmp_win->frame_w, tmp_win->frame_h, notify );
SetUpFrame(tmp_win, x, y, width, height, notify );
if( tmp_win==Scr.ActiveWin ){
Scr.ActiveWin = NULL;
@ -527,22 +523,43 @@ void MoveWindow( MlvwmWindow *mw, XEvent *evp )
XDrawRectangle( dpy, Scr.Root, Scr.RobberGC,
mw->frame_x-drag_x, mw->frame_y-drag_y,
mw->frame_w, mw->frame_h );
/* Calc. edge resistance */
/* edge inside the menu bar */
if( mw->frame_y-pre_y+y<MENUB_H ){
if( last_x==-1 ) last_x = x;
x=last_x;
y=pre_y-mw->frame_y+MENUB_H;
if( last_x==-1 ) last_x = x;
}
/* edge<0 */
if( y<MENUB_H ) x=last_x;
else{
last_x = -1;
if( pre_x-x>0 && Scr.resist_x>abs(mw->frame_x-pre_x+x) &&
mw->frame_x-pre_x+x<0 )
x = pre_x-mw->frame_x;
/* edge>display width */
if( x-pre_x>0 && Scr.resist_x+Scr.MyDisplayWidth>
abs(mw->frame_x+mw->frame_w-pre_x+x) &&
mw->frame_x+mw->frame_w-pre_x+x>Scr.MyDisplayWidth )
x = pre_x-mw->frame_x+Scr.MyDisplayWidth-mw->frame_w;
/* edge>display height */
if( y-pre_y>0 && Scr.resist_y+Scr.MyDisplayHeight>
abs(mw->frame_y+mw->frame_h-pre_y+y) &&
mw->frame_y+mw->frame_h-pre_y+y>Scr.MyDisplayHeight )
y = pre_y-mw->frame_y+Scr.MyDisplayHeight-mw->frame_h;
XWarpPointer( dpy, None, ev.xany.window, 0, 0, 0, 0, x, y );
if( mw->frame_y-pre_y+y<MENUB_H ) y=pre_y-mw->frame_y+MENUB_H;
drag_x = pre_x-x;
drag_y = pre_y-y;
if( Scr.flags&OPAQUEMOVE )
XMoveWindow( dpy, mw->frame,
mw->frame_x-drag_x, mw->frame_y-drag_y );
else
XDrawRectangle( dpy, Scr.Root, Scr.RobberGC,
mw->frame_x-drag_x, mw->frame_y-drag_y,
mw->frame_w, mw->frame_h );
XSync( dpy, 0 );
}
else last_x = -1;
drag_x = pre_x-x;
drag_y = pre_y-y;
if( Scr.flags&OPAQUEMOVE )
XMoveWindow( dpy, mw->frame,
mw->frame_x-drag_x, mw->frame_y-drag_y );
else
XDrawRectangle( dpy, Scr.Root, Scr.RobberGC,
mw->frame_x-drag_x, mw->frame_y-drag_y,
mw->frame_w, mw->frame_h );
XSync( dpy, 0 );
break;
}
}
@ -863,7 +880,7 @@ void ResizeWindow( MlvwmWindow *mw, XEvent *evp, Bool s_move )
}
if( !(Scr.flags&OPAQUERESIZE) ){
XGrabServer( dpy );
DrawResizeFrame( mw->frame_x, mw->frame_y, mw->frame_w, mw->frame_h, mw );
DrawResizeFrame(mw->frame_x,mw->frame_y,mw->frame_w,mw->frame_h,mw);
}
while( !isEnd ){
evmask = ButtonReleaseMask|ButtonMotionMask|PointerMotionMask;
@ -906,15 +923,18 @@ void ResizeWindow( MlvwmWindow *mw, XEvent *evp, Bool s_move )
}
if( xmotion!=0 || ymotion!=0 ){
if( !(Scr.flags&OPAQUERESIZE) )
DrawResizeFrame( mw->frame_x, mw->frame_y, new_w, new_h, mw );
DrawResizeFrame(mw->frame_x,mw->frame_y,new_w,new_h,mw);
if( xmotion!=0 )
new_w = org_w + (x - pre_x)*xmotion;
if( ymotion!=0 )
new_h = org_h + (y - pre_y)*ymotion;
if( new_w<4*SBAR_WH ) new_w = 4*SBAR_WH+1;
if( new_h<4*SBAR_WH+(mw->flags & TITLE ? TITLE_HEIGHT : 0) )
new_h = 4*SBAR_WH+(mw->flags & TITLE ? TITLE_HEIGHT : 0)+1;
if( new_w<(mw->flags&SBARH?4*SBAR_WH:0) )
new_w = (mw->flags*SBARH?4*SBAR_WH:0)+1;
if( new_h<(mw->flags&SBARV?4*SBAR_WH:0)+
(mw->flags&TITLE?TITLE_HEIGHT:0) )
new_h = (mw->flags&SBARV?4*SBAR_WH:0)+
(mw->flags&TITLE?TITLE_HEIGHT:0)+1;
ConstrainSize( mw, &new_w, &new_h );
@ -944,7 +964,7 @@ void MinMaxWindow( MlvwmWindow *mw, XEvent *evp )
DisplayPush( mw->minmax_b );
XDrawRectangle( dpy, mw->minmax_b, Scr.BlackGC,
1, 1, BOXSIZE-6, BOXSIZE-6 );
1, 1, BOXSIZE-7, BOXSIZE-7 );
while( !isEnd ){
XMaskEvent( dpy,
ButtonReleaseMask|EnterWindowMask|LeaveWindowMask, &ev );
@ -958,7 +978,7 @@ void MinMaxWindow( MlvwmWindow *mw, XEvent *evp )
if( ev.xcrossing.window==mw->minmax_b ){
DisplayPush( mw->minmax_b );
XDrawRectangle( dpy, mw->minmax_b, Scr.BlackGC,
1, 1, BOXSIZE-6, BOXSIZE-6 );
1, 1, BOXSIZE-6, BOXSIZE-6 );
isIn = True;
}
break;
@ -1223,7 +1243,10 @@ void PressSbar( Bool isHbar, Window pressedwin, MlvwmWindow *tmp_win )
anker = tmp_win->scroll_v[3];
}
if( pushd!=0 ){
DrawArrow( pressedwin, direction, Scr.BlackGC );
if( Scr.flags&SYSTEM8 )
DrawShadowBox( 0, 0, SBAR_WH, SBAR_WH, pressedwin, 1, Scr.Gray2GC, Scr.WhiteGC, SHADOW_ALL );
else
DrawArrow( pressedwin, direction, Scr.BlackGC, Scr.BlackGC );
XSync( dpy, 0 );
}
@ -1264,15 +1287,23 @@ void PressSbar( Bool isHbar, Window pressedwin, MlvwmWindow *tmp_win )
break;
case EnterNotify:
if( ev.xcrossing.window==pressedwin ){
if( !isSelect )
DrawArrow( pressedwin, direction, Scr.BlackGC );
if( !isSelect ) {
if( Scr.flags&SYSTEM8 )
DrawShadowBox( 0, 0, SBAR_WH, SBAR_WH, pressedwin, 1, Scr.Gray2GC, Scr.WhiteGC, SHADOW_ALL );
else
DrawArrow( pressedwin, direction, Scr.BlackGC, Scr.BlackGC );
}
isSelect = True;
}
break;
case LeaveNotify:
if( ev.xcrossing.window==pressedwin ){
if( isSelect )
DrawArrow( pressedwin, direction, Scr.Gray3GC );
if( isSelect ) {
if( Scr.flags&SYSTEM8 )
DrawShadowBox( 0, 0, SBAR_WH, SBAR_WH, pressedwin, 1, Scr.WhiteGC, Scr.Gray2GC, SHADOW_ALL );
else
DrawArrow( pressedwin, direction, Scr.Gray3GC, Scr.BlackGC );
}
isSelect = False;
}
break;
@ -1304,8 +1335,12 @@ void PressSbar( Bool isHbar, Window pressedwin, MlvwmWindow *tmp_win )
}
while( !isEnd );
if( pushd!=0 )
DrawArrow( pressedwin, direction, Scr.Gray3GC );
if( pushd!=0 ) {
if( Scr.flags&SYSTEM8 )
DrawShadowBox( 0, 0, SBAR_WH, SBAR_WH, pressedwin, 1, Scr.WhiteGC, Scr.Gray2GC, SHADOW_ALL );
else
DrawArrow( pressedwin, direction, Scr.Gray3GC, Scr.BlackGC );
}
XSync( dpy, 0 );
}
@ -1349,7 +1384,11 @@ void handle_button_press( XEvent *ev )
ev->xany.window = ev->xbutton.subwindow;
context = GetContext( Tmp_win, ev, &win );
}
XAllowEvents(dpy, AsyncPointer, CurrentTime );
if ( context==C_TITLE || Scr.flags&SWALLOWFOCUSCLICK )
XAllowEvents(dpy, AsyncPointer, CurrentTime );
else {
XAllowEvents(dpy, ReplayPointer, CurrentTime );
}
}
else
XAllowEvents(dpy, ReplayPointer, CurrentTime );
@ -1571,6 +1610,7 @@ void handle_property_request( XEvent *ev )
XTextProperty text_prop;
unsigned int JunkWidth, JunkHeight, JunkBW, JunkDepth;
char desk[8], *str, action[24];
size_t str_size;
#ifdef USE_LOCALE
int num;
char **list;
@ -1615,8 +1655,9 @@ void handle_property_request( XEvent *ev )
ChangeMenuItemLabel( "ICON", oldWinName, winname,
action, M_ALLSET, M_AND );
if( tmp_win==Scr.ActiveWin ){
str = calloc( strlen( tmp_win->name )+6, 1 );
sprintf( str, "Hide %s", tmp_win->name );
str_size = strlen(tmp_win->name)+6;
str = calloc( str_size, 1 );
snprintf( str, str_size, "Hide %s", tmp_win->name );
ChangeMenuItemLabel( "ICON", Scr.IconMenu.m_item->label,
str, NULL, SELECTON, M_COPY );
free( str );
@ -1686,6 +1727,7 @@ void HandleMapNotify( XEvent *ev )
XMapWindow(dpy, tmp_win->frame);
if( !(Scr.flags & FOLLOWTOMOUSE) &&
!(Scr.flags&SLOPPYFOCUS) &&
(!tmp_win->wmhints || tmp_win->wmhints->input!=False) &&
!(tmp_win->flags&NOFOCUS) )
SetFocus( tmp_win );
}

View File

@ -1,6 +1,6 @@
/****************************************************************************/
/* This module is all original code */
/* by TakaC Hasegawa (tak@bioele.nuee.nagoya-u.ac.jp */
/* by TakaC Hasegawa (tac.hasegawa@gmail.com) */
/* Copyright 1996, TakaC Hasegawa */
/* You may use this code for any purpose, as long as the original */
/* copyright remains in the source code and all documentation */

View File

@ -1,6 +1,6 @@
/****************************************************************************/
/* This module is all original code */
/* by TakaC Hasegawa (tak@bioele.nuee.nagoya-u.ac.jp */
/* by TakaC Hasegawa (tac.hasegawa@gmail.com) */
/* Copyright 1996, TakaC Hasegawa */
/* You may use this code for any purpose, as long as the original */
/* copyright remains in the source code and all documentation */
@ -674,7 +674,7 @@ void RestartSystem( char *action )
top = SkipSpace( SkipNonSpace( action+6 ));
if( strncmp( top, "mlvwm", 5 ) )
Done( 1, top );
Done( 1, strdup(top) );
else
Done( 1, NULL );
}

View File

@ -1,6 +1,6 @@
/****************************************************************************/
/* This module is all original code */
/* by TakaC Hasegawa (tak@bioele.nuee.nagoya-u.ac.jp */
/* by TakaC Hasegawa (tac.hasegawa@gmail.com) */
/* Copyright 1996, TakaC Hasegawa */
/* You may use this code for any purpose, as long as the original */
/* copyright remains in the source code and all documentation */

View File

@ -1,6 +1,6 @@
/****************************************************************************/
/* This module is all original code */
/* by TakaC Hasegawa (tak@bioele.nuee.nagoya-u.ac.jp */
/* by TakaC Hasegawa (tac.hasegawa@gmail.com) */
/* Copyright 1996, TakaC Hasegawa */
/* You may use this code for any purpose, as long as the original */
/* copyright remains in the source code and all documentation */
@ -120,27 +120,30 @@ void RedrawMenuBar( void )
if( Scr.flags&SYSTEM8 )
DrawShadowBox( 0, 0, Scr.MyDisplayWidth, MENUB_H, Scr.MenuBar, 1,
Scr.WhiteGC, Scr.Gray1GC, SHADOW_ALL );
XFillRectangle( dpy, Scr.MenuBar, Scr.BlackGC, 0, 0, 7, 7 );
XFillRectangle( dpy, Scr.MenuBar,
Scr.BlackGC, Scr.MyDisplayWidth-7, 0, 7, 7 );
if( Scr.flags&SYSTEM8 && !(Scr.flags&STARTING) ){
for( lp=0; lp<2; lp++ ){
XDrawArc( dpy, Scr.MenuBar, Scr.WhiteGC, 0, 0,
14-lp, 14-lp, 180*64, -(90*64) );
XDrawArc( dpy, Scr.MenuBar, Scr.Gray1GC, Scr.MyDisplayWidth-15, 0,
14-lp, 14-lp, 0, 90*64 );
}
XFillArc( dpy, Scr.MenuBar, Scr.MenuBlueGC, 0, 0,
14, 14, 180*64, -(90*64) );
XFillArc( dpy, Scr.MenuBar, Scr.MenuBlueGC, Scr.MyDisplayWidth-15, 0,
14, 14, 0, 90*64 );
}
else{
XFillArc( dpy, Scr.MenuBar, Scr.WhiteGC, 0, 0,
14, 14, 180*64, -(90*64) );
XFillArc( dpy, Scr.MenuBar, Scr.WhiteGC, Scr.MyDisplayWidth-15, 0,
14, 14, 0, 90*64 );
}
if(Scr.flags&ROUNDEDCORNERS){
XFillRectangle( dpy, Scr.MenuBar, Scr.BlackGC, 0, 0, 7, 7 );
XFillRectangle( dpy, Scr.MenuBar,
Scr.BlackGC, Scr.MyDisplayWidth-7, 0, 7, 7 );
if( Scr.flags&SYSTEM8 && !(Scr.flags&STARTING) ){
XDrawArc( dpy, Scr.MenuBar, Scr.WhiteGC, 0, 0,
14, 14, 180*64, -(90*64) );
XDrawArc( dpy, Scr.MenuBar, Scr.Gray1GC, Scr.MyDisplayWidth-15, 0,
14, 14, 0, 90*64 );
XFillArc( dpy, Scr.MenuBar, Scr.MenuBlueGC, 0, 0,
14, 14, 180*64, -(90*64) );
XFillArc( dpy, Scr.MenuBar, Scr.MenuBlueGC, Scr.MyDisplayWidth-15, 0,
14, 14, 0, 90*64 );
}
else{
XFillArc( dpy, Scr.MenuBar, Scr.WhiteGC, 0, 0,
14, 14, 180*64, -(90*64) );
XFillArc( dpy, Scr.MenuBar, Scr.WhiteGC, Scr.MyDisplayWidth-15, 0,
14, 14, 0, 90*64 );
}
XMapWindow( dpy, Scr.lbCorner );
XMapWindow( dpy, Scr.rbCorner );
}
if( !(Scr.flags&SYSTEM8) )
XDrawLine( dpy, Scr.MenuBar, Scr.BlackGC,
0, MENUB_H-1, Scr.MyDisplayWidth, MENUB_H-1 );
@ -354,23 +357,8 @@ Bool MapMenu( MenuLabel *m, int left, int right, int y, Bool side )
int lp, items=0;
int label_w, local_mw=0, height;
MenuItem *mi;
unsigned long valuemask;
XSetWindowAttributes attributes;
if( m->LabelWin!=None ) RedrawMenu( m, True );
if( m->PullWin==None ){
valuemask = CWCursor | CWEventMask | CWBackPixel;
attributes.background_pixel = WhitePixel( dpy, Scr.screen );
attributes.cursor = Scr.MlvwmCursors[DEFAULT];
attributes.event_mask = (SubstructureRedirectMask | ExposureMask |
SubstructureNotifyMask | PointerMotionMask |
EnterWindowMask | LeaveWindowMask );
m->PullWin = XCreateWindow( dpy, Scr.Root, 0, 0, 10, 10 , 1,
CopyFromParent, InputOutput,
CopyFromParent,
valuemask, &attributes );
XSaveContext( dpy, m->PullWin, MenuContext, (caddr_t)m );
}
if( m == &Scr.IconMenu && Scr.iconAnchor->next )
SortMenuItem( &Scr.IconMenu, Scr.iconAnchor );
@ -426,19 +414,19 @@ Bool MapMenu( MenuLabel *m, int left, int right, int y, Bool side )
XMoveResizeWindow( dpy, m->PullWin, m->MenuX, m->MenuY,
m->MenuWidth+2, m->MenuHeight+2 );
{
XRectangle rect[7];
XRectangle rect[5];
int point=0;
rect[point].x = -1; rect[point].y = -1;
rect[point].width = m->MenuWidth+1;
rect[point].height = m->MenuHeight+1;
point++;
for( lp=1; lp<4; lp++ ){
for( lp=1; lp<3; lp++ ){
rect[point].x = m->MenuWidth+lp-1; rect[point].y = lp-1;
rect[point].width = 1; rect[point].height = m->MenuHeight+2-lp+1;
point++;
}
for( lp=1; lp<4; lp++ ){
for( lp=1; lp<3; lp++ ){
rect[point].x = lp-1; rect[point].y = m->MenuHeight+lp-1;
rect[point].width = m->MenuWidth+2-lp+1; rect[point].height = 1;
point++;
@ -517,7 +505,10 @@ Bool ChoiseMenu( MenuLabel *m, Window *entwin, int ignore, Bool side )
MenuLabel *mapped=NULL, *tmp_menu;
while( !isEnd && !finishall){
XNextEvent( dpy, &Event );
XMaskEvent( dpy, ExposureMask | ButtonReleaseMask | ButtonPressMask|
EnterWindowMask | PointerMotionMask | ButtonMotionMask,
&Event );
// XNextEvent( dpy, &Event );
switch( Event.type ){
case Expose:
if( XFindContext( dpy, Event.xany.window, MenuContext,
@ -637,7 +628,10 @@ void press_menu( MenuLabel *m )
mapped = m;
while( !isEnd ){
XNextEvent( dpy, &Event );
XMaskEvent( dpy, ExposureMask | ButtonReleaseMask | ButtonPressMask|
EnterWindowMask | PointerMotionMask | ButtonMotionMask,
&Event );
// XNextEvent( dpy, &Event );
switch( Event.type ){
case Expose:
if( mapped && Event.xany.window==mapped->PullWin &&
@ -757,10 +751,14 @@ Bool SwallowMenu( MenuLabel *ml )
if(!XGetWMNormalHints( dpy, ev.xmaprequest.window, &hints,
&supplied ))
hints.flags = 0;
if((USSize | PSize ) & hints.flags )
if((USSize | PSize ) & hints.flags ){
ml->LabelWidth = hints.width;
else
ml->LabelHeight = hints.height;
}
else{
ml->LabelWidth = attr.width;
ml->LabelHeight = attr.height;
}
ml->LabelWin = ev.xmaprequest.window;
ml->flags &= ~CANDELETE;
if(XGetWMProtocols (dpy, ml->LabelWin, &protocols, &n)){
@ -777,7 +775,7 @@ Bool SwallowMenu( MenuLabel *ml )
else
HandleEvents( ev );
if( ev.type==MapNotify &&
XFindContext( dpy, ev.xany.window, MlvwmContext, (caddr_t *)&tmp_win )
XFindContext(dpy, ev.xany.window, MlvwmContext, (caddr_t *)&tmp_win)
!=XCNOENT)
DrawStringMenuBar( tmp_win->name );
}
@ -794,15 +792,18 @@ void CreateMenuLabel( MenuLabel *ml )
if( ml->flags&SWALLOW ){
if( SwallowMenu( ml ) ){
XSetWindowBorderWidth( dpy, ml->LabelWin, 0 );
XResizeWindow( dpy, ml->LabelWin, ml->LabelWidth, MENUB_H-2 );
// XResizeWindow( dpy, ml->LabelWin, ml->LabelWidth, MENUB_H-2 );
XReparentWindow( dpy, ml->LabelWin, Scr.MenuBar, 0, 0 );
ml->LabelWidth += 16;
ml->LabelWidth += 6;
}
}
else{
if( ml->xpm )
if( ml->xpm ){
ml->LabelWidth = ml->xpm->width+16;
ml->LabelHeight = ml->xpm->height;
}
else{
ml->LabelHeight = 0;
if( ml->LabelStr ){
StrWidthHeight( MENUBARFONT, &width, NULL, NULL,
ml->LabelStr, strlen(ml->LabelStr));
@ -823,6 +824,18 @@ void CreateMenuLabel( MenuLabel *ml )
CopyFromParent,
valuemask, &attributes );
XSaveContext( dpy, ml->LabelWin, MenuContext, (caddr_t)ml );
valuemask = CWCursor | CWEventMask | CWBackPixel;
attributes.background_pixel = WhitePixel( dpy, Scr.screen );
attributes.cursor = Scr.MlvwmCursors[DEFAULT];
attributes.event_mask = (SubstructureRedirectMask | ExposureMask |
SubstructureNotifyMask | PointerMotionMask |
EnterWindowMask | LeaveWindowMask );
ml->PullWin = XCreateWindow( dpy, Scr.Root, 0, 0, 10, 10 , 1,
CopyFromParent, InputOutput,
CopyFromParent,
valuemask, &attributes );
XSaveContext( dpy, ml->PullWin, MenuContext, (caddr_t)ml );
}
}
@ -1170,7 +1183,7 @@ void SetMenu( char *line, FILE *fp )
}
}
while( fgets( str, 256, fp )!=NULL && strncmp( str, "END", 3) ){
while( fgetline( str, 256, fp )!=NULL && strncmp( str, "END", 3) ){
if( str[0]=='#' ) continue;
mode = SELECTON;
label = NULL;
@ -1239,7 +1252,7 @@ void SetMenuBar( char *line, FILE *fp )
tmp_link = &(*tmp_link)->next;
}
}
while( fgets( str, 256, fp )!=NULL && strncmp( str, "END", 3) ){
while( fgetline( str, 256, fp )!=NULL && strncmp( str, "END", 3) ){
if( str[0]=='#' ) continue;
str[ strlen(str)-1] = '\0';
for( tmp_l=Scr.MenuLabelRoot;
@ -1283,30 +1296,26 @@ Window PixmapWin (char **data_xpm, Window root, int x, int y)
void CreateMenuBar( void )
{
static char *lbot_xpm[] = {
"7 7 2 1",
" c none s none",
"# c black",
"# ",
"# ",
"# ",
"## ",
"### ",
"#### ",
"#######"
};
static char *rbot_xpm[] = {
"7 7 2 1",
" c none s none",
"# c black",
" #",
" #",
" #",
" ##",
" ###",
" ####",
"#######"
};
static char *lbot_xpm[] = {
"5 5 2 1",
" c none s none",
"# c black",
"# ",
"# ",
"## ",
"### ",
"#####"
};
static char *rbot_xpm[] = {
"5 5 2 1",
" c none s none",
"# c black",
" #",
" #",
" ##",
" ###",
"#####"
};
unsigned long valuemask;
XSetWindowAttributes attributes;
@ -1321,11 +1330,9 @@ void CreateMenuBar( void )
CopyFromParent, InputOutput, CopyFromParent,
valuemask, &attributes );
XMapWindow( dpy, Scr.MenuBar );
Scr.lbCorner = PixmapWin( lbot_xpm, Scr.Root, 0, -1 );
XMapWindow( dpy, Scr.lbCorner );
Scr.lbCorner = PixmapWin( lbot_xpm, Scr.Root, 0, -1 );
Scr.rbCorner = PixmapWin( rbot_xpm, Scr.Root, -1, -1 );
Scr.rbCorner = PixmapWin( rbot_xpm, Scr.Root, -1, -1 );
XMapWindow( dpy, Scr.rbCorner );
RedrawMenuBar( );
}
@ -1357,8 +1364,9 @@ void MapMenuBar( MlvwmWindow *win )
tmpml->LabelX = right-tmpml->LabelWidth-1;
right = tmpml->LabelX;
}
if( tmpml->flags&SWALLOW )
XMoveWindow( dpy, tmpml->LabelWin, tmpml->LabelX+8, 1 );
if( tmpml->LabelHeight )
XMoveWindow( dpy, tmpml->LabelWin,
tmpml->LabelX+3, (MENUB_H-tmpml->LabelHeight)/2 );
else
XMoveWindow( dpy, tmpml->LabelWin, tmpml->LabelX, 1 );
}
@ -1385,7 +1393,8 @@ void MapMenuBar( MlvwmWindow *win )
right = mlink->link->LabelX;
}
if( mlink->link->flags&SWALLOW )
XMoveWindow( dpy, mlink->link->LabelWin, mlink->link->LabelX+8, 1);
XMoveWindow( dpy, mlink->link->LabelWin,
mlink->link->LabelX+3, (MENUB_H-mlink->link->LabelHeight)/2 );
else
XMoveWindow( dpy, mlink->link->LabelWin, mlink->link->LabelX, 1 );
}
@ -1590,4 +1599,15 @@ void CreateSimpleMenu( void )
Scr.MenuLabelRoot->m_item->mode = SELECTON;
Scr.MenuLabelRoot->m_item->label = strdup( "Quit" );
Scr.MenuLabelRoot->m_item->action = strdup( "Exit" );
Scr.MenuRoot = calloc( 1, sizeof(Menu) );
Scr.MenuRoot->link = calloc( 1, sizeof(MenuLink) );
Scr.MenuRoot->link->link = Scr.MenuLabelRoot;
if( !Scr.style_list ){
Scr.style_list = calloc( 1, sizeof( styles ) );
Scr.style_list->name = strdup("*");
Scr.style_list->flags = NORMALWIN;
Scr.style_list->maxmizescale = 90;
Scr.style_list->menubar = Scr.MenuRoot;
}
}

View File

@ -1,6 +1,6 @@
/****************************************************************************/
/* This module is all original code */
/* by TakaC Hasegawa (tak@bioele.nuee.nagoya-u.ac.jp */
/* by TakaC Hasegawa (tac.hasegawa@gmail.com) */
/* Copyright 1996, TakaC Hasegawa */
/* You may use this code for any purpose, as long as the original */
/* copyright remains in the source code and all documentation */
@ -12,7 +12,7 @@
#include <X11/Xutil.h>
#include <X11/xpm.h>
#define MENUB_H 25
#define MENUB_H 20
/* Definitions of Menu Item */
#define STRGRAY 1 /* Draw String Black or Gray? */
@ -63,6 +63,7 @@ typedef struct MenuLabel
struct MenuLabel *next;
Window LabelWin;
int LabelWidth;
int LabelHeight;
char *LabelStr;
char *name;
char *action; /* use for swallow */

View File

@ -1,6 +1,6 @@
/****************************************************************************/
/* This module is mostly all new */
/* by TakaC Hasegawa (tak@bioele.nuee.nagoya-u.ac.jp) */
/* by TakaC Hasegawa (tac.hasegawa@gmail.com) */
/* Copyright 1996 TakaC Hasegawa. No restrictions are placed on this code, */
/* as long as the copyright notice is preserved */
/****************************************************************************/
@ -16,9 +16,35 @@
#include "menus.h"
#include "screen.h"
char *SkipSpace( char *str )
{
for( ; (*str==' ' || *str=='\t'); str++ );
return str;
}
char *fgetline( char *str, int size, FILE *fp )
{
int readlen;
char strtmp[256];
if( fgets( str, size, fp )==NULL )
return NULL;
readlen=strlen(str)-2;
while( str[readlen]=='\\'
&& fgets( strtmp, sizeof(strtmp), fp)!=NULL ){
str[readlen]='\0';
snprintf( str, size, "%s%s", str, SkipSpace(strtmp) );
readlen=strlen(str)-2;
}
return str;
}
char *LookUpFiles( char *path, char *filename, int mode )
{
char *find;
char *find, *separator;
size_t find_size;
if( !access( filename, mode ) ){
find = strdup( filename );
@ -26,14 +52,17 @@ char *LookUpFiles( char *path, char *filename, int mode )
}
if( path==NULL ) return NULL;
do{
find = calloc( strlen(path)+strlen(filename)+2, 1 );
path=SkipSpace( path );
find_size = strlen(path)+strlen(filename)+2;
find = calloc( find_size, 1 );
if( strchr( path, ':' )==NULL ){
sprintf( find, "%s/%s", path, filename );
snprintf( find, find_size, "%s/%s", path, filename );
path += strlen( path );
}
else{
strcpy( find, path );
sprintf( strchr( find, ':' ), "/%s", filename );
separator = strchr( find, ':' );
snprintf( separator, strlen(separator)+strlen(filename)+2, "/%s", filename );
path = strchr( path, ':') + 1;
}
if( !access(find, mode ) ){
@ -47,7 +76,7 @@ char *LookUpFiles( char *path, char *filename, int mode )
char *SkipNonSpace( char *str )
{
for( ; *str!=' ' && *str!='\t' && *str; str++ );
for( ; *str!=' ' && *str!='\t' && *str!='\n' && *str; str++ );
return str;
}
@ -78,12 +107,6 @@ char *stripspace_num( char *str )
return action;
}
char *SkipSpace( char *str )
{
for( ; (*str==' ' || *str=='\t'); str++ );
return str;
}
void sleep_a_little(int n)
{
struct timeval value;
@ -100,12 +123,14 @@ void sleep_a_little(int n)
void DrawErrMsgOnMenu( char *str1, char *str2 )
{
char *str;
size_t str_size;
static int call=0;
int wait_s;
call++;
str = calloc( strlen(str1)+strlen(str2)+1, 1 );
sprintf( str, "%s%s", str1, str2 );
str_size = strlen(str1)+strlen(str2)+1;
str = calloc( str_size, 1 );
snprintf( str, str_size, "%s%s", str1, str2 );
if( call<5 ) XBell( dpy, 30 );
DrawStringMenuBar( str );
wait_s = 3000000-call/5*500000;
@ -244,6 +269,8 @@ void RaiseMlvwmWindow( MlvwmWindow *win )
wins[set++] = win->frame;
XRaiseWindow( dpy, wins[0] );
XRaiseWindow( dpy, wins[1] );
XRaiseWindow( dpy, wins[2] );
XRestackWindows( dpy, wins, set );
free( wins );
@ -252,13 +279,15 @@ void RaiseMlvwmWindow( MlvwmWindow *win )
char *WinListName( MlvwmWindow *mw )
{
char *winname;
size_t winname_size;
winname = calloc( strlen( mw->name )+1+(Scr.flags&DISPDESK?3:0), 1 );
winname_size = strlen( mw->name )+1+(Scr.flags&DISPDESK?3:0);
winname = calloc( winname_size, 1 );
if( Scr.flags&DISPDESK ){
if( mw->flags&STICKY )
sprintf( winname, "S:%s", mw->name );
snprintf( winname, winname_size, "S:%s", mw->name );
else
sprintf( winname, "%d:%s", mw->Desk, mw->name );
snprintf( winname, winname_size, "%d:%s", mw->Desk, mw->name );
}
else
strcpy( winname, mw->name );

View File

@ -1,6 +1,6 @@
/****************************************************************************/
/* This module is all original code */
/* by TakaC Hasegawa (tak@bioele.nuee.nagoya-u.ac.jp */
/* by TakaC Hasegawa (tac.hasegawa@gmail.com) */
/* Copyright 1996, TakaC Hasegawa */
/* You may use this code for any purpose, as long as the original */
/* copyright remains in the source code and all documentation */
@ -9,6 +9,7 @@
#define _MISC_
#include <unistd.h>
extern char *fgetline( char *, int, FILE * );
extern char *SkipNonSpace( char * );
extern char *LookUpFiles( char *, char *, int );
extern void sleep_a_little( int );

View File

@ -1,6 +1,6 @@
/****************************************************************************/
/* This module is based on fvwm, but has been siginificantly modified */
/* by TakaC Hasegawa (tak@bioele.nuee.nagoya-u.ac.jp) */
/* by TakaC Hasegawa (tac.hasegawa@gmail.com) */
/****************************************************************************/
/****************************************************************************
* This module is based on Twm, but has been siginificantly modified
@ -186,10 +186,7 @@ void InitScrParams( void )
Scr.style_list = NULL;
Scr.ShortCutRoot = NULL;
Scr.double_click_time = 300;
if( Scr.flags&SYSTEM8 )
Scr.bar_width = 16;
else
Scr.bar_width = 19;
Scr.bar_width = 16;
Scr.flush_time = 100000;
Scr.flush_times = 2;
Scr.zoom_wait = 10000;
@ -202,6 +199,8 @@ void InitScrParams( void )
Scr.d_depth );
Scr.StartFunc = NULL;
Scr.flags |= STARTING;
Scr.resist_x = 0;
Scr.resist_y = 0;
}
void InitGCs( void )
@ -540,13 +539,14 @@ void DoStartFunc( void )
}
}
void main( int argc, char *argv[] )
int main( int argc, char *argv[] )
{
char *display_name=NULL;
char *display_screen;
char *display_string;
char *config_file=NULL;
char message[255];
char num[10];
char *cp;
Window StartWin;
XSetWindowAttributes attributes;
int len, lp;
@ -612,26 +612,36 @@ void main( int argc, char *argv[] )
if(!single){
for(lp=0;lp<Scr.NumberOfScreens;lp++){
if(lp!= Scr.screen){
sprintf(message,"%s -d %s",argv[0],XDisplayString(dpy));
len = strlen(message);
message[len-1] = '\0';
sprintf(num,"%d",lp);
strcat(message,num);
strcat(message," -s ");
len = strlen(XDisplayString(dpy)) + 10;
display_screen = calloc(len, sizeof(char));
snprintf(display_screen, len, "%s", XDisplayString(dpy));
/*
* Truncate the string 'whatever:n.n' to 'whatever:n',
* and then append the screen number.
*/
cp = strchr(display_screen, ':');
if (cp != NULL)
{
cp = strchr(cp, '.');
if (cp != NULL)
*cp = '\0'; /* truncate at display part */
}
snprintf(message, sizeof(message), "%s -d %s.%d -s", argv[0], display_screen, lp);
free(display_screen);
if( Scr.flags & DEBUGOUT)
strcat(message," -debug");
if( config_file!=NULL ){
strcat(message," -f ");
strcat(message,config_file);
}
strcat(message," &\n");
snprintf(message + strlen(message), sizeof(message) - strlen(message), " -debug");
if( config_file != NULL )
snprintf(message + strlen(message), sizeof(message) - strlen(message) ," -f %s", config_file);
snprintf(message + strlen(message), sizeof(message) - strlen(message), " &\n");
system(message);
}
}
}
len = strlen( XDisplayString( dpy ) );
display_string = calloc( len+10, sizeof( char ) );
sprintf( display_string, "DISPLAY=%s", XDisplayString( dpy ) );
snprintf( display_string, len+10, "DISPLAY=%s", XDisplayString(dpy) );
putenv( display_string );
XShapeQueryExtension( dpy, &ShapeEventBase, &ShapeErrorBase );
@ -680,7 +690,7 @@ void main( int argc, char *argv[] )
}
XUngrabServer( dpy );
if( !Scr.MenuLabelRoot ) CreateSimpleMenu();
else CreateMenuItems();
CreateMenuItems();
for( Scr.iconAnchor = Scr.IconMenu.m_item;
Scr.iconAnchor->next->next != NULL;
Scr.iconAnchor = Scr.iconAnchor->next );
@ -696,4 +706,5 @@ void main( int argc, char *argv[] )
MapMenuBar( Scr.ActiveWin );
while( True ) WaitEvents();
return 0;
}

View File

@ -1,6 +1,6 @@
/****************************************************************************/
/* This module is based on fvwm, but has been siginificantly modified */
/* by TakaC Hasegawa (tak@bioele.nuee.nagoya-u.ac.jp) */
/* by TakaC Hasegawa (tac.hasegawa@gmail.com) */
/****************************************************************************/
/****************************************************************************
* This module is based on Twm, but has been siginificantly modified
@ -34,7 +34,7 @@
/*****************************************************************************/
#ifndef _MLVWM_
#define _MLVFM_
#define _MLVWM_
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@ -57,8 +57,8 @@
#define ReapChildren() while ((wait3(NULL, WNOHANG, NULL)) > 0);
#endif
#define TITLE_HEIGHT 20
#define BOXSIZE 13
#define TITLE_HEIGHT (Scr.flags&SYSTEM8?20:17)
#define BOXSIZE (Scr.flags&SYSTEM8?13:11)
#define SBAR_WH Scr.bar_width
extern Display *dpy;
@ -178,9 +178,9 @@ extern Atom _XA_WM_DESKTOP;
extern void Done( int, char * );
#ifdef USE_LOCALE
#define DEFAULTFS "-adobe-*-*-r-*-*-14-*-*-*-p-*-*-*,\
-*-*-*-r-*-*-14-*-*-*-*-*-*-*"
#define DEFAULTFS "-adobe-*-*-r-*-*-12-*-*-*-p-*-*-*,\
-*-*-*-r-*-*-12-*-*-*-*-*-*-*"
#else
#define DEFAULTFONT "-adobe-*-*-r-*-*-14-*-*-*-p-*-*-*"
#define DEFAULTFONT "-adobe-*-*-r-*-*-12-*-*-*-p-*-*-*"
#endif
#endif

View File

@ -105,6 +105,7 @@ typedef struct ScreenInfo
int bar_width;
int flush_time;
int flush_times;
int resist_x, resist_y;
int zoom_wait;
char *IconPath;
@ -140,6 +141,8 @@ typedef struct ScreenInfo
#define OPAQUERESIZE 0x00008000
#define ONECLICKMENU 0x00010000
#define DEBUGOUT 0x00020000
#define ROUNDEDCORNERS 0x00040000
#define SWALLOWFOCUSCLICK 0x00080000
#ifdef USE_LOCALE
#define MENUBARFONT Scr.MenuBarFs

View File

@ -1,4 +1,5 @@
#include <stdio.h>
#include <string.h>
#ifndef TRUE
#define TRUE 1

View File

@ -1,6 +1,6 @@
/****************************************************************************/
/* This module is all original code */
/* by TakaC Hasegawa (tak@bioele.nuee.nagoya-u.ac.jp */
/* by TakaC Hasegawa (tac.hasegawa@gmail.com) */
/* Copyright 1996, TakaC Hasegawa */
/* You may use this code for any purpose, as long as the original */
/* copyright remains in the source code and all documentation */

View File

@ -42,6 +42,9 @@ OpaqueMove
# Double click time
DoubleClickTime 300
# Edge resistance force
EdgeResistance 50 50
## Show window name with desktop number on window list
#DisplayDeskNumber

View File

@ -20,6 +20,9 @@ StickyHide
# ダブルクリックを認識する時間
DoubleClickTime 300
# Edge resistance force
EdgeResistance 50 50
## Icon化をShadeとする
IconifyShade
@ -56,9 +59,12 @@ IconMenuIcon label2.xpm
UseBalloon "Show Balloon Help" "Hide Balloon Help", Icon label3.xpm
# Font 設定(LOCALE設定ありのサンプル)
MenuBarFont -*-*-*-r-*-*-16-*-*-*-*-*-*-*,-misc-marumoji-*-*-*-*-16-*-*-*-*-*-jisx0208.1983
MenuFont -*-*-*-r-*-*-16-*-*-*-*-*-*-*,-misc-marumoji-*-*-*-*-16-*-*-*-*-*-jisx0208.1983
TitleBarFont -*-*-*-r-*-*-16-*-*-*-*-*-*-*,-misc-marumoji-*-*-*-*-16-*-*-*-*-*-jisx0208.1983
MenuBarFont -*-*-*-r-*-*-16-*-*-*-*-*-*-*,\
-misc-marumoji-*-*-*-*-16-*-*-*-*-*-jisx0208.1983
MenuFont -*-*-*-r-*-*-16-*-*-*-*-*-*-*,\
-misc-marumoji-*-*-*-*-16-*-*-*-*-*-jisx0208.1983
TitleBarFont -*-*-*-r-*-*-16-*-*-*-*-*-*-*,\
-misc-marumoji-*-*-*-*-16-*-*-*-*-*-jisx0208.1983
# Settings of keyborad short cut
ShortCut