~alan-griffiths/mir/fullscreen-sticks

« back to all changes in this revision

Viewing changes to src/platforms/evdev/libinput_device_ptr.cpp

  • Committer: Alan Griffiths
  • Date: 2015-11-23 10:45:48 UTC
  • mfrom: (3095.1.18 development-branch)
  • Revision ID: alan@octopull.co.uk-20151123104548-22k2skz9dixhjfqp
mergeĀ lp:mir

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
namespace mie = mir::input::evdev;
23
23
 
24
 
mie::LibInputDevicePtr mie::make_libinput_device(libinput* lib, char const* path)
25
 
{
26
 
    auto ret = mie::LibInputDevicePtr(::libinput_path_add_device(lib, path), libinput_device_unref);
 
24
void mie::LibInputDeviceDeleter::operator()(::libinput_device* device) const
 
25
{
 
26
    libinput_device_unref(device);
 
27
}
 
28
 
 
29
mie::LibInputDevicePtr mie::make_libinput_device(std::shared_ptr<libinput> const& lib, char const* path)
 
30
{
 
31
    auto ret = mie::LibInputDevicePtr(::libinput_path_add_device(lib.get(), path), lib);
27
32
    if (ret)
28
33
        libinput_device_ref(ret.get());
29
34
    return ret;