Changeset 5d380b6 in mainline for uspace/srv
- Timestamp:
- 2023-01-20T11:50:41Z (3 years ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b1f0a14
- Parents:
- 6828a56
- git-author:
- Jiri Svoboda <jiri@…> (2023-01-20 19:50:21)
- git-committer:
- Jiri Svoboda <jiri@…> (2023-01-20 11:50:41)
- Location:
- uspace/srv/hid/display
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/display.c
r6828a56 r5d380b6 597 597 } 598 598 599 /** Get default seat in display. 600 * 601 * @param disp Display 602 * @return First seat or @c NULL if there is none 603 */ 604 ds_seat_t *ds_display_default_seat(ds_display_t *disp) 605 { 606 /* XXX Probably not the best solution */ 607 return ds_display_first_seat(disp); 608 } 609 599 610 /** Find seat by ID. 600 611 * … … 640 651 641 652 /* If none was found, return the default seat */ 642 return ds_display_ first_seat(disp);653 return ds_display_default_seat(disp); 643 654 } 644 655 -
uspace/srv/hid/display/display.h
r6828a56 r5d380b6 85 85 extern ds_seat_t *ds_display_first_seat(ds_display_t *); 86 86 extern ds_seat_t *ds_display_next_seat(ds_seat_t *); 87 extern ds_seat_t *ds_display_default_seat(ds_display_t *); 87 88 extern ds_seat_t *ds_display_find_seat(ds_display_t *, ds_seat_id_t); 88 89 extern ds_seat_t *ds_display_seat_by_idev(ds_display_t *, ds_idev_id_t); -
uspace/srv/hid/display/window.c
r6828a56 r5d380b6 88 88 } 89 89 90 /* Caption */ 90 91 wnd->caption = str_dup(params->caption); 91 92 if (wnd->caption == NULL) { … … 99 100 gfx_bitmap_params_init(&bparams); 100 101 bparams.rect = params->rect; 102 103 /* Allocate window bitmap */ 101 104 102 105 dgc = ds_display_get_gc(wnd->display); … … 142 145 } 143 146 144 // TODO Multi-seat: which seat should own the new window? 145 seat = ds_display_first_seat(client->display); 146 147 /* Determine which seat should own the window */ 148 if (params->idev_id != 0) 149 seat = ds_display_seat_by_idev(wnd->display, params->idev_id); 150 else 151 seat = ds_display_default_seat(wnd->display); 152 153 /* Is this a popup window? */ 147 154 if ((params->flags & wndf_popup) != 0) 148 155 ds_seat_set_popup(seat, wnd); … … 150 157 ds_seat_set_focus(seat, wnd); 151 158 159 /* Is this window a panel? */ 152 160 if ((params->flags & wndf_avoid) != 0) 153 161 ds_display_update_max_rect(wnd->display);
Note:
See TracChangeset
for help on using the changeset viewer.