Changeset 8edec53 in mainline for uspace/srv/hid/display/seat.c


Ignore:
Timestamp:
2021-10-25T17:51:10Z (2 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
91ece11b
Parents:
805a149
Message:

Support double-click

Needed to open Navigator entries using the mouse.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/display/seat.c

    r805a149 r8edec53  
    362362        }
    363363
    364         if (event->type == PTD_PRESS || event->type == PTD_RELEASE) {
     364        if (event->type == PTD_PRESS || event->type == PTD_RELEASE ||
     365            event->type == PTD_DCLICK) {
    365366                pevent.pos_id = 0;
    366                 pevent.type = (event->type == PTD_PRESS) ?
    367                     POS_PRESS : POS_RELEASE;
     367                switch (event->type) {
     368                case PTD_PRESS:
     369                        pevent.type = POS_PRESS;
     370                        break;
     371                case PTD_RELEASE:
     372                        pevent.type = POS_RELEASE;
     373                        break;
     374                case PTD_DCLICK:
     375                        pevent.type = POS_DCLICK;
     376                        break;
     377                default:
     378                        assert(false);
     379                }
     380
    368381                pevent.btn_num = event->btn_num;
    369382                pevent.hpos = seat->pntpos.x;
Note: See TracChangeset for help on using the changeset viewer.