Changeset 46a47c0 in mainline for uspace/lib/ui/src/fixed.c


Ignore:
Timestamp:
2023-01-16T20:34:01Z (15 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b0ae23f
Parents:
b3eeae5
Message:

Make sure window is only show as inactive when it loses last focus

This currently affects the title bar and also the cursor in Terminal.

File:
1 edited

Legend:

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

    rb3eeae5 r46a47c0  
    11/*
    2  * Copyright (c) 2021 Jiri Svoboda
     2 * Copyright (c) 2023 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    4848static ui_evclaim_t ui_fixed_ctl_kbd_event(void *, kbd_event_t *);
    4949static ui_evclaim_t ui_fixed_ctl_pos_event(void *, pos_event_t *);
    50 static void ui_fixed_ctl_unfocus(void *);
     50static void ui_fixed_ctl_unfocus(void *, unsigned);
    5151
    5252/** Push button control ops */
     
    262262 *
    263263 * @param fixed Fixed layout
    264  */
    265 void ui_fixed_unfocus(ui_fixed_t *fixed)
    266 {
    267         ui_fixed_elem_t *elem;
    268 
    269         elem = ui_fixed_first(fixed);
    270         while (elem != NULL) {
    271                 ui_control_unfocus(elem->control);
     264 * @param nfocus Number of remaining foci
     265 */
     266void ui_fixed_unfocus(ui_fixed_t *fixed, unsigned nfocus)
     267{
     268        ui_fixed_elem_t *elem;
     269
     270        elem = ui_fixed_first(fixed);
     271        while (elem != NULL) {
     272                ui_control_unfocus(elem->control, nfocus);
    272273
    273274                elem = ui_fixed_next(elem);
     
    327328 *
    328329 * @param arg Argument (ui_fixed_t *)
    329  */
    330 void ui_fixed_ctl_unfocus(void *arg)
    331 {
    332         ui_fixed_t *fixed = (ui_fixed_t *) arg;
    333 
    334         ui_fixed_unfocus(fixed);
     330 * @param nfocus Number of remaining foci
     331 */
     332void ui_fixed_ctl_unfocus(void *arg, unsigned nfocus)
     333{
     334        ui_fixed_t *fixed = (ui_fixed_t *) arg;
     335
     336        ui_fixed_unfocus(fixed, nfocus);
    335337}
    336338
Note: See TracChangeset for help on using the changeset viewer.