Imported mlvwm 0.9.0 release

This commit is contained in:
Morgan Aldridge 2015-04-04 19:58:04 -04:00
parent adcec20bb8
commit 9c8f9eaaf2
25 changed files with 600 additions and 99 deletions

View File

@ -1,3 +1,10 @@
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 0.8.8 -> 0.8.9
Change scroll bar expose function and befavior Change scroll bar expose function and befavior
Add one click menu(OneClickMenu) Add one click menu(OneClickMenu)

View File

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

View File

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

View File

@ -94,6 +94,7 @@ Description
OpaqueResize $B%j%5%$%:;~$KCf?H$rI=<($7$?$^$^0\F0(B 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 OneClickMenu $B%/%j%C%/$G%a%K%e!<$,%W%k%@%&%s$7$F!"$b$&0l2s$N%/%j%C%/(B
$B$G<B9T(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 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 10ms$B!#(B
RotateDesk $B%G%9%/%H%C%W$N2C;;!"8:;;$r%m!<%F!<%7%g%s$9$k!#(B RotateDesk $B%G%9%/%H%C%W$N2C;;!"8:;;$r%m!<%F!<%7%g%s$9$k!#(B

View File

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

4
README
View File

@ -12,6 +12,10 @@ xmkmf -a;
make. make.
But, it must be compiled with gcc for SunOS4.x. 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 The designation of the installation directory can be done by the
change of configure.h. Sauce complying with Locale came in. Make change of configure.h. Sauce complying with Locale came in. Make
HasLocale YES in configure.h. Cope additionally and suitably though HasLocale YES in configure.h. Cope additionally and suitably though

View File

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

View File

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

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))

372
man/mlvwm.man Executable file
View File

@ -0,0 +1,372 @@
.\" 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 "\fBSystem8\fP"
Change to window decoration to System 8(Only Color Monitor).
.IP "\fBOpaqueMove\fP"
Enable Opaque move.
.IP "\fBOpaqueResize\fP"
Enable Opaque resize.
.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 19 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 AUTHOR
TakaC HASEGAWA
.I hase@rop2.hitachi-cable.co.jp

View File

@ -1,6 +1,6 @@
add_window.o: add_window.c /usr/include/stdio.h \ add_window.o: add_window.c /usr/include/stdio.h \
/usr/include/sys/types.h /usr/include/machine/ansi.h \ /usr/include/sys/types.h /usr/include/sys/cdefs.h \
/usr/include/machine/types.h /usr/include/sys/cdefs.h \ /usr/include/machine/ansi.h /usr/include/machine/types.h \
/usr/include/machine/endian.h /usr/include/stdlib.h mlvwm.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/Xlib.h /usr/X11R6/include/X11/X.h \
/usr/X11R6/include/X11/Xfuncproto.h /usr/X11R6/include/X11/Xosdefs.h \ /usr/X11R6/include/X11/Xfuncproto.h /usr/X11R6/include/X11/Xosdefs.h \
@ -11,8 +11,8 @@ add_window.o: add_window.c /usr/include/stdio.h \
/usr/X11R6/include/X11/Xatom.h /usr/X11R6/include/X11/Xresource.h \ /usr/X11R6/include/X11/Xatom.h /usr/X11R6/include/X11/Xresource.h \
/usr/X11R6/include/X11/extensions/shape.h /usr/X11R6/include/X11/extensions/shape.h
balloon.o: balloon.c /usr/include/stdio.h /usr/include/sys/types.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/ansi.h \
/usr/include/sys/cdefs.h /usr/include/machine/endian.h \ /usr/include/machine/types.h /usr/include/machine/endian.h \
/usr/include/stdlib.h mlvwm.h /usr/X11R6/include/X11/Xlib.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/X.h /usr/X11R6/include/X11/Xfuncproto.h \
/usr/X11R6/include/X11/Xosdefs.h /usr/include/stddef.h \ /usr/X11R6/include/X11/Xosdefs.h /usr/include/stddef.h \
@ -22,8 +22,8 @@ balloon.o: balloon.c /usr/include/stdio.h /usr/include/sys/types.h \
/usr/include/sys/unistd.h event.h \ /usr/include/sys/unistd.h event.h \
/usr/X11R6/include/X11/extensions/shape.h /usr/X11R6/include/X11/extensions/shape.h
borders.o: borders.c /usr/include/stdio.h /usr/include/sys/types.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/ansi.h \
/usr/include/sys/cdefs.h /usr/include/machine/endian.h \ /usr/include/machine/types.h /usr/include/machine/endian.h \
/usr/include/stdlib.h /usr/include/string.h mlvwm.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/Xlib.h /usr/X11R6/include/X11/X.h \
/usr/X11R6/include/X11/Xfuncproto.h /usr/X11R6/include/X11/Xosdefs.h \ /usr/X11R6/include/X11/Xfuncproto.h /usr/X11R6/include/X11/Xosdefs.h \
@ -33,8 +33,8 @@ borders.o: borders.c /usr/include/stdio.h /usr/include/sys/types.h \
misc.h /usr/include/unistd.h /usr/include/sys/unistd.h borders.h \ misc.h /usr/include/unistd.h /usr/include/sys/unistd.h borders.h \
/usr/X11R6/include/X11/extensions/shape.h /usr/X11R6/include/X11/extensions/shape.h
config.o: config.c /usr/include/stdio.h /usr/include/sys/types.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/ansi.h \
/usr/include/sys/cdefs.h /usr/include/machine/endian.h \ /usr/include/machine/types.h /usr/include/machine/endian.h \
/usr/include/stdlib.h /usr/include/string.h /usr/include/ctype.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/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/X.h /usr/X11R6/include/X11/Xfuncproto.h \
@ -44,8 +44,8 @@ config.o: config.c /usr/include/stdio.h /usr/include/sys/types.h \
screen.h menus.h config.h misc.h /usr/include/unistd.h \ screen.h menus.h config.h misc.h /usr/include/unistd.h \
/usr/include/sys/unistd.h /usr/include/sys/unistd.h
event.o: event.c /usr/include/stdio.h /usr/include/sys/types.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/ansi.h \
/usr/include/sys/cdefs.h /usr/include/machine/endian.h \ /usr/include/machine/types.h /usr/include/machine/endian.h \
/usr/include/stdlib.h /usr/include/unistd.h /usr/include/sys/unistd.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/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/Xatom.h mlvwm.h /usr/X11R6/include/X11/Xlib.h \
@ -56,8 +56,8 @@ event.o: event.c /usr/include/stdio.h /usr/include/sys/types.h \
screen.h menus.h config.h borders.h add_window.h functions.h misc.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 balloon.h /usr/X11R6/include/X11/extensions/shape.h
functions.o: functions.c /usr/include/stdio.h /usr/include/sys/types.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/ansi.h \
/usr/include/sys/cdefs.h /usr/include/machine/endian.h \ /usr/include/machine/types.h /usr/include/machine/endian.h \
/usr/include/stdlib.h /usr/include/string.h /usr/include/unistd.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/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/X.h /usr/X11R6/include/X11/Xfuncproto.h \
@ -67,8 +67,8 @@ functions.o: functions.c /usr/include/stdio.h /usr/include/sys/types.h \
screen.h menus.h config.h functions.h borders.h event.h misc.h \ screen.h menus.h config.h functions.h borders.h event.h misc.h \
balloon.h balloon.h
menus.o: menus.c /usr/include/stdio.h /usr/include/sys/types.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/ansi.h \
/usr/include/sys/cdefs.h /usr/include/machine/endian.h \ /usr/include/machine/types.h /usr/include/machine/endian.h \
/usr/include/stdlib.h /usr/include/string.h /usr/include/ctype.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/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/X.h /usr/X11R6/include/X11/Xfuncproto.h \
@ -81,8 +81,8 @@ menus.o: menus.c /usr/include/stdio.h /usr/include/sys/types.h \
/usr/X11R6/include/X11/Xresource.h \ /usr/X11R6/include/X11/Xresource.h \
/usr/X11R6/include/X11/extensions/shape.h /usr/X11R6/include/X11/extensions/shape.h
misc.o: misc.c /usr/include/stdio.h /usr/include/sys/types.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/ansi.h \
/usr/include/sys/cdefs.h /usr/include/machine/endian.h \ /usr/include/machine/types.h /usr/include/machine/endian.h \
/usr/include/stdlib.h /usr/include/string.h /usr/include/ctype.h \ /usr/include/stdlib.h /usr/include/string.h /usr/include/ctype.h \
/usr/include/runetype.h /usr/include/unistd.h \ /usr/include/runetype.h /usr/include/unistd.h \
/usr/include/sys/unistd.h /usr/include/sys/time.h /usr/include/time.h \ /usr/include/sys/unistd.h /usr/include/sys/time.h /usr/include/time.h \
@ -92,8 +92,8 @@ misc.o: misc.c /usr/include/stdio.h /usr/include/sys/types.h \
/usr/X11R6/include/X11/cursorfont.h /usr/X11R6/include/X11/xpm.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 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 \ 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/ansi.h \
/usr/include/sys/cdefs.h /usr/include/machine/endian.h \ /usr/include/machine/types.h /usr/include/machine/endian.h \
/usr/include/stdlib.h /usr/include/signal.h /usr/include/sys/signal.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/machine/signal.h /usr/include/machine/trap.h \
/usr/include/string.h /usr/include/unistd.h /usr/include/sys/unistd.h \ /usr/include/string.h /usr/include/unistd.h /usr/include/sys/unistd.h \
@ -109,5 +109,5 @@ mlvwm.o: mlvwm.c /usr/include/stdio.h /usr/include/sys/types.h \
/usr/X11R6/include/X11/extensions/shape.h \ /usr/X11R6/include/X11/extensions/shape.h \
/usr/X11R6/include/X11/Xlocale.h /usr/include/locale.h /usr/X11R6/include/X11/Xlocale.h /usr/include/locale.h
wild.o: wild.c /usr/include/stdio.h /usr/include/sys/types.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/ansi.h \
/usr/include/sys/cdefs.h /usr/include/machine/endian.h /usr/include/machine/types.h /usr/include/machine/endian.h

View File

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

View File

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

View File

@ -77,7 +77,7 @@ styles *lookupstyles( char *name, XClassHint *class )
style = nptr; style = nptr;
} }
} }
if( style->iconname && !(style->miniicon) ) if( style && style->iconname && !(style->miniicon) )
style->miniicon = ReadIcon( style->iconname, NULL, False ); style->miniicon = ReadIcon( style->iconname, NULL, False );
return style; return style;
} }
@ -576,14 +576,14 @@ MlvwmWindow *AddWindow( Window win )
tmp_win->frame_y = tmp_win->frame_y =
tmp_win->attr.y+tmp_win->frame_h < Scr.MyDisplayHeight ? tmp_win->attr.y+tmp_win->frame_h < Scr.MyDisplayHeight ?
tmp_win->frame_y : Scr.MyDisplayHeight-tmp_win->frame_h-2; 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{ else{
tmp_win->frame_x -= diff_x; tmp_win->frame_x -= diff_x;
tmp_win->frame_y -= diff_y; tmp_win->frame_y -= diff_y;
} }
if( tmp_win->frame_y<MENUB_H ) tmp_win->frame_y = MENUB_H;
valuemask = CWCursor | CWEventMask | CWBackPixel; valuemask = CWCursor | CWEventMask | CWBackPixel;
attributes.cursor = Scr.MlvwmCursors[TITLE_CURSOR]; attributes.cursor = Scr.MlvwmCursors[TITLE_CURSOR];

