Changeset 1c6c3e1d in mainline for uspace/srv/hid/display/seat.c
- Timestamp:
- 2023-10-22T17:55:33Z (15 months ago)
- Branches:
- ticket/834-toolchain-update
- Children:
- 350ec74
- Parents:
- 315d487 (diff), 133461c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/seat.c
r315d487 r1c6c3e1d 88 88 seat->client_cursor = display->cursor[dcurs_arrow]; 89 89 seat->wm_cursor = NULL; 90 seat->focus = ds_display_first_window(display); 90 91 91 92 *rseat = seat; … … 204 205 205 206 /* Find alternate window that is neither system nor minimized */ 206 nwnd = ds_window_find_ alt(wnd, ~(wndf_minimized | wndf_system));207 nwnd = ds_window_find_prev(wnd, ~(wndf_minimized | wndf_system)); 207 208 208 209 if (nwnd == NULL) { 209 210 /* Find alternate window that is not minimized */ 210 nwnd = ds_window_find_ alt(wnd, ~wndf_minimized);211 nwnd = ds_window_find_prev(wnd, ~wndf_minimized); 211 212 } 212 213 … … 223 224 ds_window_t *nwnd; 224 225 225 /* Find alternate window that is not a system window */ 226 nwnd = ds_window_find_alt(seat->focus, ~wndf_system); 226 if (seat->focus != NULL) { 227 /* Find alternate window that is not a system window */ 228 nwnd = ds_window_find_next(seat->focus, ~wndf_system); 229 } else { 230 /* Currently no focus. Focus topmost window. */ 231 nwnd = ds_display_first_window(seat->display); 232 } 227 233 228 234 /* Only switch focus if there is another window */ … … 509 515 wnd = ds_display_window_by_pos(seat->display, &seat->pntpos); 510 516 511 /* Click outside popup window */512 if (event->type == POS_PRESS && wnd != seat->popup) {513 /* Close popup window */514 ds_seat_set_popup(seat, NULL);515 }516 517 517 /* Deliver event to popup window. */ 518 if (seat->popup != NULL ) {518 if (seat->popup != NULL && event->type != POS_PRESS) { 519 519 rc = ds_window_post_pos_event(seat->popup, event); 520 520 if (rc != EOK) … … 540 540 * to the same window above. 541 541 */ 542 if (wnd != seat->popup ) {542 if (wnd != seat->popup || event->type == POS_PRESS) { 543 543 rc = ds_window_post_pos_event(wnd, event); 544 544 if (rc != EOK) … … 550 550 } 551 551 552 /* Click outside popup window */ 553 if (event->type == POS_PRESS && wnd != seat->popup) { 554 /* Close popup window */ 555 ds_seat_set_popup(seat, NULL); 556 } 557 552 558 return EOK; 553 559 }
Note:
See TracChangeset
for help on using the changeset viewer.