Changeset 6e91475 in mainline


Ignore:
Timestamp:
2022-11-19T17:46:27Z (23 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
68d68e9
Parents:
d19d15b
Message:

I can see an invisible button in the task bar

Who're you gonna call?

Location:
uspace
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/taskbar/types/wndlist.h

    rd19d15b r6e91475  
    3939#include <adt/list.h>
    4040#include <gfx/coord.h>
     41#include <stdbool.h>
    4142#include <ui/pbutton.h>
    4243#include <ui/fixed.h>
     
    5253        /** Window ID */
    5354        sysarg_t wnd_id;
     55        /** Entry is visible */
     56        bool visible;
    5457        /** Window button */
    5558        ui_pbutton_t *button;
  • uspace/app/taskbar/wndlist.c

    rd19d15b r6e91475  
    215215        list_append(&entry->lentries, &wndlist->entries);
    216216
    217         /* Set the button rectangle */
     217        entry->visible = false;
     218
     219        /* Set the button rectangle and add it to layout, if applicable */
    218220        wndlist_set_entry_rect(wndlist, entry);
    219221
     
    221223        ui_pbutton_set_cb(entry->button, &wndlist_button_cb, (void *)entry);
    222224
    223         rc = ui_fixed_add(wndlist->fixed, ui_pbutton_ctl(entry->button));
    224         if (rc != EOK)
    225                 goto error;
    226 
    227         if (paint) {
     225        if (paint && entry->visible) {
    228226                rc = ui_pbutton_paint(entry->button);
    229227                if (rc != EOK)
     
    339337        if (rect.p1.x > wndlist->rect.p1.x) {
    340338                /* Make entry invisible */
    341                 rect.p0.x = 0;
    342                 rect.p0.y = 0;
    343                 rect.p1.x = 0;
    344                 rect.p1.y = 0;
     339                if (entry->visible) {
     340                        ui_fixed_remove(wndlist->fixed,
     341                            ui_pbutton_ctl(entry->button));
     342                        entry->visible = false;
     343                }
     344        } else {
     345                /* Make entry visible */
     346                if (!entry->visible) {
     347                        ui_fixed_add(wndlist->fixed,
     348                            ui_pbutton_ctl(entry->button));
     349                        entry->visible = true;
     350                }
    345351        }
    346352
  • uspace/srv/hid/display/window.c

    rd19d15b r6e91475  
    469469        gfx_rect_t old_rect;
    470470
    471         log_msg(LOG_DEFAULT, LVL_DEBUG2
    472         , "ds_window_update_move (%d, %d)",
     471        log_msg(LOG_DEFAULT, LVL_DEBUG2, "ds_window_update_move (%d, %d)",
    473472            (int) pos->x, (int) pos->y);
    474473
Note: See TracChangeset for help on using the changeset viewer.