mirror of
https://github.com/swaywm/sway.git
synced 2025-11-08 13:29:50 -05:00
set userdata for handler to swayc_t container
This commit is contained in:
parent
e9e09d123c
commit
eefc76b39e
3 changed files with 8 additions and 5 deletions
|
|
@ -54,8 +54,10 @@ swayc_t *new_output(wlc_handle handle) {
|
|||
output->height = size->h;
|
||||
output->handle = handle;
|
||||
|
||||
add_child(&root_container, output);
|
||||
//link this to handler
|
||||
wlc_handle_set_user_data(handle, output);
|
||||
|
||||
add_child(&root_container, output);
|
||||
//TODO something with this
|
||||
int total_width = 0;
|
||||
container_map(&root_container, add_output_widths, &total_width);
|
||||
|
|
@ -138,6 +140,8 @@ swayc_t *new_view(swayc_t *sibling, wlc_handle handle) {
|
|||
view->name = strdup(title);
|
||||
view->visible = true;
|
||||
|
||||
//Link view to handle
|
||||
wlc_handle_set_user_data(handle, view);
|
||||
//Case of focused workspace, just create as child of it
|
||||
if (sibling->type == C_WORKSPACE) {
|
||||
add_child(sibling, view);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue