Changeset 1b443cc0 in mainline
- Timestamp:
- 2020-04-07T18:17:15Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 71eff34
- Parents:
- 76a02db
- git-author:
- Jiri Svoboda <jiri@…> (2020-04-07 18:08:49)
- git-committer:
- Jiri Svoboda <jiri@…> (2020-04-07 18:17:15)
- Location:
- uspace/srv/hid/display
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/display/types/display/window.h
r76a02db r1b443cc0 70 70 /** Display position */ 71 71 gfx_coord2_t dpos; 72 /** Preview position */ 73 gfx_coord2_t preview_pos; 72 74 /** Minimum size */ 73 75 gfx_coord2_t min_size; -
uspace/srv/hid/display/window.c
r76a02db r1b443cc0 409 409 static void ds_window_start_move(ds_window_t *wnd, gfx_coord2_t *pos) 410 410 { 411 gfx_color_t *color; 412 gfx_context_t *gc; 413 gfx_rect_t drect; 414 errno_t rc; 415 411 416 log_msg(LOG_DEFAULT, LVL_DEBUG, "ds_window_start_move (%d, %d)", 412 417 (int) pos->x, (int) pos->y); … … 417 422 wnd->orig_pos = *pos; 418 423 wnd->state = dsw_moving; 424 wnd->preview_pos = wnd->dpos; 425 426 rc = gfx_color_new_rgb_i16(0xffff, 0xffff, 0xffff, &color); 427 if (rc != EOK) 428 return; 429 430 gfx_rect_translate(&wnd->dpos, &wnd->rect, &drect); 431 432 gc = ds_display_get_gc(wnd->display); // XXX 433 if (gc != NULL) { 434 gfx_set_color(gc, color); 435 gfx_fill_rect(gc, &drect); 436 } 437 438 gfx_color_delete(color); 419 439 } 420 440 … … 464 484 return; 465 485 466 gfx_rect_translate(&wnd->dpos, &wnd->rect, &drect); 467 468 gc = ds_display_get_gc(wnd->display); // XXX 469 if (gc != NULL) { 470 gfx_set_color(gc, wnd->display->bg_color); 471 gfx_fill_rect(gc, &drect); 472 } 486 gfx_rect_translate(&wnd->preview_pos, &wnd->rect, &drect); 487 ds_display_paint(wnd->display, &drect); 473 488 474 489 gfx_coord2_subtract(pos, &wnd->orig_pos, &dmove); 475 490 476 491 gfx_coord2_add(&wnd->dpos, &dmove, &nwpos); 492 wnd->preview_pos = nwpos; 493 477 494 gfx_rect_translate(&nwpos, &wnd->rect, &drect); 478 479 wnd->orig_pos = *pos;480 wnd->dpos = nwpos;481 495 482 496 rc = gfx_color_new_rgb_i16(0xffff, 0xffff, 0xffff, &color);
Note:
See TracChangeset
for help on using the changeset viewer.