diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/keys.c | 1 | ||||
-rw-r--r-- | src/ui/util.c | 4 | ||||
-rw-r--r-- | src/ui/widget.c | 16 |
3 files changed, 19 insertions, 2 deletions
diff --git a/src/ui/keys.c b/src/ui/keys.c index 456ca928..ecf65995 100644 --- a/src/ui/keys.c +++ b/src/ui/keys.c | |||
@@ -426,6 +426,7 @@ iBool processEvent_Keys(const SDL_Event *ev) { | |||
426 | iKeys *d = &keys_; | 426 | iKeys *d = &keys_; |
427 | if (ev->type == SDL_KEYDOWN || ev->type == SDL_KEYUP) { | 427 | if (ev->type == SDL_KEYDOWN || ev->type == SDL_KEYUP) { |
428 | const iBinding *bind = find_Keys_(d, ev->key.keysym.sym, keyMods_Sym(ev->key.keysym.mod)); | 428 | const iBinding *bind = find_Keys_(d, ev->key.keysym.sym, keyMods_Sym(ev->key.keysym.mod)); |
429 | printf("[Keys] bind: %p\n", bind); fflush(stdout); | ||
429 | if (bind) { | 430 | if (bind) { |
430 | if (ev->type == SDL_KEYUP) { | 431 | if (ev->type == SDL_KEYUP) { |
431 | if (bind->flags & argRelease_BindFlag) { | 432 | if (bind->flags & argRelease_BindFlag) { |
diff --git a/src/ui/util.c b/src/ui/util.c index 2996bfd5..64b32bad 100644 --- a/src/ui/util.c +++ b/src/ui/util.c | |||
@@ -618,7 +618,7 @@ void openMenuFlags_Widget(iWidget *d, iInt2 coord, iBool postCommands) { | |||
618 | } | 618 | } |
619 | /* Menu closes when commands are emitted, so handle any pending ones beforehand. */ | 619 | /* Menu closes when commands are emitted, so handle any pending ones beforehand. */ |
620 | processEvents_App(postedEventsOnly_AppEventMode); | 620 | processEvents_App(postedEventsOnly_AppEventMode); |
621 | setFlags_Widget(d, hidden_WidgetFlag | disabled_WidgetFlag, iFalse); | 621 | setFlags_Widget(d, hidden_WidgetFlag, iFalse); |
622 | setFlags_Widget(d, commandOnMouseMiss_WidgetFlag, iTrue); | 622 | setFlags_Widget(d, commandOnMouseMiss_WidgetFlag, iTrue); |
623 | raise_Widget(d); | 623 | raise_Widget(d); |
624 | setFlags_Widget(findChild_Widget(d, "menu.cancel"), disabled_WidgetFlag, iFalse); | 624 | setFlags_Widget(findChild_Widget(d, "menu.cancel"), disabled_WidgetFlag, iFalse); |
@@ -700,7 +700,7 @@ void openMenuFlags_Widget(iWidget *d, iInt2 coord, iBool postCommands) { | |||
700 | } | 700 | } |
701 | 701 | ||
702 | void closeMenu_Widget(iWidget *d) { | 702 | void closeMenu_Widget(iWidget *d) { |
703 | setFlags_Widget(d, hidden_WidgetFlag | disabled_WidgetFlag, iTrue); | 703 | setFlags_Widget(d, hidden_WidgetFlag, iTrue); |
704 | setFlags_Widget(findChild_Widget(d, "menu.cancel"), disabled_WidgetFlag, iTrue); | 704 | setFlags_Widget(findChild_Widget(d, "menu.cancel"), disabled_WidgetFlag, iTrue); |
705 | postRefresh_App(); | 705 | postRefresh_App(); |
706 | postCommand_Widget(d, "menu.closed"); | 706 | postCommand_Widget(d, "menu.closed"); |
diff --git a/src/ui/widget.c b/src/ui/widget.c index 23891999..e19a9482 100644 --- a/src/ui/widget.c +++ b/src/ui/widget.c | |||
@@ -662,6 +662,14 @@ iBool dispatchEvent_Widget(iWidget *d, const SDL_Event *ev) { | |||
662 | iWidget *widget = *i.value; | 662 | iWidget *widget = *i.value; |
663 | if (isVisible_Widget(widget) && dispatchEvent_Widget(widget, ev)) { | 663 | if (isVisible_Widget(widget) && dispatchEvent_Widget(widget, ev)) { |
664 | #if 0 | 664 | #if 0 |
665 | if (ev->type == SDL_KEYDOWN) { | ||
666 | printf("[%p] %s:'%s' (on top) ate the key\n", | ||
667 | widget, class_Widget(widget)->name, | ||
668 | cstr_String(id_Widget(widget))); | ||
669 | fflush(stdout); | ||
670 | } | ||
671 | #endif | ||
672 | #if 0 | ||
665 | if (ev->type == SDL_MOUSEMOTION) { | 673 | if (ev->type == SDL_MOUSEMOTION) { |
666 | printf("[%p] %s:'%s' (on top) ate the motion\n", | 674 | printf("[%p] %s:'%s' (on top) ate the motion\n", |
667 | widget, class_Widget(widget)->name, | 675 | widget, class_Widget(widget)->name, |
@@ -701,6 +709,14 @@ iBool dispatchEvent_Widget(iWidget *d, const SDL_Event *ev) { | |||
701 | } | 709 | } |
702 | if (dispatchEvent_Widget(child, ev)) { | 710 | if (dispatchEvent_Widget(child, ev)) { |
703 | #if 0 | 711 | #if 0 |
712 | if (ev->type == SDL_KEYDOWN) { | ||
713 | printf("[%p] %s:'%s' ate the key\n", | ||
714 | child, class_Widget(child)->name, | ||
715 | cstr_String(id_Widget(child))); | ||
716 | fflush(stdout); | ||
717 | } | ||
718 | #endif | ||
719 | #if 0 | ||
704 | if (ev->type == SDL_MOUSEMOTION) { | 720 | if (ev->type == SDL_MOUSEMOTION) { |
705 | printf("[%p] %s:'%s' (on top) ate the motion\n", | 721 | printf("[%p] %s:'%s' (on top) ate the motion\n", |
706 | child, class_Widget(child)->name, | 722 | child, class_Widget(child)->name, |