~ubuntu-branches/ubuntu/quantal/xorg-server/quantal-updates

« back to all changes in this revision

Viewing changes to dix/getevents.c

  • Committer: Package Import Robot
  • Author(s): Chase Douglas
  • Date: 2012-03-07 15:36:20 UTC
  • Revision ID: package-import@ubuntu.com-20120307153620-v2789zwz1n3irs3b
Tags: 2:1.11.4-0ubuntu5
* Update to 1.12 input stack 
* Drop input patches that have been merged upstream:
  - 600-Revert-dix-deduplicate-callers-of-DeliverDeviceEvent.patch
  - 601-Store-window-pointer-in-touch-listener-record.patch
  - 602-Factor-out-TouchEnd-generation-and-delivery.patch
  - 603-Export-TouchEventRejected-as-TouchRejected.patch
  - 604-Move-AllowTouch-to-dix-touch.c-and-rename-to-TouchAc.patch
  - 605-Check-for-proper-window-ID-when-processing-touch-all.patch
  - 606-Implement-early-touch-reject.patch
  - 607-Implement-touch-early-accept.patch
  - 608-dix-fix-an-out-of-memory-crash.patch
  - 609-Xi-handle-new-XIAllowEvents-request-in-inputproto-2..patch
  - 610-Fix-scrolling.patch
  - 611-Fix-touch-punt-crash.patch
  - 612-Fix-vcp-touches-corruption.patch
  - 613-Keep-vcp-touch-class.patch
* Fix indirect touch grab handling (LP: #929408)
  - Add temporary patch 501_touch_accept_end.patch
  - Add temporary patch 502_indirect_touch_window_set.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
360
360
            if (i >= lastSlave->valuator->numAxes)
361
361
            {
362
362
                pDev->last.valuators[i] = 0;
 
363
                valuator_mask_set_double(pDev->last.scroll, i, 0);
363
364
            }
364
365
            else
365
366
            {
367
368
                val = rescaleValuatorAxis(val, lastSlave->valuator->axes + i,
368
369
                                          pDev->valuator->axes + i, 0, 0);
369
370
                pDev->last.valuators[i] = val;
 
371
                valuator_mask_set_double(pDev->last.scroll, i, val);
370
372
            }
371
373
        }
372
374
    }
838
840
    ScreenPtr scr = miPointerGetScreen(dev);
839
841
    double x, y;
840
842
 
841
 
    BUG_WARN(!dev->valuator);
842
 
    BUG_WARN(dev->valuator->numAxes < 2);
 
843
    BUG_WARN(!dev->valuator || dev->valuator->numAxes < 2);
843
844
    if (!dev->valuator || dev->valuator->numAxes < 2)
 
845
    {
 
846
        /* if we have no axes, last.valuators must be in screen coords
 
847
         * anyway */
 
848
        *devx = *screenx = dev->last.valuators[0];
 
849
        *devy = *screeny = dev->last.valuators[1];
844
850
        return scr;
 
851
    }
845
852
 
846
853
    if (valuator_mask_isset(mask, 0))
847
854
        x = valuator_mask_get_double(mask, 0);
1491
1498
{
1492
1499
    CARD32 ms = GetTimeInMillis();
1493
1500
    int num_events = 0, nev_tmp;
1494
 
    int h_scroll_axis = pDev->valuator->h_scroll_axis;
1495
 
    int v_scroll_axis = pDev->valuator->v_scroll_axis;
1496
1501
    ValuatorMask mask;
1497
1502
    ValuatorMask scroll;
1498
1503
    int i;
1517
1522
    {
1518
1523
        double val, adj;
1519
1524
        int axis;
 
1525
        int h_scroll_axis = -1;
 
1526
        int v_scroll_axis = -1;
 
1527
 
 
1528
        if (pDev->valuator)
 
1529
        {
 
1530
            h_scroll_axis = pDev->valuator->h_scroll_axis;
 
1531
            v_scroll_axis = pDev->valuator->v_scroll_axis;
 
1532
        }
1520
1533
 
1521
1534
        /* Up is negative on valuators, down positive */
1522
1535
        switch (buttons) {