~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-03-07 15:38:55 UTC
  • mfrom: (1.1.23 upstream)
  • Revision ID: james.westby@ubuntu.com-20080307153855-p3bk2dge7n44tb7l
Tags: 0.7.2-0ubuntu1
* new upstream release
  - adds missing color filters
  - bugfixes
  - simplify build-depends
* debian/patches/10_from_git_8d38454.diff:
  - fix in wall from git

Show diffs side-by-side

added added

removed removed

Lines of Context:
580
580
wallHandleEvent (CompDisplay *d,
581
581
                 XEvent      *event)
582
582
{
 
583
    Window activeWindow = d->activeWindow;
 
584
 
583
585
    WALL_DISPLAY (d);
584
586
 
585
587
    switch (event->type)
586
588
    {
587
589
    case ClientMessage:
588
 
        if (event->xclient.message_type == d->winActiveAtom)
589
 
        {
590
 
            CompWindow *w;
591
 
 
592
 
            w = findWindowAtDisplay (d, event->xclient.window);
593
 
            if (w)
594
 
            {
595
 
                int dx, dy;
596
 
 
597
 
                /* window must be placed */
598
 
                if (!w->placed)
599
 
                    break;
600
 
 
601
 
                if (otherScreenGrabExist (w->screen, "switcher", "scale", 0))
602
 
                    break;
603
 
 
604
 
                defaultViewportForWindow (w, &dx, &dy);
605
 
                dx -= w->screen->x;
606
 
                dy -= w->screen->y;
607
 
        
608
 
                if (dx || dy)
609
 
                    wallMoveViewport (w->screen, -dx, -dy, None);
610
 
            }
611
 
        }
612
 
        else if (event->xclient.message_type == d->desktopViewportAtom)
 
590
        if (event->xclient.message_type == d->desktopViewportAtom)
613
591
        {
614
592
            int        dx, dy;
615
593
            CompScreen *s;
635
613
    UNWRAP (wd, d, handleEvent);
636
614
    (*d->handleEvent) (d, event);
637
615
    WRAP (wd, d, handleEvent, wallHandleEvent);
 
616
 
 
617
    if (activeWindow != d->activeWindow)
 
618
    {
 
619
        CompWindow *w;
 
620
 
 
621
        w = findWindowAtDisplay (d, d->activeWindow);
 
622
        if (w && w->placed)
 
623
        {
 
624
            if (!otherScreenGrabExist (w->screen, "switcher", "scale", 0))
 
625
            {
 
626
                int dx, dy;
 
627
 
 
628
                defaultViewportForWindow (w, &dx, &dy);
 
629
                dx -= w->screen->x;
 
630
                dy -= w->screen->y;
 
631
        
 
632
                if (dx || dy)
 
633
                    wallMoveViewport (w->screen, -dx, -dy, None);
 
634
            }
 
635
        }
 
636
    }
638
637
}
639
638
 
640
639
static Bool