Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 3c3657c in mainline for uspace/lib/ui/src/ui.c


Ignore:
Timestamp:
2021-09-04T08:04:36Z (7 weeks ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
7896f23
Parents:
81d3612
Message:

Correctly position windows in fullscreen mode (only works with CSR)

This involves translating the rendering operations as well as
hardware cursor operations and position events. This currently
only works with client-side rendering (using memory GC for translation),
but not with server-side rendering (need a new special GC to translate
the operations).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/src/ui.c

    r81d3612 r3c3657c  
    236236        ui_window_t *awnd;
    237237        ui_evclaim_t claim;
     238        pos_event_t pos;
    238239
    239240        awnd = ui_window_get_active(ui);
     
    246247                break;
    247248        case CEV_POS:
    248                 claim = ui_wdecor_pos_event(awnd->wdecor, &event->ev.pos);
     249                pos = event->ev.pos;
     250#ifdef CONFIG_UI_CS_RENDER
     251                /*
     252                 * TODO Enable translation for server-side rendering
     253                 * once we can translate rendering operations in this
     254                 * case.
     255                 */
     256                pos.hpos -= awnd->dpos.x;
     257                pos.vpos -= awnd->dpos.y;
     258#endif
     259
     260                claim = ui_wdecor_pos_event(awnd->wdecor, &pos);
    249261                /* Note: If event is claimed, awnd might not be valid anymore */
    250262                if (claim == ui_unclaimed)
    251                         ui_window_send_pos(awnd, &event->ev.pos);
     263                        ui_window_send_pos(awnd, &pos);
     264
    252265                break;
    253266        }
Note: See TracChangeset for help on using the changeset viewer.