summaryrefslogtreecommitdiff
path: root/put.c
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2008-02-11 09:43:13 +0100
committerDanny Baumann <dannybaumann@web.de>2008-02-11 09:43:13 +0100
commite0be0a93cbf1727bb4a6f4eb374168a9a47d6dcd (patch)
tree8bc89cceb07e25ee133090a8770f6b481f9783ad /put.c
parenta365ad564f941502fe5a79ae6b98ceae9c2cfe18 (diff)
downloadput-e0be0a93cbf1727bb4a6f4eb374168a9a47d6dcd.tar.gz
put-e0be0a93cbf1727bb4a6f4eb374168a9a47d6dcd.tar.bz2
Add relative movement mode.
Diffstat (limited to 'put.c')
-rw-r--r--put.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/put.c b/put.c
index a9e7ce5..62a9c4a 100644
--- a/put.c
+++ b/put.c
@@ -64,7 +64,8 @@ typedef enum
PutAbsolute = 14,
PutPointer = 15,
PutViewportUp = 16,
- PutViewportDown = 17
+ PutViewportDown = 17,
+ PutRelative = 18
} PutType;
typedef struct _PutDisplay
@@ -538,6 +539,11 @@ putInitiateCommon (CompDisplay *d,
else
dy = py - y + w->input.top;
break;
+ case PutRelative:
+ /* move window by offset */
+ dx = x;
+ dy = y;
+ break;
case PutPointer:
{
/* move the window to the pointers position
@@ -662,6 +668,8 @@ putTypeFromString (char *type)
{
if (strcasecmp (type, "absolute") == 0)
return PutAbsolute;
+ else if (strcasecmp (type, "relative") == 0)
+ return PutRelative;
else if (strcasecmp (type, "pointer") == 0)
return PutPointer;
else if (strcasecmp (type, "viewport") == 0)