ie.arg = make_string_from_utf8 (output->preedit_chars,
output->preedit_size);
- Fput_text_property (make_fixnum (0),
- make_fixnum (SCHARS (ie.arg)),
- Qcursor,
- make_fixnum (output->preedit_caret),
- ie.arg);
+ Fput_text_property (make_fixnum (max (0, output->preedit_caret)),
+ make_fixnum (max (SCHARS (ie.arg),
+ max (0, output->preedit_caret) + 1)),
+ Qcursor, Qt, ie.arg);
XSETINT (ie.x, 0);
XSETINT (ie.y, 0);
ie.arg = make_string_from_utf8 (output->preedit_chars,
output->preedit_size);
- Fput_text_property (make_fixnum (0),
- make_fixnum (SCHARS (ie.arg)),
- Qcursor,
- make_fixnum (output->preedit_caret),
- ie.arg);
+ Fput_text_property (make_fixnum (max (0, output->preedit_caret)),
+ make_fixnum (min (SCHARS (ie.arg),
+ max (0, output->preedit_caret) + 1)),
+ Qcursor, Qt, ie.arg);
XSETINT (ie.x, 0);
XSETINT (ie.y, 0);
}
case XI_KeyRelease:
x_display_set_last_user_time (dpyinfo, xev->time);
-#ifdef HAVE_X_I18N
- XKeyPressedEvent xkey;
-
- memset (&xkey, 0, sizeof xkey);
-
- xkey.type = KeyRelease;
- xkey.serial = xev->serial;
- xkey.send_event = xev->send_event;
- xkey.display = xev->display;
- xkey.window = xev->event;
- xkey.root = xev->root;
- xkey.subwindow = xev->child;
- xkey.time = xev->time;
- xkey.state = ((xev->mods.effective & ~(1 << 13 | 1 << 14))
- | (xev->group.effective << 13));
- xkey.keycode = xev->detail;
- xkey.same_screen = True;
-
- x_filter_event (dpyinfo, (XEvent *) &xkey);
-#endif
goto XI_OTHER;
+
case XI_PropertyEvent:
case XI_HierarchyChanged:
case XI_DeviceChanged: