public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* input: evdev.c EVIOCGRAB semantics question
@ 2006-08-12 15:24 Magnus Vigerlöf
  2006-08-12 16:52 ` Zephaniah E. Hull
  0 siblings, 1 reply; 16+ messages in thread
From: Magnus Vigerlöf @ 2006-08-12 15:24 UTC (permalink / raw)
  To: linux-input; +Cc: linux-kernel

Hi,

What is the purpose of the EVIOCGRAB ioctl in evdev.c? Is it to prevent the 
device driver from sending events to other event handlers? Is it to prevent 
other applications from receiving events that has the device handler open? 
First, last, or both?

I discovered the following behavior when I fired up a second X-server on my 
machine with my Wacom tablet connected: The second X-server opened the tablet 
as well and everything worked as it should. However when I switched back to 
the first X-server the tablet didn't work at all. Only when I stopped the 
second X-server did the tablet start working in the first X-server again. If 
I changed the code in evdev to ignore the EVIOCGRAB-ioctl the tablet works in 
both X-servers, but that caused other problems.

Now, having two X-servers might not be the most common thing to have, but 
having other applications that depends on the movement from the tablet might 
be more common.

As is it now, it's useless (more or less) to run wacdump to display the tablet 
specific events in a understandable manner. An application that generates 
events through uinput based on tablet events and some other qualifiers 
(mouseemu, simulating mouse scroll wheel) will not work either.

And yes, the X-server must grab the tablet. Otherwise events will go 
through /dev/input/mice as well and mess up applications that depend on the 
tablet-specific absolute events.

Thanks
 Magnus

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2006-08-15 23:20 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-12 15:24 input: evdev.c EVIOCGRAB semantics question Magnus Vigerlöf
2006-08-12 16:52 ` Zephaniah E. Hull
2006-08-12 21:06   ` Magnus Vigerlöf
2006-08-13  0:00   ` Dmitry Torokhov
2006-08-13  3:28     ` Zephaniah E. Hull
2006-08-14 14:20       ` Dmitry Torokhov
2006-08-14 14:28         ` Zephaniah E. Hull
2006-08-14 15:00           ` Dmitry Torokhov
2006-08-14 16:04             ` Ian Stirling
2006-08-14 16:09             ` Zephaniah E. Hull
2006-08-14 16:22               ` Dmitry Torokhov
2006-08-14 14:58         ` Mattia Dongili
2006-08-14 15:15           ` Dmitry Torokhov
2006-08-14 22:49             ` Magnus Vigerlöf
2006-08-15 11:51               ` Magnus Vigerlöf
2006-08-15 23:20               ` Magnus Vigerlöf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox