Man: Add -c/-s option in man.
This commit is contained in:
parent
3e69e6455d
commit
e760c2bc7a
@ -89,11 +89,18 @@ init_gc(void)
|
||||
|
||||
gc = DefaultGC(dpy, SCREEN);
|
||||
|
||||
/* Stipple GC */
|
||||
gcv.function = GXcopy;
|
||||
gcv.fill_style = FillStippled;
|
||||
gcv.stipple = XCreateBitmapFromData(dpy, ROOT, pix_bits, 10, 4);
|
||||
gc_stipple = XCreateGC(dpy, ROOT, GCFunction | GCFillStyle | GCStipple, &gcv);
|
||||
|
||||
/* Reverse GC */
|
||||
gcv.function = GXinvert;
|
||||
gcv.line_width = BORDH;
|
||||
gcv.subwindow_mode = IncludeInferiors;
|
||||
gc_reverse = XCreateGC(dpy, ROOT, GCFunction | GCLineWidth | GCSubwindowMode, &gcv);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -135,7 +142,7 @@ init_root(void)
|
||||
{
|
||||
XSetWindowAttributes at;
|
||||
|
||||
at.event_mask = KeyMask | ButtonMask | MouseMask
|
||||
at.event_mask = KeyMask | ButtonMask | MouseMask | PropertyChangeMask
|
||||
| SubstructureRedirectMask | SubstructureNotifyMask | StructureNotifyMask;
|
||||
|
||||
at.cursor = cursor[CurNormal];
|
||||
|
||||
25
src/mouse.c
25
src/mouse.c
@ -121,8 +121,6 @@ mouse_move(Client *c)
|
||||
void
|
||||
mouse_resize(Client *c)
|
||||
{
|
||||
int ocx = c->geo.x;
|
||||
int ocy = c->geo.y;
|
||||
XRectangle geo = c->geo;
|
||||
XEvent ev;
|
||||
Window w;
|
||||
@ -138,10 +136,6 @@ mouse_resize(Client *c)
|
||||
if(XGrabPointer(dpy, ROOT, False, MouseMask, GrabModeAsync, GrabModeAsync,
|
||||
None, cursor[CurResize], CurrentTime) != GrabSuccess)
|
||||
return;
|
||||
|
||||
if(!c->tile)
|
||||
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->geo.width + conf.client.borderheight, c->geo.height);
|
||||
|
||||
do
|
||||
{
|
||||
XMaskEvent(dpy, MouseMask | ExposureMask | SubstructureRedirectMask, &ev);
|
||||
@ -166,11 +160,23 @@ mouse_resize(Client *c)
|
||||
}
|
||||
else if(!c->tile)
|
||||
{
|
||||
geo.width = ((ev.xmotion.x - ocx < 1) ? 1 : ev.xmotion.x - ocx);
|
||||
geo.height = ((ev.xmotion.y - ocy < 1) ? 1 : ev.xmotion.y - ocy);
|
||||
if((geo.width + ev.xmotion.x_root - omx) > 1)
|
||||
geo.width += ev.xmotion.x_root - omx;
|
||||
if((geo.height + ev.xmotion.y_root - omy) > 1)
|
||||
geo.height += ev.xmotion.y_root - omy;
|
||||
|
||||
omx = ev.xmotion.x_root;
|
||||
omy = ev.xmotion.y_root;
|
||||
|
||||
if(!conf.resize_transparent)
|
||||
client_moveresize(c, geo, True);
|
||||
else
|
||||
{
|
||||
XClearWindow(dpy, c->win);
|
||||
XClearWindow(dpy, ROOT);
|
||||
frame_update(c);
|
||||
XDrawRectangles(dpy, ROOT, gc_reverse, &geo, 1);
|
||||
}
|
||||
|
||||
XSync(dpy, False);
|
||||
}
|
||||
@ -182,10 +188,7 @@ mouse_resize(Client *c)
|
||||
while(ev.type != ButtonRelease);
|
||||
|
||||
if(!c->tile)
|
||||
{
|
||||
client_moveresize(c, geo, True);
|
||||
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->geo.width + conf.client.borderheight, c->geo.height);
|
||||
}
|
||||
else
|
||||
tags[selscreen][seltag[selscreen]].layout.func(c->screen);
|
||||
|
||||
|
||||
@ -308,7 +308,7 @@ void uicb_reload(uicb_t);
|
||||
|
||||
/* Principal */
|
||||
Display *dpy;
|
||||
GC gc, gc_stipple;
|
||||
GC gc, gc_stipple, gc_reverse;
|
||||
int selscreen;
|
||||
Conf conf;
|
||||
Key *keys;
|
||||
|
||||
20
wmfs.1
20
wmfs.1
@ -13,24 +13,34 @@
|
||||
.SH "NAME"
|
||||
wmfs \- Window Manager From Scratch
|
||||
.SH "SYNOPSIS"
|
||||
\fBwmfs\fR [\fB\-v\fR | \fB\-\-version\fR] [\fB\-h\fR | \fB\-\-help\fR] [ \fB\-i\fR | \fB\-\-info\fR]
|
||||
\fBwmfs\fR [\fB\-v\fR] [\fB\-h\fR] [\fB\-i\fR] [\fB\-c <uicb_function> <cmd>\fR] [\fB\-s <string>\fR]
|
||||
.sp
|
||||
.SH "DESCRIPTION"
|
||||
\fBWMFS\fR is a basic, lightweight and dynamic tiling windows manager for X\&.
|
||||
.sp
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
\fB\-v\fR, \fB\-\-version\fR
|
||||
\fB\-c <uicb_function> <cmd>\fR
|
||||
.RS 4
|
||||
Execute an uicb function to control WMFS\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-s <string>\fR
|
||||
.RS 4
|
||||
Set the bar(s) statustext\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-v\fR
|
||||
.RS 4
|
||||
Print version information to standard output, then exit\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
\fB\-h\fR
|
||||
.RS 4
|
||||
Print help information, then exit\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB\-i\fR, \fB\-\-info\fR
|
||||
\fB\-i\fR
|
||||
.RS 4
|
||||
Print WMFS informations
|
||||
.RE
|
||||
@ -157,7 +167,7 @@ WMFS is configured by \fI$HOME/\&.config/wmfs/wmfsrc\fR\&.
|
||||
WMFS isn\'t stable for now\&. So it certainly contains some bugs\&.
|
||||
.sp
|
||||
.SH "AUTHORS"
|
||||
Martin Duquesnoy <\fIxorg62@gmail\&.com\fR\&[1]> for the code\&.
|
||||
Martin Duquesnoy <\fIxorg62@gmail\&.com\fR\&[1]>\&.
|
||||
.sp
|
||||
.SH "WWW"
|
||||
Main site: \fIhttp://wmfs\&.malikania\&.org\fR Bug tracker: \fIhttp://wmfs\&.malikania\&.org/projects/wmfs/issues\fR
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user