aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c37
1 files changed, 26 insertions, 11 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 3e7510205af..09472e5a5e6 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -3531,9 +3531,11 @@ readable_events (flags)
3531 READABLE_EVENTS_FILTER_EVENTS is set, report it as empty. */ 3531 READABLE_EVENTS_FILTER_EVENTS is set, report it as empty. */
3532 if (kbd_fetch_ptr != kbd_store_ptr) 3532 if (kbd_fetch_ptr != kbd_store_ptr)
3533 { 3533 {
3534 int have_live_event = 1; 3534 if (flags & (READABLE_EVENTS_FILTER_EVENTS
3535 3535#ifdef USE_TOOLKIT_SCROLL_BARS
3536 if (flags & READABLE_EVENTS_FILTER_EVENTS) 3536 | READABLE_EVENTS_IGNORE_SQUEEZABLES
3537#endif
3538 ))
3537 { 3539 {
3538 struct input_event *event; 3540 struct input_event *event;
3539 3541
@@ -3541,16 +3543,29 @@ readable_events (flags)
3541 ? kbd_fetch_ptr 3543 ? kbd_fetch_ptr
3542 : kbd_buffer); 3544 : kbd_buffer);
3543 3545
3544 while (have_live_event && event->kind == FOCUS_IN_EVENT) 3546 do
3545 { 3547 {
3546 event++; 3548 if (!(
3549#ifdef USE_TOOLKIT_SCROLL_BARS
3550 (flags & READABLE_EVENTS_FILTER_EVENTS) &&
3551#endif
3552 event->kind == FOCUS_IN_EVENT)
3553#ifdef USE_TOOLKIT_SCROLL_BARS
3554 && !((flags & READABLE_EVENTS_IGNORE_SQUEEZABLES)
3555 && event->kind == SCROLL_BAR_CLICK_EVENT
3556 && event->part == scroll_bar_handle
3557 && event->modifiers == 0)
3558#endif
3559 )
3560 return 1;
3561 event++;
3547 if (event == kbd_buffer + KBD_BUFFER_SIZE) 3562 if (event == kbd_buffer + KBD_BUFFER_SIZE)
3548 event = kbd_buffer; 3563 event = kbd_buffer;
3549 if (event == kbd_store_ptr) 3564 }
3550 have_live_event = 0; 3565 while (event != kbd_store_ptr);
3551 }
3552 } 3566 }
3553 if (have_live_event) return 1; 3567 else
3568 return 1;
3554 } 3569 }
3555 3570
3556#ifdef HAVE_MOUSE 3571#ifdef HAVE_MOUSE
@@ -6545,7 +6560,7 @@ lucid_event_type_list_p (object)
6545 If READABLE_EVENTS_FILTER_EVENTS is set in FLAGS, ignore internal 6560 If READABLE_EVENTS_FILTER_EVENTS is set in FLAGS, ignore internal
6546 events (FOCUS_IN_EVENT). 6561 events (FOCUS_IN_EVENT).
6547 If READABLE_EVENTS_IGNORE_SQUEEZABLES is set in FLAGS, ignore mouse 6562 If READABLE_EVENTS_IGNORE_SQUEEZABLES is set in FLAGS, ignore mouse
6548 movements. */ 6563 movements and toolkit scroll bar thumb drags. */
6549 6564
6550static void 6565static void
6551get_input_pending (addr, flags) 6566get_input_pending (addr, flags)