void mouse_drag(XMotionEvent* ev, Location* loc);
void mouse_tocorner(Client* c);
void mouse_totitle(Client* c);
+void mouse_get(int* ptrx, int* ptry);
/* tile.c */
void monocled_add(Monitor* mon, Column* col, Client* c);
void xfree(void* p);
Atom atom(char* str);
void sendmsg(Window win, Atom proto, Atom type);
-void get_mouse(int* ptrx, int* ptry);
Location loc = {0};
if (mons_find(c->win, &loc))
{
- get_mouse(&PtrX, &PtrY);
+ mouse_get(&PtrX, &PtrY);
Workspace* wspace = pickws(loc.monitor, wsid);
if (wspace != loc.workspace)
{
static Monitor* pickmon(void)
{
- get_mouse(&PtrX, &PtrY);
+ mouse_get(&PtrX, &PtrY);
Monitor* mon;
LIST_FOR_EACH_UNTIL(mon, Monitors,
(mon->x <= PtrX && PtrX < mon->x+mon->w) &&
XWarpPointer(X.disp, None, X.root, 0, 0, 0, 0, (c->x + c->w/2), c->y + (MIN_HEIGHT/2));
}
+void mouse_get(int* ptrx, int* ptry)
+{
+ Window root = 0, child = 0;
+ int winx = 0, winy = 0, mask = 0;
+ XQueryPointer(X.disp, X.root, &root, &child, ptrx, ptry, &winx, &winy, (unsigned int*)&mask);
+}
XSendEvent(X.disp, win, False, 0, &ev);
XSync(X.disp, False);
}
-
-void get_mouse(int* ptrx, int* ptry)
-{
- Window root = 0, child = 0;
- int winx = 0, winy = 0, mask = 0;
- XQueryPointer(X.disp, X.root, &root, &child, ptrx, ptry, &winx, &winy, (unsigned int*)&mask);
-}