diff options
| author | Po Lu | 2021-12-30 09:24:30 +0800 |
|---|---|---|
| committer | Po Lu | 2021-12-30 09:24:30 +0800 |
| commit | 14f074f95e2b57ddcd4b449fbdc04169290d0647 (patch) | |
| tree | 9821a3daf4dff43d6d6fedaa2e719a46284ec382 /src | |
| parent | fb4f2aa0389d7d10dfcc1b6d8601c2d5e80730f0 (diff) | |
| download | emacs-14f074f95e2b57ddcd4b449fbdc04169290d0647.tar.gz emacs-14f074f95e2b57ddcd4b449fbdc04169290d0647.zip | |
Translate crossing event mode when sending them to xwidgets
* src/xwidget.c (xi_translate_notify_detail): Use XI constants
instead.
(xwidget_motion_or_crossing): Translate XI entry event mode.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xwidget.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/xwidget.c b/src/xwidget.c index 30e9c2895d4..5aeb2beae2d 100644 --- a/src/xwidget.c +++ b/src/xwidget.c | |||
| @@ -1235,15 +1235,15 @@ xi_translate_notify_detail (int detail) | |||
| 1235 | { | 1235 | { |
| 1236 | switch (detail) | 1236 | switch (detail) |
| 1237 | { | 1237 | { |
| 1238 | case NotifyInferior: | 1238 | case XINotifyInferior: |
| 1239 | return GDK_NOTIFY_INFERIOR; | 1239 | return GDK_NOTIFY_INFERIOR; |
| 1240 | case NotifyAncestor: | 1240 | case XINotifyAncestor: |
| 1241 | return GDK_NOTIFY_ANCESTOR; | 1241 | return GDK_NOTIFY_ANCESTOR; |
| 1242 | case NotifyVirtual: | 1242 | case XINotifyVirtual: |
| 1243 | return GDK_NOTIFY_VIRTUAL; | 1243 | return GDK_NOTIFY_VIRTUAL; |
| 1244 | case NotifyNonlinear: | 1244 | case XINotifyNonlinear: |
| 1245 | return GDK_NOTIFY_NONLINEAR; | 1245 | return GDK_NOTIFY_NONLINEAR; |
| 1246 | case NotifyNonlinearVirtual: | 1246 | case XINotifyNonlinearVirtual: |
| 1247 | return GDK_NOTIFY_NONLINEAR_VIRTUAL; | 1247 | return GDK_NOTIFY_NONLINEAR_VIRTUAL; |
| 1248 | default: | 1248 | default: |
| 1249 | emacs_abort (); | 1249 | emacs_abort (); |
| @@ -1328,6 +1328,7 @@ xwidget_motion_or_crossing (struct xwidget_view *view, const XEvent *event) | |||
| 1328 | xg_event->crossing.y_root = (gdouble) xev->root_y; | 1328 | xg_event->crossing.y_root = (gdouble) xev->root_y; |
| 1329 | xg_event->crossing.time = xev->time; | 1329 | xg_event->crossing.time = xev->time; |
| 1330 | xg_event->crossing.focus = xev->focus; | 1330 | xg_event->crossing.focus = xev->focus; |
| 1331 | xg_event->crossing.mode = xev->mode; | ||
| 1331 | xg_event->crossing.detail = xi_translate_notify_detail (xev->detail); | 1332 | xg_event->crossing.detail = xi_translate_notify_detail (xev->detail); |
| 1332 | xg_event->crossing.state = xev->mods.effective; | 1333 | xg_event->crossing.state = xev->mods.effective; |
| 1333 | 1334 | ||