Changeset 4055fe63 in mainline for uspace/srv/hid/display/seat.c
- Timestamp:
- 2021-06-04T20:02:36Z (4 years ago)
- Children:
- 4b72e81
- Parents:
- 2e6394e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/seat.c
r2e6394e r4055fe63 104 104 ds_window_bring_to_top(wnd); 105 105 } 106 107 /* When focus changes, popup window should be closed */ 108 ds_seat_set_popup(seat, NULL); 106 109 } 107 110 … … 113 116 void ds_seat_set_popup(ds_seat_t *seat, ds_window_t *wnd) 114 117 { 118 if (wnd == seat->popup) 119 return; 120 121 if (seat->popup != NULL) { 122 /* Window is no longer the popup window, send close request */ 123 ds_client_post_close_event(seat->popup->client, 124 seat->popup); 125 } 126 115 127 seat->popup = wnd; 116 128 } … … 139 151 140 152 if (seat->popup == wnd) 141 seat->popup = NULL;153 ds_seat_set_popup(seat, NULL); 142 154 } 143 155 … … 427 439 428 440 wnd = ds_display_window_by_pos(seat->display, &seat->pntpos); 429 /* 430 * Deliver event to popup window, unless the pointer is over 431 * it (in which case it will be delivered to that window 432 * below, anyway. 433 */ 441 442 /* Click outside popup window */ 443 if (event->type == POS_PRESS && wnd != seat->popup) { 444 /* Close popup window */ 445 ds_seat_set_popup(seat, NULL); 446 } 447 448 /* Deliver event to popup window. */ 434 449 if (seat->popup != NULL) { 435 450 rc = ds_window_post_pos_event(seat->popup, event);
Note:
See TracChangeset
for help on using the changeset viewer.