Normalize some window functions protos
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
1d468c5583
commit
904cd4e06a
4
client.c
4
client.c
|
@ -261,7 +261,7 @@ client_focus(Client *c, int screen, Bool raise)
|
|||
}
|
||||
/* since we're dropping EnterWindow events and sometimes the window
|
||||
* will appear under the mouse, grabbuttons */
|
||||
window_grabbuttons(c->phys_screen, c->win);
|
||||
window_grabbuttons(c->win, c->phys_screen);
|
||||
}
|
||||
else
|
||||
XSetInputFocus(globalconf.display,
|
||||
|
@ -402,7 +402,7 @@ client_manage(Window w, XWindowAttributes *wa, int screen)
|
|||
if(globalconf.have_shape)
|
||||
{
|
||||
XShapeSelectInput(globalconf.display, w, ShapeNotifyMask);
|
||||
window_setshape(c->phys_screen, c->win);
|
||||
window_setshape(c->win, c->phys_screen);
|
||||
}
|
||||
|
||||
/* attach to the stack */
|
||||
|
|
6
event.c
6
event.c
|
@ -132,7 +132,7 @@ event_handle_buttonpress(XEvent *e)
|
|||
&& ev->button == Button1)
|
||||
{
|
||||
XAllowEvents(globalconf.display, ReplayPointer, CurrentTime);
|
||||
window_grabbuttons(c->phys_screen, c->win);
|
||||
window_grabbuttons(c->win, c->phys_screen);
|
||||
}
|
||||
else
|
||||
event_handle_mouse_button_press(c->screen, ev->button, ev->state, globalconf.buttons.client, NULL);
|
||||
|
@ -268,7 +268,7 @@ event_handle_enternotify(XEvent *e)
|
|||
|
||||
if(c || (c = client_get_bywin(globalconf.clients, ev->window)))
|
||||
{
|
||||
window_grabbuttons(c->phys_screen, c->win);
|
||||
window_grabbuttons(c->win, c->phys_screen);
|
||||
if(globalconf.screens[c->screen].sloppy_focus)
|
||||
client_focus(c, c->screen,
|
||||
(globalconf.screens[c->screen].sloppy_focus
|
||||
|
@ -472,7 +472,7 @@ event_handle_shape(XEvent * e)
|
|||
Client *c = client_get_bywin(globalconf.clients, ev->window);
|
||||
|
||||
if(c)
|
||||
window_setshape(c->phys_screen, c->win);
|
||||
window_setshape(c->win, c->phys_screen);
|
||||
}
|
||||
|
||||
/** Handle XRandR events
|
||||
|
|
15
window.c
15
window.c
|
@ -93,11 +93,11 @@ window_configure(Window win, area_t geometry, int border)
|
|||
}
|
||||
|
||||
/** Grab or ungrab buttons on a window
|
||||
* \param screen The screen
|
||||
* \param win The window
|
||||
* \param phys_screen Physical screen number
|
||||
*/
|
||||
void
|
||||
window_grabbuttons(int phys_screen, Window win)
|
||||
window_grabbuttons(Window win, int phys_screen)
|
||||
{
|
||||
Button *b;
|
||||
|
||||
|
@ -175,14 +175,17 @@ window_root_grabkeys(int phys_screen)
|
|||
}
|
||||
|
||||
void
|
||||
window_setshape(int screen, Window win)
|
||||
window_setshape(Window win, int phys_screen)
|
||||
{
|
||||
int bounding_shaped;
|
||||
int i, b; unsigned int u; /* dummies */
|
||||
int bounding_shaped, i, b;
|
||||
unsigned int u; /* dummies */
|
||||
|
||||
/* Logic to decide if we have a shaped window cribbed from fvwm-2.5.10. */
|
||||
if(XShapeQueryExtents(globalconf.display, win, &bounding_shaped, &i, &i,
|
||||
&u, &u, &b, &i, &i, &u, &u) && bounding_shaped)
|
||||
XShapeCombineShape(globalconf.display, RootWindow(globalconf.display, screen), ShapeBounding, 0, 0, win, ShapeBounding, ShapeSet);
|
||||
XShapeCombineShape(globalconf.display,
|
||||
RootWindow(globalconf.display, phys_screen),
|
||||
ShapeBounding, 0, 0, win, ShapeBounding, ShapeSet);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
4
window.h
4
window.h
|
@ -27,10 +27,10 @@
|
|||
int window_setstate(Window, long);
|
||||
long window_getstate(Window);
|
||||
Status window_configure(Window, area_t, int);
|
||||
void window_grabbuttons(int, Window);
|
||||
void window_grabbuttons(Window, int);
|
||||
void window_root_grabbuttons(int);
|
||||
void window_root_grabkeys(int);
|
||||
void window_setshape(int, Window);
|
||||
void window_setshape(Window, int);
|
||||
int window_settrans(Window, double);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue