~ubuntu-branches/ubuntu/quantal/compiz/quantal-proposed-201303260116

« back to all changes in this revision

Viewing changes to plugins/scale/src/scale.cpp

  • Committer: timo.jyrinki at canonical
  • Date: 2012-09-18 11:32:20 UTC
  • mfrom: (3248.2.10)
  • Revision ID: timo.jyrinki@canonical.com-20120918113220-muavjbyvtxuysaix
* New upstream snapshot.
  - Fix the case where a new gsettings schema got added for building but
    it wasn't recompiled locally (LP: #1046701)
  - Scale: select the window under the pointer, when the scale animation 
    is over. (LP: #1045127)
  - Fixes the some "Use of uninitialised value" warnings reported by
    valgrind (LP: #1004336))
  - Check if org.gnome.mutter is available before using it (LP: #1048551)
  - We don't need to map our style windows, prevent them from cluttering 
    up the paint queue (LP: #1042552)
  - Don't ever enter the subdir of a plugin that is disabled. (LP: #1049100)
  - Workaround SubBuffer performance regression (LP: #1037411)
  - Changed the default placement of the benchmark window from 0,0 to
    100,50. (LP: #1039406)
  - Fix CMakeLists.txt to bring an xslt file back to compiz-dev
  - Avoid a NULL dereference and give a useful error message instead
    (LP: #944653)
  - Fix (LP: #1050752)
  - Fix flickering and performance problems with using Unredirect Fullscreen 
    Windows with multiple monitors. (LP: #1050749) (LP: #1051885)

Show diffs side-by-side

added added

removed removed

Lines of Context:
929
929
                }
930
930
            }
931
931
            else if (state == ScaleScreen::Out)
 
932
            {
932
933
                state = ScaleScreen::Wait;
 
934
 
 
935
                // When the animation is completed, select the window under mouse
 
936
                selectWindowAt (pointerX, pointerY);
 
937
            }
933
938
        }
934
939
    }
935
940
 
1346
1351
}
1347
1352
 
1348
1353
const Window &
1349
 
ScaleScreen::getHoveredWindow ()
 
1354
ScaleScreen::getHoveredWindow () const
1350
1355
{
1351
1356
    return priv->hoveredWindow;
1352
1357
}
1353
1358
 
 
1359
const Window &
 
1360
ScaleScreen::getSelectedWindow () const
 
1361
{
 
1362
    return priv->selectedWindow;
 
1363
}
 
1364
 
1354
1365
bool
1355
1366
PrivateScaleScreen::selectWindowAt (int  x,
1356
1367
                                    int  y,
1379
1390
    return false;
1380
1391
}
1381
1392
 
 
1393
bool
 
1394
PrivateScaleScreen::selectWindowAt (int  x,
 
1395
                                    int  y)
 
1396
{
 
1397
    CompOption *o = screen->getOption ("click_to_focus");
 
1398
    bool focus = (o && !o->value ().b ());
 
1399
 
 
1400
    return selectWindowAt (x, y, focus);
 
1401
}
 
1402
 
1382
1403
void
1383
1404
PrivateScaleScreen::moveFocusWindow (int dx,
1384
1405
                                     int dy)
1598
1619
                grabIndex                              &&
1599
1620
                state != ScaleScreen::In)
1600
1621
            {
1601
 
                bool       focus = false;
1602
 
                CompOption *o = screen->getOption ("click_to_focus");
1603
 
 
1604
 
                if (o && !o->value ().b ())
1605
 
                    focus = true;
1606
 
 
1607
 
                selectWindowAt (event->xmotion.x_root,
1608
 
                                event->xmotion.y_root,
1609
 
                                focus);
 
1622
                selectWindowAt (event->xmotion.x_root, event->xmotion.y_root);
1610
1623
            }
1611
1624
            break;
1612
1625
        case DestroyNotify:
1629
1642
                w = screen->findWindow (event->xclient.window);
1630
1643
                if (w)
1631
1644
                {
1632
 
                    bool       focus = false;
1633
 
                    CompOption *o = screen->getOption ("click_to_focus");
1634
 
 
1635
 
                    if (o && !o->value ().b ())
1636
 
                        focus = true;
1637
 
 
1638
1645
                    if (w->id () == dndTarget)
1639
1646
                        sendDndStatusMessage (event->xclient.data.l[0]);
1640
1647
 
1662
1669
                                hover.start (time, (float) time * 1.2);
1663
1670
                            }
1664
1671
 
1665
 
                            selectWindowAt (pointerX, pointerY, focus);
 
1672
                            selectWindowAt (pointerX, pointerY);
1666
1673
                        }
1667
1674
                        else
1668
1675
                        {