On Mon, Aug 17, 2015 at 11:37 AM, Marek Chalupa <[email protected]> wrote: > +static void > +keyboard_handle_repeat_info (void *data, struct wl_keyboard *keyboard, > + int32_t rate, int32_t delay) > +{ > + struct xwl_seat *xwl_seat = data; > + DeviceIntPtr dev; > + XkbControlsPtr ctrl; > + > + if (rate < 0 || delay < 0) { > + ErrorF("Wrong rate/delay: %d, %d\n", rate, delay); > + return; > + } > + > + for (dev = inputInfo.devices; dev; dev = dev->next) { > + if (dev != xwl_seat->keyboard && > + dev != GetMaster(xwl_seat->keyboard, MASTER_KEYBOARD)) > + continue; > + > + if (rate != 0) { > + ctrl = dev->key->xkbInfo->desc->ctrls; > + ctrl->repeat_delay = delay; > + /* rate is number of keys per second */ > + ctrl->repeat_interval = 1000 / rate; > + }
Since we're not changing the per_key_repeat array we don't need to call XkbDDXChangeControls() here but I'm not 100% sure. > + > + XkbSetRepeatKeys(dev, -1, rate != 0); Should probably use the AutoRepeatModeOff/On definitions here instead of rate != 0. Rui _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
