mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-08 16:08:31 +02:00
XKB: Actions: Don't run certain actions on the core keyboard
Don't run VT switches, terminations, or anything, on the core keyboard: only
run actions which affect the keyboard state. If we get an action such as VT
switch, just swallow the event.
(cherry picked from commit 320abd7d1d)
This commit is contained in:
parent
27da1367c9
commit
d37351308b
3 changed files with 23 additions and 4 deletions
|
|
@ -48,6 +48,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
int
|
||||
XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act)
|
||||
{
|
||||
xf86ProcessActionEvent(ACTION_TERMINATE, NULL);
|
||||
if (dev != inputInfo.keyboard)
|
||||
xf86ProcessActionEvent(ACTION_TERMINATE, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
int
|
||||
XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act)
|
||||
{
|
||||
GiveUp(1);
|
||||
if (dev != inputInfo.keyboard)
|
||||
GiveUp(1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -561,6 +561,9 @@ _XkbFilterPointerMove( XkbSrvInfoPtr xkbi,
|
|||
int x,y;
|
||||
Bool accel;
|
||||
|
||||
if (xkbi->device == inputInfo.keyboard)
|
||||
return 0;
|
||||
|
||||
if (filter->keycode==0) { /* initial press */
|
||||
filter->keycode = keycode;
|
||||
filter->active = 1;
|
||||
|
|
@ -601,6 +604,9 @@ _XkbFilterPointerBtn( XkbSrvInfoPtr xkbi,
|
|||
unsigned keycode,
|
||||
XkbAction * pAction)
|
||||
{
|
||||
if (xkbi->device == inputInfo.keyboard)
|
||||
return 0;
|
||||
|
||||
if (filter->keycode==0) { /* initial press */
|
||||
int button= pAction->btn.button;
|
||||
|
||||
|
|
@ -980,8 +986,11 @@ _XkbFilterSwitchScreen( XkbSrvInfoPtr xkbi,
|
|||
unsigned keycode,
|
||||
XkbAction * pAction)
|
||||
{
|
||||
DeviceIntPtr dev = xkbi->device;
|
||||
if (dev == inputInfo.keyboard)
|
||||
return 0;
|
||||
|
||||
if (filter->keycode==0) { /* initial press */
|
||||
DeviceIntPtr dev = xkbi->device;
|
||||
filter->keycode = keycode;
|
||||
filter->active = 1;
|
||||
filter->filterOthers = 0;
|
||||
|
|
@ -1003,8 +1012,11 @@ _XkbFilterXF86Private( XkbSrvInfoPtr xkbi,
|
|||
unsigned keycode,
|
||||
XkbAction * pAction)
|
||||
{
|
||||
DeviceIntPtr dev = xkbi->device;
|
||||
if (dev == inputInfo.keyboard)
|
||||
return 0;
|
||||
|
||||
if (filter->keycode==0) { /* initial press */
|
||||
DeviceIntPtr dev = xkbi->device;
|
||||
filter->keycode = keycode;
|
||||
filter->active = 1;
|
||||
filter->filterOthers = 0;
|
||||
|
|
@ -1029,6 +1041,9 @@ _XkbFilterDeviceBtn( XkbSrvInfoPtr xkbi,
|
|||
DeviceIntPtr dev;
|
||||
int button;
|
||||
|
||||
if (dev == inputInfo.keyboard)
|
||||
return 0;
|
||||
|
||||
if (filter->keycode==0) { /* initial press */
|
||||
dev= _XkbLookupButtonDevice(pAction->devbtn.device,NULL);
|
||||
if ((!dev)||(!dev->public.on)||(&dev->public==LookupPointerDevice()))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue