mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
xkb: drop special generation magic on atom initialization
dixAddAtom() is safe to call multiple times with same name, always return the corresponding XID, no matter whether the atom just been newly created or already existed. Thus, there's no need for special server generation treatment here. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
f161a014f1
commit
bde7f54a40
@@ -57,7 +57,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||||||
#define HIGH_PITCH 2000
|
#define HIGH_PITCH 2000
|
||||||
#define CLICK_PITCH 1500
|
#define CLICK_PITCH 1500
|
||||||
|
|
||||||
static x_server_generation_t atomGeneration = 0;
|
|
||||||
static Atom featureOn;
|
static Atom featureOn;
|
||||||
static Atom featureOff;
|
static Atom featureOff;
|
||||||
static Atom featureChange;
|
static Atom featureChange;
|
||||||
@@ -127,10 +126,8 @@ _XkbDDXBeepExpire(OsTimerPtr timer, CARD32 now, void *arg)
|
|||||||
if ((dev == NULL) || (dev->key == NULL) || (dev->key->xkbInfo == NULL) ||
|
if ((dev == NULL) || (dev->key == NULL) || (dev->key->xkbInfo == NULL) ||
|
||||||
(dev->kbdfeed == NULL))
|
(dev->kbdfeed == NULL))
|
||||||
return 0;
|
return 0;
|
||||||
if (atomGeneration != serverGeneration) {
|
|
||||||
_XkbDDXBeepInitAtoms();
|
_XkbDDXBeepInitAtoms();
|
||||||
atomGeneration = serverGeneration;
|
|
||||||
}
|
|
||||||
|
|
||||||
feed = dev->kbdfeed;
|
feed = dev->kbdfeed;
|
||||||
ctrl = &feed->ctrl;
|
ctrl = &feed->ctrl;
|
||||||
|
|||||||
Reference in New Issue
Block a user