opacity change by mousewheel
This commit is contained in:
parent
3dcf2bd5b7
commit
ec6525883e
22
client.c
22
client.c
|
@ -98,6 +98,24 @@ grabbuttons(Client * c, Bool focused, KeySym modkey, unsigned int numlockmask)
|
||||||
XGrabButton(c->display, Button3, modkey | numlockmask | LockMask,
|
XGrabButton(c->display, Button3, modkey | numlockmask | LockMask,
|
||||||
c->win, False, BUTTONMASK, GrabModeAsync, GrabModeSync, None, None);
|
c->win, False, BUTTONMASK, GrabModeAsync, GrabModeSync, None, None);
|
||||||
|
|
||||||
|
XGrabButton(c->display, Button4, modkey, c->win, False, BUTTONMASK,
|
||||||
|
GrabModeAsync, GrabModeSync, None, None);
|
||||||
|
XGrabButton(c->display, Button4, modkey | LockMask, c->win, False,
|
||||||
|
BUTTONMASK, GrabModeAsync, GrabModeSync, None, None);
|
||||||
|
XGrabButton(c->display, Button4, modkey | numlockmask, c->win, False,
|
||||||
|
BUTTONMASK, GrabModeAsync, GrabModeSync, None, None);
|
||||||
|
XGrabButton(c->display, Button4, modkey | numlockmask | LockMask,
|
||||||
|
c->win, False, BUTTONMASK, GrabModeAsync, GrabModeSync, None, None);
|
||||||
|
|
||||||
|
XGrabButton(c->display, Button5, modkey, c->win, False, BUTTONMASK,
|
||||||
|
GrabModeAsync, GrabModeSync, None, None);
|
||||||
|
XGrabButton(c->display, Button5, modkey | LockMask, c->win, False,
|
||||||
|
BUTTONMASK, GrabModeAsync, GrabModeSync, None, None);
|
||||||
|
XGrabButton(c->display, Button5, modkey | numlockmask, c->win, False,
|
||||||
|
BUTTONMASK, GrabModeAsync, GrabModeSync, None, None);
|
||||||
|
XGrabButton(c->display, Button5, modkey | numlockmask | LockMask,
|
||||||
|
c->win, False, BUTTONMASK, GrabModeAsync, GrabModeSync, None, None);
|
||||||
|
|
||||||
XUngrabButton(c->display, AnyButton, AnyModifier, RootWindow(c->display, c->phys_screen));
|
XUngrabButton(c->display, AnyButton, AnyModifier, RootWindow(c->display, c->phys_screen));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -304,6 +322,8 @@ focus(Display *disp, DC *drawcontext, Client * c, Bool selscreen, awesome_config
|
||||||
XSetWindowBorder(sel->display, sel->win, drawcontext->norm[ColBorder]);
|
XSetWindowBorder(sel->display, sel->win, drawcontext->norm[ColBorder]);
|
||||||
setclienttrans(sel, awesomeconf->opacity_unfocused);
|
setclienttrans(sel, awesomeconf->opacity_unfocused);
|
||||||
}
|
}
|
||||||
|
if(sel == c)
|
||||||
|
return;
|
||||||
if(c)
|
if(c)
|
||||||
{
|
{
|
||||||
detachstack(c);
|
detachstack(c);
|
||||||
|
@ -659,7 +679,7 @@ uicb_settrans(Display *disp __attribute__ ((unused)),
|
||||||
awesome_config *awesomeconf __attribute__ ((unused)),
|
awesome_config *awesomeconf __attribute__ ((unused)),
|
||||||
const char *arg)
|
const char *arg)
|
||||||
{
|
{
|
||||||
double delta = 100.0, current_opacity = 0.0;
|
double delta = 100.0, current_opacity = 100.0;
|
||||||
unsigned char *data;
|
unsigned char *data;
|
||||||
Atom actual;
|
Atom actual;
|
||||||
int format;
|
int format;
|
||||||
|
|
6
event.c
6
event.c
|
@ -219,7 +219,11 @@ handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf)
|
||||||
restack(e->xany.display, &dc[c->screen], &awesomeconf[c->screen]);
|
restack(e->xany.display, &dc[c->screen], &awesomeconf[c->screen]);
|
||||||
resizemouse(c, &awesomeconf[c->screen]);
|
resizemouse(c, &awesomeconf[c->screen]);
|
||||||
}
|
}
|
||||||
}
|
else if(ev->button == Button4)
|
||||||
|
uicb_settrans(e->xany.display, &dc[c->screen], &awesomeconf[c->screen], "+5");
|
||||||
|
else if(ev->button == Button5)
|
||||||
|
uicb_settrans(e->xany.display, &dc[c->screen], &awesomeconf[c->screen], "-5");
|
||||||
|
}
|
||||||
else if(!sel)
|
else if(!sel)
|
||||||
for(screen = 0; screen < ScreenCount(e->xany.display); screen++)
|
for(screen = 0; screen < ScreenCount(e->xany.display); screen++)
|
||||||
if(RootWindow(e->xany.display, screen) == ev->window
|
if(RootWindow(e->xany.display, screen) == ev->window
|
||||||
|
|
Loading…
Reference in New Issue