summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2013-10-20 02:00:03 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2013-10-20 02:00:03 +0000
commita6f053421790b1ddcaa6011833caa63cbe20c468 (patch)
tree630c1f64dd83c874f757c3a1b085ee111bbb5a0b
parent011a88aacfe3a5bb917fae82f9eae58f2c439486 (diff)
shuffle
-rw-r--r--app/cwm/xutil.c76
1 files changed, 38 insertions, 38 deletions
diff --git a/app/cwm/xutil.c b/app/cwm/xutil.c
index 7006d2b82..be5ec8fde 100644
--- a/app/cwm/xutil.c
+++ b/app/cwm/xutil.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: xutil.c,v 1.77 2013/10/20 01:55:32 okan Exp $
+ * $OpenBSD: xutil.c,v 1.78 2013/10/20 02:00:02 okan Exp $
*/
#include <sys/param.h>
@@ -32,27 +32,6 @@
static unsigned int ign_mods[] = { 0, LockMask, Mod2Mask, Mod2Mask | LockMask };
-int
-xu_ptr_grab(Window win, u_int mask, Cursor curs)
-{
- return (XGrabPointer(X_Dpy, win, False, mask,
- GrabModeAsync, GrabModeAsync,
- None, curs, CurrentTime) == GrabSuccess ? 0 : -1);
-}
-
-int
-xu_ptr_regrab(u_int mask, Cursor curs)
-{
- return (XChangeActivePointerGrab(X_Dpy, mask,
- curs, CurrentTime) == GrabSuccess ? 0 : -1);
-}
-
-void
-xu_ptr_ungrab(void)
-{
- XUngrabPointer(X_Dpy, CurrentTime);
-}
-
void
xu_btn_grab(Window win, int mask, u_int btn)
{
@@ -71,22 +50,6 @@ xu_btn_ungrab(Window win)
}
void
-xu_ptr_getpos(Window win, int *x, int *y)
-{
- Window w0, w1;
- int tmp0, tmp1;
- u_int tmp2;
-
- XQueryPointer(X_Dpy, win, &w0, &w1, &tmp0, &tmp1, x, y, &tmp2);
-}
-
-void
-xu_ptr_setpos(Window win, int x, int y)
-{
- XWarpPointer(X_Dpy, None, win, 0, 0, 0, 0, x, y);
-}
-
-void
xu_key_grab(Window win, u_int mask, KeySym keysym)
{
KeyCode code;
@@ -109,6 +72,43 @@ xu_key_ungrab(Window win)
}
int
+xu_ptr_grab(Window win, u_int mask, Cursor curs)
+{
+ return (XGrabPointer(X_Dpy, win, False, mask,
+ GrabModeAsync, GrabModeAsync,
+ None, curs, CurrentTime) == GrabSuccess ? 0 : -1);
+}
+
+int
+xu_ptr_regrab(u_int mask, Cursor curs)
+{
+ return (XChangeActivePointerGrab(X_Dpy, mask,
+ curs, CurrentTime) == GrabSuccess ? 0 : -1);
+}
+
+void
+xu_ptr_ungrab(void)
+{
+ XUngrabPointer(X_Dpy, CurrentTime);
+}
+
+void
+xu_ptr_getpos(Window win, int *x, int *y)
+{
+ Window w0, w1;
+ int tmp0, tmp1;
+ u_int tmp2;
+
+ XQueryPointer(X_Dpy, win, &w0, &w1, &tmp0, &tmp1, x, y, &tmp2);
+}
+
+void
+xu_ptr_setpos(Window win, int x, int y)
+{
+ XWarpPointer(X_Dpy, None, win, 0, 0, 0, 0, x, y);
+}
+
+int
xu_getprop(Window win, Atom atm, Atom type, long len, unsigned char **p)
{
Atom realtype;