~alan-griffiths/mir/fix-1654023

« back to all changes in this revision

Viewing changes to src/server/input/android/input_sender.cpp

  • Committer: Daniel van Vugt
  • Date: 2015-04-28 07:54:10 UTC
  • mfrom: (2517 development-branch)
  • mto: This revision was merged to the branch mainline in revision 2673.
  • Revision ID: daniel.van.vugt@canonical.com-20150428075410-rwskshfuar7voesp
Merge latest trunk and fix conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright © 2014 Canonical Ltd.
 
2
 * Copyright © 2014-2015 Canonical Ltd.
3
3
 *
4
4
 * This program is free software: you can redistribute it and/or modify it
5
5
 * under the terms of the GNU General Public License version 3,
16
16
 * Authored by: Andreas Pokorny <andreas.pokorny@canonical.com>
17
17
 */
18
18
 
19
 
#define MIR_INCLUDE_DEPRECATED_EVENT_HEADER 
 
19
#include "mir/events/event_private.h"
20
20
 
21
21
#include "input_sender.h"
22
22
#include "input_send_entry.h"
404
404
 
405
405
void mia::InputSender::ActiveTransfer::update_timer()
406
406
{
407
 
    if (send_timer)
408
 
        send_timer->reschedule_in(input_send_timeout);
409
 
    else
410
 
        send_timer = state.main_loop->notify_in(input_send_timeout, [this](){on_response_timeout();});
 
407
    if (send_timer == nullptr)
 
408
        send_timer = state.main_loop->create_alarm([this]{ on_response_timeout(); });
 
409
 
 
410
    send_timer->reschedule_in(input_send_timeout);
411
411
}
412
412
 
413
413
void mia::InputSender::ActiveTransfer::cancel_timer()