Changeset 5f483be in mainline
- Timestamp:
- 2020-05-24T20:38:57Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d8e2485
- Parents:
- b3b00b6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/window.c
rb3b00b6 r5f483be 471 471 (int) pos->x, (int) pos->y); 472 472 473 if (wnd->state != dsw_moving) 474 return; 473 assert(wnd->state == dsw_moving); 475 474 476 475 gfx_coord2_subtract(pos, &wnd->orig_pos, &dmove); … … 500 499 (int) pos->x, (int) pos->y); 501 500 502 if (wnd->state != dsw_moving) 503 return; 501 assert(wnd->state == dsw_moving); 504 502 505 503 gfx_rect_translate(&wnd->preview_pos, &wnd->rect, &drect); … … 569 567 (int) pos->x, (int) pos->y); 570 568 571 if (wnd->state != dsw_resizing) 572 return; 569 assert(wnd->state == dsw_resizing); 573 570 574 571 (void) ds_display_paint(wnd->display, NULL); … … 604 601 (int) pos->x, (int) pos->y); 605 602 606 if (wnd->state != dsw_resizing) 607 return; 603 assert(wnd->state == dsw_resizing); 608 604 609 605 gfx_rect_translate(&wnd->dpos, &wnd->preview_rect, &drect); … … 672 668 inside = gfx_pix_inside_rect(&pos, &drect); 673 669 674 if (event->type == POS_PRESS && event->btn_num == 2 && inside) 670 if (event->type == POS_PRESS && event->btn_num == 2 && inside) { 675 671 ds_window_start_move(wnd, &pos); 672 return EOK; 673 } 676 674 677 675 if (event->type == POS_RELEASE) { 678 ds_window_finish_move(wnd, &pos); 679 ds_window_finish_resize(wnd, &pos); 676 if (wnd->state == dsw_moving) { 677 ds_window_finish_move(wnd, &pos); 678 return EOK; 679 } 680 681 if (wnd->state == dsw_resizing) { 682 ds_window_finish_resize(wnd, &pos); 683 return EOK; 684 } 680 685 } 681 686 682 687 if (event->type == POS_UPDATE) { 683 ds_window_update_move(wnd, &pos); 684 ds_window_update_resize(wnd, &pos); 688 if (wnd->state == dsw_moving) { 689 ds_window_update_move(wnd, &pos); 690 return EOK; 691 } 692 693 if (wnd->state == dsw_resizing) { 694 ds_window_update_resize(wnd, &pos); 695 return EOK; 696 } 685 697 } 686 698
Note:
See TracChangeset
for help on using the changeset viewer.