~loic.molinari/qtmir/multi-bufferstream-support-fixes

« back to all changes in this revision

Viewing changes to src/modules/Unity/Application/mirsurface.cpp

  • Committer: CI Train Bot
  • Author(s): Cemil Azizoglu
  • Date: 2015-09-23 15:17:10 UTC
  • mfrom: (377.1.5 qtmir)
  • Revision ID: ci-train-bot@canonical.com-20150923151710-0mwrkvqe0f25sdn9
Port gl_bind_to_texture to the new TextureSource interface.
Update for Mir 0.16 release.
Approved by: Alan Griffiths

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
    if (qtEvent->buttons() & Qt::MidButton)
63
63
        buttons |= mir_pointer_button_tertiary;
64
64
 
65
 
    return mir::events::make_event(0 /*DeviceID */, timestamp, modifiers, action,
66
 
                                   buttons, qtEvent->x(), qtEvent->y(), 0, 0);
 
65
    return mir::events::make_event(0 /*DeviceID */, timestamp, 0 /* mac */, modifiers, action,
 
66
                                   buttons, qtEvent->x(), qtEvent->y(), 0, 0, 0, 0);
67
67
}
68
68
 
69
69
mir::EventUPtr makeMirEvent(QHoverEvent *qtEvent, MirPointerAction action)
72
72
 
73
73
    MirPointerButtons buttons = 0;
74
74
 
75
 
    return mir::events::make_event(0 /*DeviceID */, timestamp, mir_input_event_modifier_none, action,
76
 
                                   buttons, qtEvent->posF().x(), qtEvent->posF().y(), 0, 0);
 
75
    return mir::events::make_event(0 /*DeviceID */, timestamp, 0 /* mac */, mir_input_event_modifier_none, action,
 
76
                                   buttons, qtEvent->posF().x(), qtEvent->posF().y(), 0, 0, 0, 0);
77
77
}
78
78
 
79
79
mir::EventUPtr makeMirEvent(QKeyEvent *qtEvent)
94
94
        action = mir_keyboard_action_repeat;
95
95
 
96
96
    return mir::events::make_event(0 /* DeviceID */, std::chrono::milliseconds(qtEvent->timestamp()),
97
 
                           action, qtEvent->nativeVirtualKey(),
 
97
                           0 /* mac */, action, qtEvent->nativeVirtualKey(),
98
98
                           qtEvent->nativeScanCode(),
99
99
                           qtEvent->nativeModifiers());
100
100
}
106
106
{
107
107
    auto modifiers = getMirModifiersFromQt(qmods);
108
108
    auto ev = mir::events::make_event(0, std::chrono::milliseconds(qtTimestamp),
109
 
                                      modifiers);
 
109
                                      0 /* mac */, modifiers);
110
110
 
111
111
    for (int i = 0; i < qtTouchPoints.count(); ++i) {
112
112
        auto touchPoint = qtTouchPoints.at(i);