Skip to content

Commit bde7f54

Browse files
committed
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 <[email protected]>
1 parent f161a01 commit bde7f54

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

xkb/ddxBeep.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
5757
#define HIGH_PITCH 2000
5858
#define CLICK_PITCH 1500
5959

60-
static x_server_generation_t atomGeneration = 0;
6160
static Atom featureOn;
6261
static Atom featureOff;
6362
static Atom featureChange;
@@ -127,10 +126,8 @@ _XkbDDXBeepExpire(OsTimerPtr timer, CARD32 now, void *arg)
127126
if ((dev == NULL) || (dev->key == NULL) || (dev->key->xkbInfo == NULL) ||
128127
(dev->kbdfeed == NULL))
129128
return 0;
130-
if (atomGeneration != serverGeneration) {
131-
_XkbDDXBeepInitAtoms();
132-
atomGeneration = serverGeneration;
133-
}
129+
130+
_XkbDDXBeepInitAtoms();
134131

135132
feed = dev->kbdfeed;
136133
ctrl = &feed->ctrl;

0 commit comments

Comments
 (0)