move set_shape in client.c to window_setshape in window.c
This commit is contained in:
parent
bd0dc10842
commit
47a878e4cd
13
client.c
13
client.c
|
@ -411,7 +411,7 @@ manage(Window w, XWindowAttributes *wa, awesome_config *awesomeconf)
|
|||
if(awesomeconf->have_shape)
|
||||
{
|
||||
XShapeSelectInput(c->display, w, ShapeNotifyMask);
|
||||
set_shape(c);
|
||||
window_setshape(c->display, c->phys_screen, c->win);
|
||||
}
|
||||
|
||||
/* grab buttons */
|
||||
|
@ -662,17 +662,6 @@ updatesizehints(Client *c)
|
|||
&& c->maxw == c->minw && c->maxh == c->minh);
|
||||
}
|
||||
|
||||
void
|
||||
set_shape(Client *c)
|
||||
{
|
||||
int bounding_shaped;
|
||||
int i, b; unsigned int u; /* dummies */
|
||||
/* Logic to decide if we have a shaped window cribbed from fvwm-2.5.10. */
|
||||
if (XShapeQueryExtents(c->display, c->win, &bounding_shaped, &i, &i,
|
||||
&u, &u, &b, &i, &i, &u, &u) && bounding_shaped)
|
||||
XShapeCombineShape(c->display, RootWindow(c->display, c->phys_screen), ShapeBounding, 0, 0, c->win, ShapeBounding, ShapeSet);
|
||||
}
|
||||
|
||||
/** Set selected client transparency
|
||||
* \param awesomeconf awesome config
|
||||
* \param arg unused arg
|
||||
|
|
1
client.h
1
client.h
|
@ -41,7 +41,6 @@ void unmanage(Client *, long, awesome_config *);
|
|||
inline void updatesizehints(Client *);
|
||||
void updatetitle(Client *);
|
||||
void saveprops(Client *, int);
|
||||
void set_shape(Client *);
|
||||
|
||||
UICB_PROTO(uicb_killclient);
|
||||
UICB_PROTO(uicb_moveresize);
|
||||
|
|
2
event.c
2
event.c
|
@ -515,7 +515,7 @@ handle_event_shape(XEvent * e,
|
|||
Client *c = get_client_bywin(*awesomeconf->clients, ev->window);
|
||||
|
||||
if(c)
|
||||
set_shape(c);
|
||||
window_setshape(c->display, c->phys_screen, c->win);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
12
window.c
12
window.c
|
@ -20,6 +20,7 @@
|
|||
*/
|
||||
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/extensions/shape.h>
|
||||
|
||||
#include "window.h"
|
||||
#include "util.h"
|
||||
|
@ -81,6 +82,17 @@ window_configure(Display *disp, Window win, int x, int y, int w, int h, int bord
|
|||
return XSendEvent(disp, win, False, StructureNotifyMask, (XEvent *) & ce);
|
||||
}
|
||||
|
||||
void
|
||||
window_setshape(Display *disp, int screen, Window win)
|
||||
{
|
||||
int bounding_shaped;
|
||||
int i, b; unsigned int u; /* dummies */
|
||||
/* Logic to decide if we have a shaped window cribbed from fvwm-2.5.10. */
|
||||
if(XShapeQueryExtents(disp, win, &bounding_shaped, &i, &i,
|
||||
&u, &u, &b, &i, &i, &u, &u) && bounding_shaped)
|
||||
XShapeCombineShape(disp, RootWindow(disp, screen), ShapeBounding, 0, 0, win, ShapeBounding, ShapeSet);
|
||||
}
|
||||
|
||||
void
|
||||
window_settrans(Display *disp, Window win, double opacity)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue