Changeset 10cb47e in mainline for uspace/lib/gui/connection.c


Ignore:
Timestamp:
2016-08-31T15:43:01Z (8 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bdfdc51c
Parents:
58563585
Message:

add support for custom client data into widgets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/gui/connection.c

    r58563585 r10cb47e  
    198198        list_foreach(sig_node->slots, link, slot_node_t, cur) {
    199199                void *data_copy = NULL;
    200                 if (data != NULL) {
     200                if (data != NULL)
    201201                        data_copy = malloc(data_size);
    202                 }
    203                 if (data_copy != NULL) {
     202               
     203                if (data_copy != NULL)
    204204                        memcpy(data_copy, data, data_size);
    205                 }
     205               
    206206                window_event_t *event =
    207                         (window_event_t *) malloc(sizeof(window_event_t));
    208 
     207                    (window_event_t *) malloc(sizeof(window_event_t));
     208               
    209209                if (event) {
    210210                        link_initialize(&event->link);
     
    215215                        prodcons_produce(&cur->widget->window->events, &event->link);
    216216                } else {
    217                         if (data_copy != NULL) {
     217                        if (data_copy != NULL)
    218218                                free(data_copy);
    219                         }
    220219                }
    221220        }
Note: See TracChangeset for help on using the changeset viewer.