~ubuntu-branches/ubuntu/intrepid/compiz-fusion-plugins-main/intrepid-proposed

« back to all changes in this revision

Viewing changes to src/wall/wall.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2008-06-18 12:20:58 UTC
  • mfrom: (1.1.27 upstream)
  • Revision ID: james.westby@ubuntu.com-20080618122058-wuc1dyjrso5unho3
Tags: 0.7.7+git20080618-0ubuntu1
New git snpashot

Show diffs side-by-side

added added

removed removed

Lines of Context:
508
508
    if (!x && !y)
509
509
        return FALSE;
510
510
 
511
 
    if (wallCheckDestination (s, x, y))
 
511
    if (otherScreenGrabExist (s, "move", "switcher", "group-drag", "wall", 0))
 
512
        return FALSE;
 
513
 
 
514
    if (!wallCheckDestination (s, x, y))
 
515
        return FALSE;
 
516
 
 
517
    if (ws->moveWindow != moveWindow)
512
518
    {
513
 
        if (ws->moveWindow != moveWindow)
 
519
        CompWindow *w;
 
520
 
 
521
        wallReleaseMoveWindow (s);
 
522
        w = findWindowAtScreen (s, moveWindow);
 
523
        if (w)
514
524
        {
515
 
            CompWindow *w;
516
 
 
517
 
            wallReleaseMoveWindow (s);
518
 
            w = findWindowAtScreen (s, moveWindow);
519
 
            if (w)
520
 
            {
521
 
                if (!(w->type & (CompWindowTypeDesktopMask |
522
 
                                 CompWindowTypeDockMask)))
 
525
            if (!(w->type & (CompWindowTypeDesktopMask |
 
526
                             CompWindowTypeDockMask)))
 
527
            {
 
528
                if (!(w->state & CompWindowStateStickyMask))
523
529
                {
524
 
                    if (!(w->state & CompWindowStateStickyMask))
525
 
                    {
526
 
                        ws->moveWindow = w->id;
527
 
                        ws->moveWindowX = w->attrib.x;
528
 
                        ws->moveWindowY = w->attrib.y;
529
 
                        raiseWindow (w);
530
 
                    }
 
530
                    ws->moveWindow = w->id;
 
531
                    ws->moveWindowX = w->attrib.x;
 
532
                    ws->moveWindowY = w->attrib.y;
 
533
                    raiseWindow (w);
531
534
                }
532
535
            }
533
536
        }
534
 
 
535
 
        if (!ws->moving)
536
 
        {
537
 
            ws->curPosX = s->x;
538
 
            ws->curPosY = s->y;
539
 
        }
540
 
        ws->gotoX = s->x - x;
541
 
        ws->gotoY = s->y - y;
542
 
 
543
 
        if (!ws->grabIndex)
544
 
            ws->grabIndex = pushScreenGrab (s, s->invisibleCursor, "wall");
545
 
 
546
 
        moveScreenViewport (s, x, y, TRUE);
547
 
 
548
 
        ws->moving = TRUE;
549
 
        ws->boxOutputDevice = outputDeviceForPoint (s, pointerX, pointerY);
550
537
    }
551
538
 
552
 
    if (ws->moving)
 
539
    if (!ws->moving)
553
540
    {
554
 
        if (wallGetShowSwitcher (s->display))
555
 
            ws->boxTimeout = wallGetPreviewTimeout (s->display) * 1000;
556
 
        else
557
 
            ws->boxTimeout = 0;
558
 
 
559
 
        if (otherScreenGrabExist (s, "move", "scale", "switcher",
560
 
                                  "group-drag", "wall", 0))
561
 
        {
562
 
            ws->boxTimeout = 0;
563
 
            ws->moving = FALSE;
564
 
        }
565
 
 
566
 
        ws->timer = wallGetSlideDuration (s->display) * 1000;
 
541
        ws->curPosX = s->x;
 
542
        ws->curPosY = s->y;
567
543
    }
 
544
    ws->gotoX = s->x - x;
 
545
    ws->gotoY = s->y - y;
 
546
 
 
547
    if (!ws->grabIndex)
 
548
        ws->grabIndex = pushScreenGrab (s, s->invisibleCursor, "wall");
 
549
 
 
550
    moveScreenViewport (s, x, y, TRUE);
 
551
 
 
552
    ws->moving = TRUE;
 
553
    ws->boxOutputDevice = outputDeviceForPoint (s, pointerX, pointerY);
 
554
 
 
555
    if (wallGetShowSwitcher (s->display))
 
556
        ws->boxTimeout = wallGetPreviewTimeout (s->display) * 1000;
 
557
    else
 
558
        ws->boxTimeout = 0;
 
559
 
 
560
    ws->timer = wallGetSlideDuration (s->display) * 1000;
568
561
 
569
562
    damageScreen (s);
570
563
 
571
 
    return ws->moving;
 
564
    return TRUE;
572
565
}
573
566
 
574
567
static void
589
582
            if (!s)
590
583
                break;
591
584
 
592
 
            if (otherScreenGrabExist (s, "switcher", "scale", 0))
 
585
            if (otherScreenGrabExist (s, "switcher", 0))
593
586
                break;
594
587
 
595
588
            dx = event->xclient.data.l[0] / s->width - s->x;
707
700
    WALL_SCREEN (s);
708
701
 
709
702
    wallCheckAmount (s, dx, dy, &amountX, &amountY);
710
 
    wallMoveViewport (s, amountX, amountY, win);
 
703
    if (!wallMoveViewport (s, amountX, amountY, win))
 
704
        return TRUE;
711
705
 
712
706
    if (state & CompActionStateInitKey)
713
707
        action->state |= CompActionStateTermKey;
1880
1874
 
1881
1875
    ws->boxTimeout = 0;
1882
1876
    ws->grabIndex = 0;
 
1877
    ws->timer = 0;
1883
1878
    ws->moving = FALSE;
1884
1879
    ws->showPreview = FALSE;
 
1880
    ws->moveWindow = None;
1885
1881
 
1886
1882
    memset (&ws->switcherContext, 0, sizeof (WallCairoContext));
1887
1883
    memset (&ws->thumbContext, 0, sizeof (WallCairoContext));