Man: Add -c/-s option in man.
This commit is contained in:
11
src/init.c
11
src/init.c
@@ -89,10 +89,17 @@ 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);
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user