summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ui/widget.c1
-rw-r--r--src/ui/window.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c
index 62112e86..00fe0f5f 100644
--- a/src/ui/widget.c
+++ b/src/ui/widget.c
@@ -879,6 +879,7 @@ iBool dispatchEvent_Widget(iWidget *d, const SDL_Event *ev) {
879 printf("[%p] %s:'%s' ate the key\n", 879 printf("[%p] %s:'%s' ate the key\n",
880 child, class_Widget(child)->name, 880 child, class_Widget(child)->name,
881 cstr_String(id_Widget(child))); 881 cstr_String(id_Widget(child)));
882 identify_Widget(child);
882 fflush(stdout); 883 fflush(stdout);
883 } 884 }
884#endif 885#endif
diff --git a/src/ui/window.c b/src/ui/window.c
index 39adba83..577caa4c 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -941,6 +941,10 @@ iBool dispatchEvent_Window(iWindow *d, const SDL_Event *ev) {
941 if (isCommand_SDLEvent(ev) && ev->user.data2 && ev->user.data2 != root) { 941 if (isCommand_SDLEvent(ev) && ev->user.data2 && ev->user.data2 != root) {
942 continue; /* Not meant for this root. */ 942 continue; /* Not meant for this root. */
943 } 943 }
944 else if ((ev->type == SDL_KEYDOWN || ev->type == SDL_KEYUP || ev->type == SDL_TEXTINPUT)
945 && d->keyRoot != root) {
946 continue; /* Key events go only to the root with keyboard focus. */
947 }
944 setCurrent_Root(root); 948 setCurrent_Root(root);
945 const iBool wasUsed = dispatchEvent_Widget(root->widget, ev); 949 const iBool wasUsed = dispatchEvent_Widget(root->widget, ev);
946 if (wasUsed) { 950 if (wasUsed) {