~ubuntu-branches/ubuntu/precise/qemu-kvm/precise

« back to all changes in this revision

Viewing changes to input.c

  • Committer: Serge Hallyn
  • Date: 2011-10-19 07:37:43 UTC
  • mfrom: (1.2.7)
  • Revision ID: serge.hallyn@ubuntu.com-20111019073743-7i7n9irsxlm38wic
Tags: 0.15.0+noroms-0ubuntu1
* New upstream release
* Remaining changes from upstream:
  - removed all binary roms and tests/pi_10.com
* Removed Detect-and-use-GCC-atomic-builtins-for-locking.patch - non-NPTL
  implementations were removed with commit
  02615337ef295443daa03233e492194e289a807e
* Drop spice-qxl-locking-fix-for-qemu-kvm.patch - should be unnecessary
  as of commit 196a778428989217b82de042725dc8eb29c8f8d8
* drop patches applied upstream:
  - CVE-2011-1751.diff
  - virtio-guard-against-negative-vq-notifies-CVE-2011-2512.diff
  - CVE-2011-2527.patch
  - fix-pa-configure.patch
* Refreshed the remaining patches:
  - larger_default_ram_size.patch
  - CVE-2011-2212-virtqueue-indirect-overflow.patch
  - qemuifup-fix-paths.patch
  - vpc.patch
* e1000-Dont-set-the-Capabilities-List-bit.patch - switched to the
  cherrypicked upstream patch (as the source file changed quite a bit,
  and the hand-ported patch backported to 0.14.1 does not apply).
* Drop qemu-kvm-spice (all changes from 0.14.1+noroms-0ubuntu7), it will
  need its own source package (LP: #878162)

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
 
60
60
    if (is_absolute != current_is_absolute ||
61
61
        has_absolute != current_has_absolute) {
62
 
        notifier_list_notify(&mouse_mode_notifiers);
 
62
        notifier_list_notify(&mouse_mode_notifiers, NULL);
63
63
    }
64
64
 
65
65
    current_is_absolute = is_absolute;
148
148
    QEMUPutMouseEntry *entry;
149
149
    QEMUPutMouseEvent *mouse_event;
150
150
    void *mouse_event_opaque;
151
 
    int width;
 
151
    int width, height;
152
152
 
153
153
    if (QTAILQ_EMPTY(&mouse_handlers)) {
154
154
        return;
160
160
    mouse_event_opaque = entry->qemu_put_mouse_event_opaque;
161
161
 
162
162
    if (mouse_event) {
163
 
        if (graphic_rotate) {
164
 
            if (entry->qemu_put_mouse_event_absolute)
165
 
                width = 0x7fff;
166
 
            else
167
 
                width = graphic_width - 1;
 
163
        if (entry->qemu_put_mouse_event_absolute) {
 
164
            width = 0x7fff;
 
165
            height = 0x7fff;
 
166
        } else {
 
167
            width = graphic_width - 1;
 
168
            height = graphic_height - 1;
 
169
        }
 
170
 
 
171
        switch (graphic_rotate) {
 
172
        case 0:
 
173
            mouse_event(mouse_event_opaque,
 
174
                        dx, dy, dz, buttons_state);
 
175
            break;
 
176
        case 90:
168
177
            mouse_event(mouse_event_opaque,
169
178
                        width - dy, dx, dz, buttons_state);
170
 
        } else
171
 
            mouse_event(mouse_event_opaque,
172
 
                        dx, dy, dz, buttons_state);
 
179
            break;
 
180
        case 180:
 
181
            mouse_event(mouse_event_opaque,
 
182
                        width - dx, height - dy, dz, buttons_state);
 
183
            break;
 
184
        case 270:
 
185
            mouse_event(mouse_event_opaque,
 
186
                        dy, height - dx, dz, buttons_state);
 
187
            break;
 
188
        }
173
189
    }
174
190
}
175
191