Skip to content

Commit

Permalink
fix default item name leak
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixKratz committed Feb 20, 2022
1 parent 657a2b0 commit d59ce51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/bar_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void bar_manager_init(struct bar_manager* bar_manager) {
bar_manager->background.color = rgba_color_from_hex(0x44000000);

bar_item_init(&bar_manager->default_item, NULL);
bar_manager->default_item.name = string_copy("defaults");
bar_item_set_name(&bar_manager->default_item, string_copy("defaults"));
custom_events_init(&bar_manager->custom_events);

int shell_refresh_frequency = 1;
Expand Down
6 changes: 4 additions & 2 deletions src/mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ static pascal OSStatus mouse_handler(EventHandlerCallRef next, EventRef e, void
}

void mouse_begin(void) {
EventTargetRef target = GetEventDispatcherTarget();
InstallEventHandler(target, NewEventHandlerUPP(mouse_handler), GetEventTypeCount(mouse_events), mouse_events, 0, 0);
InstallEventHandler(GetEventDispatcherTarget(),
NewEventHandlerUPP(mouse_handler),
GetEventTypeCount(mouse_events),
mouse_events, 0, 0);
}

0 comments on commit d59ce51

Please sign in to comment.