Summary: | Enable option "GrabDevice" by default for non-seat0 seats | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Laércio de Sousa <lbsousajr> | ||||||
Component: | Server/General | Assignee: | Peter Hutterer <peter.hutterer> | ||||||
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> | ||||||
Severity: | normal | ||||||||
Priority: | medium | CC: | peter.hutterer | ||||||
Version: | 7.7 (2012.06) | ||||||||
Hardware: | Other | ||||||||
OS: | All | ||||||||
Whiteboard: | |||||||||
i915 platform: | i915 features: | ||||||||
Attachments: |
|
Description
Laércio de Sousa
2013-09-17 16:43:04 UTC
Created attachment 86002 [details]
Enable option "GrabDevice" by default for non-seat0 seats
tbh, i'd rather have this handled in the server than in the driver which shouldn't need to care what seat it is on.The option GrabDevice is now available in the drivers that matter, so you can merge it in for non-seat-0 devices directly in config/udev.c:device_added. since this is changing the default: is there any setup other than seat-0 where not grabbing the device is preferable? (In reply to comment #2) > tbh, i'd rather have this handled in the server than in the driver which > shouldn't need to care what seat it is on.The option GrabDevice is now > available in the drivers that matter, so you can merge it in for non-seat0 > devices directly in config/udev.c:device_added. OK. Thanks for the advice! I've drafted the following construction to put somewhere in server: XF86ConfInputClassPtr nonSeat0; if (ServerIsNotSeat0()) { nonSeat0->identifier = "Force input devices to seat"; nonSeat0->option_lst = xf86AddNewOption(nonSeat0->option_lst, "GrabDevice", "true"); xf86configptr->conf_inputclass_lst = (XF86ConfInputClassPtr) xf86addListItem((glp) xf86configptr->conf_inputclass_lst, (glp) nonSeat0); } but now I'm not sure where's the best place to put it (xf86Config.c, xf86Xinput.c, etc.), so that it will be only executed once, and won't pollute xf86configptr->conf_inputclass_lst with multiple copies of the same InputClass on every NewInputDeviceRequest() call. Forget it! I've found a much simpler solution. Just add the following to config/udev.c:device_added, before NewInputDeviceRequest() call: if (ServerIsNotSeat0()) input_options = input_option_new(input_options, "GrabDevice", true); That's the one :) make it "on" instead of true because it's supposed to be a const char, but otherwise fine. Created attachment 86146 [details] [review] Enable option "GrabDevice" by default for non-seat0 seats (driver-independent) This patch replaces the former one for evdev. This one applies directly to xserver/config/udev.c, so it should work equally for any relevant input driver. Since it's not an evdev-related bug anymore, should we change the "Component" field in bug report header above? commit c73c36b537f996574628e69681833ea37dec2b6e Author: Laércio de Sousa <lbsousajr@gmail.com> Date: Wed Sep 18 13:42:17 2013 -0300 xserver: enable InputClass option "GrabDevice" by default for non-seat0 seats (#69478) Thank you very much, Peter! Now, could you (or anyone else) please review my other patch (see bug #69477)? That one fills the last remaing gap for systemd-multi-seat-x deprecation. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.