Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 62223ec in mainline for uspace/lib/ui/src/window.c


Ignore:
Timestamp:
2021-04-09T22:41:22Z (8 months ago)
Author:
jxsvoboda <5887334+jxsvoboda@…>
Branches:
master
Children:
f251883
Parents:
0262f16c
git-author:
Jiri Svoboda <jiri@…> (2021-04-01 21:04:11)
git-committer:
jxsvoboda <5887334+jxsvoboda@…> (2021-04-09 22:41:22)
Message:

Close menu when window is unfocused

This of course means we need to do all the plumbing for delivering
unfocus event to UI controls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/src/window.c

    r0262f16c r62223ec  
    815815        if (window->cb != NULL && window->cb->unfocus != NULL)
    816816                window->cb->unfocus(window, window->arg);
     817        else
     818                return ui_window_def_unfocus(window);
    817819}
    818820
     
    850852 *
    851853 * @param window Window
    852  * @return EOK on success or an error code
    853854 */
    854855void ui_window_def_pos(ui_window_t *window, pos_event_t *pos)
     
    856857        if (window->control != NULL)
    857858                ui_control_pos_event(window->control, pos);
     859}
     860
     861/** Default window unfocus routine.
     862 *
     863 * @param window Window
     864 * @return EOK on success or an error code
     865 */
     866void ui_window_def_unfocus(ui_window_t *window)
     867{
     868        if (window->control != NULL)
     869                ui_control_unfocus(window->control);
    858870}
    859871
Note: See TracChangeset for help on using the changeset viewer.