summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/miniview.c
diff options
context:
space:
mode:
authorracarr <racarr@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-03 00:49:44 +0000
committerracarr <racarr@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2007-02-03 00:49:44 +0000
commitbbfa0da4f892aaa6f90b8a573cdb93792110dcc3 (patch)
treef7a69126e8bb8cf8710be61a8c4758427822b403 /beryl-plugins/src/miniview.c
parent8910487f95a626b5322a4f152d4294c3b0c080be (diff)
downloadmarex-dev-bbfa0da4f892aaa6f90b8a573cdb93792110dcc3.tar.gz
marex-dev-bbfa0da4f892aaa6f90b8a573cdb93792110dcc3.tar.bz2
Add miniviewscreen->pointerX/Y and update it in preparePaintScreen with XQueryPointer if ms->expoMode, this is neccesary because miniview will have to draw the cursor for drag and drop in expo mode
git-svn-id: file:///beryl/trunk@3597 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/miniview.c')
-rw-r--r--beryl-plugins/src/miniview.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/beryl-plugins/src/miniview.c b/beryl-plugins/src/miniview.c
index 04abeec..ecc1d78 100644
--- a/beryl-plugins/src/miniview.c
+++ b/beryl-plugins/src/miniview.c
@@ -79,6 +79,9 @@ typedef struct _MiniviewScreen
Bool moving;
Bool expoMode;
+
+ int pointerX;
+ int pointerY;
} MiniviewScreen;
@@ -203,7 +206,7 @@ static Bool miniviewPaintScreen(CompScreen * s,
static void miniviewPreparePaintScreen(CompScreen *s, int ICouldCareLess)
{
MINIVIEW_SCREEN(s);
- if (ms->moving && ms->showing)
+ if ((ms->moving && ms->showing) || ms->expoMode)
{
int winX, winY;
int rootX, rootY;
@@ -214,8 +217,16 @@ static void miniviewPreparePaintScreen(CompScreen *s, int ICouldCareLess)
XQueryPointer(s->display->display, s->root,
&root_return, &child_return,
&rootX, &rootY, &winX, &winY, &mask_return);
- ms->miniX = rootX;
- ms->miniY = rootY;
+ if (!ms->expoMode)
+ {
+ ms->miniX = rootX;
+ ms->miniY = rootY;
+ }
+ else
+ {
+ ms->pointerX = rootX;
+ ms->pointerY = rootY;
+ }
}
UNWRAP(ms,s,preparePaintScreen);
(*s->preparePaintScreen) (s,ICouldCareLess);
@@ -490,7 +501,7 @@ static Bool miniviewInitScreen(CompPlugin * p, CompScreen * s)
if (!ms)
return FALSE;
- ms->expoCam = ms->expoMode = ms->moving = ms->miniX = ms->miniY = ms->miniViewport = ms->showing = ms->zCam =
+ ms->pointerX = ms->pointerY = ms->expoCam = ms->expoMode = ms->moving = ms->miniX = ms->miniY = ms->miniViewport = ms->showing = ms->zCam =
ms->moveStep = 0;
ms->size = 3.0;
addScreenAction(s, &md->opt[MINIVIEW_DISPLAY_OPTION_CREATE].value.action);