View File

@ -283,6 +283,7 @@ void BalloonHelp( void )
return; return;
} }
printf("flags %x\n", tmp_win->flags );
if( Scr.Balloon==None ) CreateBalloonWindow(); if( Scr.Balloon==None ) CreateBalloonWindow();
BalloonSize( &one_line, &label_width, &offset, &width, &height, tmp_win ); BalloonSize( &one_line, &label_width, &offset, &width, &height, tmp_win );

View File

@ -152,11 +152,14 @@ char *SetMaxmizeScale( styles *tmp_style, char *str )
if( (stop = strchr( str, ',' ))!=NULL ) *stop = '\0'; if( (stop = strchr( str, ',' ))!=NULL ) *stop = '\0';
if( strchr( SkipNonSpace(str), 'x' )){ if( strchr( SkipNonSpace(str), 'x' )){
tmp_style->maxmizescale = 0; tmp_style->maxmizescale = 0;
sscanf( str, "MaxmizeScale%dx%d", if( sscanf( str, "MaxmizeScale%dx%d",
&(tmp_style->maxmizesize_w), &(tmp_style->maxmizesize_h) ); &(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++; if( stop ) stop++;
else stop = str+strlen(str); else stop = str+strlen(str);
@ -238,7 +241,7 @@ void SetStyles( char *line, FILE *fp )
int lp; int lp;
for( last = Scr.style_list; last && last->next; last=last->next ); 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; if( str[0]=='#' ) continue;
top = stripquote( str, &name ); top = stripquote( str, &name );
if( name==NULL ){ if( name==NULL ){
@ -312,12 +315,12 @@ void SetStartFunction( char *line, FILE *fp )
if( (!strncmp( line, "InitFunction", 12 ) && Scr.Restarting) || if( (!strncmp( line, "InitFunction", 12 ) && Scr.Restarting) ||
(!strncmp( line, "RestartFunction", 15 ) && !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; return;
} }
new = &Scr.StartFunc; 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; if( str[0]=='#' ) continue;
*new = calloc( 1, sizeof( ShortCut ) ); *new = calloc( 1, sizeof( ShortCut ) );
top = SkipSpace( str ); top = SkipSpace( str );
@ -335,7 +338,7 @@ void SetShortCut( char *line, FILE *fp )
KeyCode keycode; KeyCode keycode;
int len, tag; 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; if( str[0]=='#' ) continue;
top = SkipSpace( str ); top = SkipSpace( str );
end = SkipNonSpace( top ); end = SkipNonSpace( top );
@ -469,7 +472,9 @@ void SetBarWidth( char *line, FILE *fp )
void SetMenuFlush( 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; Scr.flush_time *= 1000;
} }
@ -698,10 +703,21 @@ void SetUseRootWin( char *line, FILE *fp )
SubstructureNotifyMask ); 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;
}
}
config_func main_config[]={ config_func main_config[]={
{ "Desktopnum", SetDeskTopNum }, { "Desktopnum", SetDeskTopNum },
{ "DoubleClickTime", SetDoubleClickTime }, { "DoubleClickTime", SetDoubleClickTime },
{ "DisplayDeskNumber", SetDisplayDeskNum }, { "DisplayDeskNumber", SetDisplayDeskNum },
{ "EdgeResistance", SetEdgeResist },
{ "FlushMenu", SetMenuFlush }, { "FlushMenu", SetMenuFlush },
{ "FollowToMouse", SetFollowToMouse }, { "FollowToMouse", SetFollowToMouse },
{ "Compatible", SetCompatible }, { "Compatible", SetCompatible },
@ -740,9 +756,9 @@ config_func main_config[]={
void ReadConfigFile( char *configfile ) void ReadConfigFile( char *configfile )
{ {
int lp;
FILE *fp; FILE *fp;
char str[256], *file, *cmp; char str[1024], *file, *cmp;
int lp;
#ifdef MLVWMLIBDIR #ifdef MLVWMLIBDIR
char *sysrc; char *sysrc;
#endif #endif
@ -768,7 +784,7 @@ void ReadConfigFile( char *configfile )
if( file ) free( file ); if( file ) free( file );
return; return;
} }
while( fgets( str, 256, fp )!=NULL ){ while( fgetline( str, sizeof(str), fp )!=NULL ){
if( Scr.flags & DEBUGOUT ) if( Scr.flags & DEBUGOUT )
DrawStringMenuBar( str ); DrawStringMenuBar( str );
cmp = str; cmp = str;

View File

@ -255,6 +255,7 @@ MlvwmWindow *NextActiveWin( MlvwmWindow *t )
!(NextActive->flags&NOWINLIST) && !(NextActive->flags&NOWINLIST) &&
!(NextActive->flags&SKIPSELECT) && !(NextActive->flags&SKIPSELECT) &&
!(NextActive->flags&NOFOCUS) && !(NextActive->flags&NOFOCUS) &&
(!t->wmhints || t->wmhints->input!=False) &&
NextActive->Desk==Scr.currentdesk) NextActive->Desk==Scr.currentdesk)
break; break;
} }
@ -527,22 +528,43 @@ void MoveWindow( MlvwmWindow *mw, XEvent *evp )
XDrawRectangle( dpy, Scr.Root, Scr.RobberGC, XDrawRectangle( dpy, Scr.Root, Scr.RobberGC,
mw->frame_x-drag_x, mw->frame_y-drag_y, mw->frame_x-drag_x, mw->frame_y-drag_y,
mw->frame_w, mw->frame_h ); mw->frame_w, mw->frame_h );
/* Calc. edge resistance */
/* edge inside the menu bar */
if( mw->frame_y-pre_y+y<MENUB_H ){ if( mw->frame_y-pre_y+y<MENUB_H ){
if( last_x==-1 ) last_x = x; if( last_x==-1 ) last_x = x;
x=last_x; }
y=pre_y-mw->frame_y+MENUB_H; /* 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; break;
} }
} }
@ -863,7 +885,7 @@ void ResizeWindow( MlvwmWindow *mw, XEvent *evp, Bool s_move )
} }
if( !(Scr.flags&OPAQUERESIZE) ){ if( !(Scr.flags&OPAQUERESIZE) ){
XGrabServer( dpy ); 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 ){ while( !isEnd ){
evmask = ButtonReleaseMask|ButtonMotionMask|PointerMotionMask; evmask = ButtonReleaseMask|ButtonMotionMask|PointerMotionMask;
@ -906,15 +928,18 @@ void ResizeWindow( MlvwmWindow *mw, XEvent *evp, Bool s_move )
} }
if( xmotion!=0 || ymotion!=0 ){ if( xmotion!=0 || ymotion!=0 ){
if( !(Scr.flags&OPAQUERESIZE) ) 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 ) if( xmotion!=0 )
new_w = org_w + (x - pre_x)*xmotion; new_w = org_w + (x - pre_x)*xmotion;
if( ymotion!=0 ) if( ymotion!=0 )
new_h = org_h + (y - pre_y)*ymotion; new_h = org_h + (y - pre_y)*ymotion;
if( new_w<4*SBAR_WH ) new_w = 4*SBAR_WH+1; if( new_w<(mw->flags&SBARH?4*SBAR_WH:0) )
if( new_h<4*SBAR_WH+(mw->flags & TITLE ? TITLE_HEIGHT : 0) ) new_w = (mw->flags*SBARH?4*SBAR_WH:0)+1;
new_h = 4*SBAR_WH+(mw->flags & TITLE ? TITLE_HEIGHT : 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 ); ConstrainSize( mw, &new_w, &new_h );
@ -1686,6 +1711,7 @@ void HandleMapNotify( XEvent *ev )
XMapWindow(dpy, tmp_win->frame); XMapWindow(dpy, tmp_win->frame);
if( !(Scr.flags & FOLLOWTOMOUSE) && if( !(Scr.flags & FOLLOWTOMOUSE) &&
!(Scr.flags&SLOPPYFOCUS) && !(Scr.flags&SLOPPYFOCUS) &&
(!tmp_win->wmhints || tmp_win->wmhints->input!=False) &&
!(tmp_win->flags&NOFOCUS) ) !(tmp_win->flags&NOFOCUS) )
SetFocus( tmp_win ); SetFocus( tmp_win );
} }

View File

@ -354,23 +354,8 @@ Bool MapMenu( MenuLabel *m, int left, int right, int y, Bool side )
int lp, items=0; int lp, items=0;
int label_w, local_mw=0, height; int label_w, local_mw=0, height;
MenuItem *mi; MenuItem *mi;
unsigned long valuemask;
XSetWindowAttributes attributes;
if( m->LabelWin!=None ) RedrawMenu( m, True ); 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 ) if( m == &Scr.IconMenu && Scr.iconAnchor->next )
SortMenuItem( &Scr.IconMenu, Scr.iconAnchor ); SortMenuItem( &Scr.IconMenu, Scr.iconAnchor );
@ -757,10 +742,14 @@ Bool SwallowMenu( MenuLabel *ml )
if(!XGetWMNormalHints( dpy, ev.xmaprequest.window, &hints, if(!XGetWMNormalHints( dpy, ev.xmaprequest.window, &hints,
&supplied )) &supplied ))
hints.flags = 0; hints.flags = 0;
if((USSize | PSize ) & hints.flags ) if((USSize | PSize ) & hints.flags ){
ml->LabelWidth = hints.width; ml->LabelWidth = hints.width;
else ml->LabelHeight = hints.height;
}
else{
ml->LabelWidth = attr.width; ml->LabelWidth = attr.width;
ml->LabelHeight = attr.height;
}
ml->LabelWin = ev.xmaprequest.window; ml->LabelWin = ev.xmaprequest.window;
ml->flags &= ~CANDELETE; ml->flags &= ~CANDELETE;
if(XGetWMProtocols (dpy, ml->LabelWin, &protocols, &n)){ if(XGetWMProtocols (dpy, ml->LabelWin, &protocols, &n)){
@ -777,7 +766,7 @@ Bool SwallowMenu( MenuLabel *ml )
else else
HandleEvents( ev ); HandleEvents( ev );
if( ev.type==MapNotify && 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) !=XCNOENT)
DrawStringMenuBar( tmp_win->name ); DrawStringMenuBar( tmp_win->name );
} }
@ -794,15 +783,18 @@ void CreateMenuLabel( MenuLabel *ml )
if( ml->flags&SWALLOW ){ if( ml->flags&SWALLOW ){
if( SwallowMenu( ml ) ){ if( SwallowMenu( ml ) ){
XSetWindowBorderWidth( dpy, ml->LabelWin, 0 ); 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 ); XReparentWindow( dpy, ml->LabelWin, Scr.MenuBar, 0, 0 );
ml->LabelWidth += 16; ml->LabelWidth += 6;
} }
} }
else{ else{
if( ml->xpm ) if( ml->xpm ){
ml->LabelWidth = ml->xpm->width+16; ml->LabelWidth = ml->xpm->width+16;
ml->LabelHeight = ml->xpm->height;
}
else{ else{
ml->LabelHeight = 0;
if( ml->LabelStr ){ if( ml->LabelStr ){
StrWidthHeight( MENUBARFONT, &width, NULL, NULL, StrWidthHeight( MENUBARFONT, &width, NULL, NULL,
ml->LabelStr, strlen(ml->LabelStr)); ml->LabelStr, strlen(ml->LabelStr));
@ -823,6 +815,18 @@ void CreateMenuLabel( MenuLabel *ml )
CopyFromParent, CopyFromParent,
valuemask, &attributes ); valuemask, &attributes );
XSaveContext( dpy, ml->LabelWin, MenuContext, (caddr_t)ml ); 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 +1174,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; if( str[0]=='#' ) continue;
mode = SELECTON; mode = SELECTON;
label = NULL; label = NULL;
@ -1239,7 +1243,7 @@ void SetMenuBar( char *line, FILE *fp )
tmp_link = &(*tmp_link)->next; 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; if( str[0]=='#' ) continue;
str[ strlen(str)-1] = '\0'; str[ strlen(str)-1] = '\0';
for( tmp_l=Scr.MenuLabelRoot; for( tmp_l=Scr.MenuLabelRoot;
@ -1357,8 +1361,9 @@ void MapMenuBar( MlvwmWindow *win )
tmpml->LabelX = right-tmpml->LabelWidth-1; tmpml->LabelX = right-tmpml->LabelWidth-1;
right = tmpml->LabelX; right = tmpml->LabelX;
} }
if( tmpml->flags&SWALLOW ) if( tmpml->LabelHeight )
XMoveWindow( dpy, tmpml->LabelWin, tmpml->LabelX+8, 1 ); XMoveWindow( dpy, tmpml->LabelWin,
tmpml->LabelX+3, (MENUB_H-tmpml->LabelHeight)/2 );
else else
XMoveWindow( dpy, tmpml->LabelWin, tmpml->LabelX, 1 ); XMoveWindow( dpy, tmpml->LabelWin, tmpml->LabelX, 1 );
} }
@ -1385,7 +1390,8 @@ void MapMenuBar( MlvwmWindow *win )
right = mlink->link->LabelX; right = mlink->link->LabelX;
} }
if( mlink->link->flags&SWALLOW ) 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 else
XMoveWindow( dpy, mlink->link->LabelWin, mlink->link->LabelX, 1 ); XMoveWindow( dpy, mlink->link->LabelWin, mlink->link->LabelX, 1 );
} }
@ -1590,4 +1596,15 @@ void CreateSimpleMenu( void )
Scr.MenuLabelRoot->m_item->mode = SELECTON; Scr.MenuLabelRoot->m_item->mode = SELECTON;
Scr.MenuLabelRoot->m_item->label = strdup( "Quit" ); Scr.MenuLabelRoot->m_item->label = strdup( "Quit" );
Scr.MenuLabelRoot->m_item->action = strdup( "Exit" ); 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

@ -63,6 +63,7 @@ typedef struct MenuLabel
struct MenuLabel *next; struct MenuLabel *next;
Window LabelWin; Window LabelWin;
int LabelWidth; int LabelWidth;
int LabelHeight;
char *LabelStr; char *LabelStr;
char *name; char *name;
char *action; /* use for swallow */ char *action; /* use for swallow */

View File

@ -16,6 +16,31 @@
#include "menus.h" #include "menus.h"
#include "screen.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 *LookUpFiles( char *path, char *filename, int mode )
{ {
char *find; char *find;
@ -26,6 +51,7 @@ char *LookUpFiles( char *path, char *filename, int mode )
} }
if( path==NULL ) return NULL; if( path==NULL ) return NULL;
do{ do{
path=SkipSpace( path );
find = calloc( strlen(path)+strlen(filename)+2, 1 ); find = calloc( strlen(path)+strlen(filename)+2, 1 );
if( strchr( path, ':' )==NULL ){ if( strchr( path, ':' )==NULL ){
sprintf( find, "%s/%s", path, filename ); sprintf( find, "%s/%s", path, filename );
@ -78,12 +104,6 @@ char *stripspace_num( char *str )
return action; return action;
} }
char *SkipSpace( char *str )
{
for( ; (*str==' ' || *str=='\t'); str++ );
return str;
}
void sleep_a_little(int n) void sleep_a_little(int n)
{ {
struct timeval value; struct timeval value;

View File

@ -9,6 +9,7 @@
#define _MISC_ #define _MISC_
#include <unistd.h> #include <unistd.h>
extern char *fgetline( char *, int, FILE * );
extern char *SkipNonSpace( char * ); extern char *SkipNonSpace( char * );
extern char *LookUpFiles( char *, char *, int ); extern char *LookUpFiles( char *, char *, int );
extern void sleep_a_little( int ); extern void sleep_a_little( int );

View File

@ -202,6 +202,8 @@ void InitScrParams( void )
Scr.d_depth ); Scr.d_depth );
Scr.StartFunc = NULL; Scr.StartFunc = NULL;
Scr.flags |= STARTING; Scr.flags |= STARTING;
Scr.resist_x = 0;
Scr.resist_y = 0;
} }
void InitGCs( void ) void InitGCs( void )
@ -540,7 +542,7 @@ void DoStartFunc( void )
} }
} }
void main( int argc, char *argv[] ) int main( int argc, char *argv[] )
{ {
char *display_name=NULL; char *display_name=NULL;
char *display_string; char *display_string;
@ -680,7 +682,7 @@ void main( int argc, char *argv[] )
} }
XUngrabServer( dpy ); XUngrabServer( dpy );
if( !Scr.MenuLabelRoot ) CreateSimpleMenu(); if( !Scr.MenuLabelRoot ) CreateSimpleMenu();
else CreateMenuItems(); CreateMenuItems();
for( Scr.iconAnchor = Scr.IconMenu.m_item; for( Scr.iconAnchor = Scr.IconMenu.m_item;
Scr.iconAnchor->next->next != NULL; Scr.iconAnchor->next->next != NULL;
Scr.iconAnchor = Scr.iconAnchor->next ); Scr.iconAnchor = Scr.iconAnchor->next );
@ -696,4 +698,5 @@ void main( int argc, char *argv[] )
MapMenuBar( Scr.ActiveWin ); MapMenuBar( Scr.ActiveWin );
while( True ) WaitEvents(); while( True ) WaitEvents();
return 0;
} }

View File

@ -105,6 +105,7 @@ typedef struct ScreenInfo
int bar_width; int bar_width;
int flush_time; int flush_time;
int flush_times; int flush_times;
int resist_x, resist_y;
int zoom_wait; int zoom_wait;
char *IconPath; char *IconPath;

View File

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

View File

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