D10234: LibInput: Queue native libinput events instead of LibInput::Event

Martin Flöser noreply at phabricator.kde.org
Thu Feb 1 16:39:27 UTC 2018


graesslin added a comment.
Restricted Application edited projects, added Plasma; removed KWin.


  In https://phabricator.kde.org/D10234#199165, @fvogt wrote:
  
  > In https://phabricator.kde.org/D10234#199148, @graesslin wrote:
  >
  > > I had another idea: when the Event gets processed and the m_device is null, we just update it again from the event.
  > >
  > > Something like
  > >
  > >   if (!event->device()) {
  > >       event->updateDevice();
  > >   }
  > >
  > >
  > > with
  > >
  > >   void Device::updateDevice()
  > >   {
  > >       m_device = Device::getDevice(libinput_event_get_device(m_event);
  > >   }
  > >  
  > >  
  > >
  >
  >
  > I wouldn't do that manually, rather replace `m_device` references with a `device()` method and if `m_device` is nullptr, assign it lazily.
  
  
  That's even better.

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D10234

To: fvogt, #plasma, graesslin
Cc: kwin, plasma-devel, #kwin, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180201/bf74c242/attachment-0001.html>


More information about the Plasma-devel mailing list