Normalize some window functions protos

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-03-21 11:33:50 +01:00
parent 1d468c5583
commit 904cd4e06a
4 changed files with 16 additions and 13 deletions

View file

@ -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 */

View file

@ -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

View file

@ -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

View file

@ -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