dix: Remove LegalModifier()
This hasn't done anything besides return TRUE in a long long time. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
a23eba2a91
commit
03b2125005
|
@ -124,10 +124,10 @@ ApplyPointerMapping(DeviceIntPtr dev, CARD8 *map, int len, ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if a modifier map change is okay with the device.
|
/* Check if a modifier map change is okay with the device. Negative return
|
||||||
* Returns -1 for BadValue, as it collides with MappingBusy; this particular
|
* values mean BadValue, positive values mean Mapping{Busy,Failed}, 0 is
|
||||||
* caveat can be removed with LegalModifier, as we have no other reason to
|
* Success / MappingSuccess.
|
||||||
* set MappingFailed. Sigh. */
|
*/
|
||||||
static int
|
static int
|
||||||
check_modmap_change(ClientPtr client, DeviceIntPtr dev, KeyCode *modmap)
|
check_modmap_change(ClientPtr client, DeviceIntPtr dev, KeyCode *modmap)
|
||||||
{
|
{
|
||||||
|
@ -153,12 +153,6 @@ check_modmap_change(ClientPtr client, DeviceIntPtr dev, KeyCode *modmap)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure the mapping is okay with the DDX. */
|
|
||||||
if (!LegalModifier(i, dev)) {
|
|
||||||
client->errorValue = i;
|
|
||||||
return MappingFailed;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* None of the new modifiers may be down while we change the
|
/* None of the new modifiers may be down while we change the
|
||||||
* map. */
|
* map. */
|
||||||
if (key_is_down(dev, i, KEY_POSTED | KEY_PROCESSED)) {
|
if (key_is_down(dev, i, KEY_POSTED | KEY_PROCESSED)) {
|
||||||
|
|
|
@ -1782,18 +1782,6 @@ maintains the client's changes to it.
|
||||||
The X protocol defines standard names to indicate the symbol(s)
|
The X protocol defines standard names to indicate the symbol(s)
|
||||||
printed on each keycap. (See X11/keysym.h)
|
printed on each keycap. (See X11/keysym.h)
|
||||||
</para>
|
</para>
|
||||||
<para>
|
|
||||||
Legal modifier keys must generate both up and down transitions. When
|
|
||||||
a client tries to change a modifier key (for instance, to make "A" the
|
|
||||||
"Control" key), DIX calls the following routine, which should return
|
|
||||||
TRUE if the key can be used as a modifier on the given device:
|
|
||||||
<blockquote><programlisting>
|
|
||||||
|
|
||||||
Bool LegalModifier(key, pDev)
|
|
||||||
unsigned int key;
|
|
||||||
DevicePtr pDev;
|
|
||||||
</programlisting></blockquote>
|
|
||||||
</para>
|
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
|
@ -4998,7 +4986,6 @@ mi and fb implementations.</para>
|
||||||
<row><entry><function>InstallColormap</function></entry><entry><literal>ddx</literal></entry><entry><para>Screen</para></entry></row>
|
<row><entry><function>InstallColormap</function></entry><entry><literal>ddx</literal></entry><entry><para>Screen</para></entry></row>
|
||||||
<row><entry><function>Intersect</function></entry><entry><literal>mi</literal></entry><entry><para>Screen</para></entry></row>
|
<row><entry><function>Intersect</function></entry><entry><literal>mi</literal></entry><entry><para>Screen</para></entry></row>
|
||||||
<row><entry><function>Inverse</function></entry><entry><literal>mi</literal></entry><entry><para>Screen</para></entry></row>
|
<row><entry><function>Inverse</function></entry><entry><literal>mi</literal></entry><entry><para>Screen</para></entry></row>
|
||||||
<row><entry><function>LegalModifier</function></entry><entry><literal>hd</literal></entry><entry><para></para></entry></row>
|
|
||||||
<row><entry><function>LineHelper</function></entry><entry><literal>mi</literal></entry><entry><para>GC op</para></entry></row>
|
<row><entry><function>LineHelper</function></entry><entry><literal>mi</literal></entry><entry><para>GC op</para></entry></row>
|
||||||
<row><entry><function>ListInstalledColormaps</function></entry><entry><literal>ddx</literal></entry><entry><para>Screen</para></entry></row>
|
<row><entry><function>ListInstalledColormaps</function></entry><entry><literal>ddx</literal></entry><entry><para>Screen</para></entry></row>
|
||||||
<row><entry><function>LookupKeyboardDevice</function></entry><entry><literal>dix</literal></entry><entry><para></para></entry></row>
|
<row><entry><function>LookupKeyboardDevice</function></entry><entry><literal>dix</literal></entry><entry><para></para></entry></row>
|
||||||
|
|
|
@ -50,15 +50,6 @@
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "mi.h"
|
#include "mi.h"
|
||||||
|
|
||||||
/** Returns TRUE if the key is a valid modifier. For PC-class
|
|
||||||
* keyboards, all keys can be used as modifiers, so return TRUE
|
|
||||||
* always. */
|
|
||||||
Bool
|
|
||||||
LegalModifier(unsigned int key, DeviceIntPtr pDev)
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Called from dix/main.c on each server generation to initialize
|
/** Called from dix/main.c on each server generation to initialize
|
||||||
* inputs. All the work is done in dmxInputInit. \see
|
* inputs. All the work is done in dmxInputInit. \see
|
||||||
* dmxInputInit() */
|
* dmxInputInit() */
|
||||||
|
|
|
@ -1077,16 +1077,6 @@ for the device when it was registered/initialized.
|
||||||
|
|
||||||
</sect3>
|
</sect3>
|
||||||
|
|
||||||
<sect3>
|
|
||||||
<title>LegalModifier()</title>
|
|
||||||
<!-- dmx/dmxinput.c - currently returns TRUE -->
|
|
||||||
<para>LegalModifier() is a required DDX function that can be used to
|
|
||||||
restrict which keys may be modifier keys. This seems to be present for
|
|
||||||
historical reasons, so this function should simply return TRUE
|
|
||||||
unconditionally.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
</sect3>
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
|
|
|
@ -354,12 +354,6 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff)
|
||||||
return BadImplementation;
|
return BadImplementation;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
|
||||||
LegalModifier(unsigned int key, DeviceIntPtr pDev)
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
KdRingBell(KdKeyboardInfo * ki, int volume, int pitch, int duration)
|
KdRingBell(KdKeyboardInfo * ki, int volume, int pitch, int duration)
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,12 +43,6 @@ from The Open Group.
|
||||||
#include "exevents.h"
|
#include "exevents.h"
|
||||||
#include "extinit.h"
|
#include "extinit.h"
|
||||||
|
|
||||||
Bool
|
|
||||||
LegalModifier(unsigned int key, DeviceIntPtr pDev)
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ProcessInputEvents(void)
|
ProcessInputEvents(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -105,12 +105,6 @@ typedef struct x_IHRec {
|
||||||
|
|
||||||
static IHPtr InputHandlers = NULL;
|
static IHPtr InputHandlers = NULL;
|
||||||
|
|
||||||
Bool
|
|
||||||
LegalModifier(unsigned int key, DeviceIntPtr pDev)
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TimeSinceLastInputEvent --
|
* TimeSinceLastInputEvent --
|
||||||
* Function used for screensaver purposes by the os module. Returns the
|
* Function used for screensaver purposes by the os module. Returns the
|
||||||
|
|
|
@ -217,12 +217,6 @@ xnestKeyboardProc(DeviceIntPtr pDev, int onoff)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
|
||||||
LegalModifier(unsigned int key, DeviceIntPtr pDev)
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
xnestUpdateModifierState(unsigned int state)
|
xnestUpdateModifierState(unsigned int state)
|
||||||
{
|
{
|
||||||
|
|
|
@ -726,17 +726,6 @@ DarwinModifierStringToNXMask(const char *str, int separatelr)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* LegalModifier
|
|
||||||
* This allows the ddx layer to prevent some keys from being remapped
|
|
||||||
* as modifier keys.
|
|
||||||
*/
|
|
||||||
Bool
|
|
||||||
LegalModifier(unsigned int key, DeviceIntPtr pDev)
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if !defined(__LP64__) || MAC_OS_X_VERSION_MIN_REQUIRED < 1050
|
#if !defined(__LP64__) || MAC_OS_X_VERSION_MIN_REQUIRED < 1050
|
||||||
static inline UniChar
|
static inline UniChar
|
||||||
macroman2ucs(unsigned char c)
|
macroman2ucs(unsigned char c)
|
||||||
|
|
|
@ -2490,12 +2490,6 @@ static const struct wl_registry_listener input_listener = {
|
||||||
global_remove,
|
global_remove,
|
||||||
};
|
};
|
||||||
|
|
||||||
Bool
|
|
||||||
LegalModifier(unsigned int key, DeviceIntPtr pDev)
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ProcessInputEvents(void)
|
ProcessInputEvents(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,21 +46,6 @@ int winProcEstablishConnection(ClientPtr /* client */ );
|
||||||
DeviceIntPtr g_pwinPointer;
|
DeviceIntPtr g_pwinPointer;
|
||||||
DeviceIntPtr g_pwinKeyboard;
|
DeviceIntPtr g_pwinKeyboard;
|
||||||
|
|
||||||
/* Called from dix/devices.c */
|
|
||||||
/*
|
|
||||||
* All of our keys generate up and down transition notifications,
|
|
||||||
* so all of our keys can be used as modifiers.
|
|
||||||
*
|
|
||||||
* An example of a modifier is mapping the A key to the Control key.
|
|
||||||
* A has to be a legal modifier. I think.
|
|
||||||
*/
|
|
||||||
|
|
||||||
Bool
|
|
||||||
LegalModifier(unsigned int uiKey, DeviceIntPtr pDevice)
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Called from dix/dispatch.c */
|
/* Called from dix/dispatch.c */
|
||||||
/*
|
/*
|
||||||
* Run through the Windows message queue(s) one more time.
|
* Run through the Windows message queue(s) one more time.
|
||||||
|
|
|
@ -415,9 +415,6 @@ extern void ProcessPointerEvent(InternalEvent * /* ev */ ,
|
||||||
extern void ProcessKeyboardEvent(InternalEvent * /*ev */ ,
|
extern void ProcessKeyboardEvent(InternalEvent * /*ev */ ,
|
||||||
DeviceIntPtr /*keybd */ );
|
DeviceIntPtr /*keybd */ );
|
||||||
|
|
||||||
extern Bool LegalModifier(unsigned int /*key */ ,
|
|
||||||
DeviceIntPtr /*pDev */ );
|
|
||||||
|
|
||||||
extern _X_EXPORT void ProcessInputEvents(void);
|
extern _X_EXPORT void ProcessInputEvents(void);
|
||||||
|
|
||||||
extern _X_EXPORT void InitInput(int /*argc */ ,
|
extern _X_EXPORT void InitInput(int /*argc */ ,
|
||||||
|
|
Loading…
Reference in New Issue