VirtualBox

Ignore:
Timestamp:
Nov 26, 2010 2:13:35 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
68162
Message:

Main: better type checks when firing events

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxShell/vboxshell.py

    r34082 r34393  
    323323                 else:
    324324                     print "pointer shape event: w=%d h=%d shape len=%d" %(psev.width, psev.height, len(shape))
    325          elif type == ctx['global'].constants.VBoxEventType_OnGuestMouseEvent:
     325         elif type == ctx['global'].constants.VBoxEventType_OnGuestMouse:
    326326             mev = ctx['global'].queryInterface(ev, 'IGuestMouseEvent')
    327327             if mev:
    328328                 printMouseEvent(ctx, mev)
    329          elif type == ctx['global'].constants.VBoxEventType_OnGuestKeyboardEvent:
     329         elif type == ctx['global'].constants.VBoxEventType_OnGuestKeyboard:
    330330             kev = ctx['global'].queryInterface(ev, 'IGuestKeyboardEvent')
    331331             if kev:
     
    392392         type = ev.type
    393393         #print "got event: %s %s" %(str(type), asEnumElem(ctx, 'VBoxEventType', type))
    394          if type == ctx['global'].constants.VBoxEventType_OnGuestMouseEvent:
     394         if type == ctx['global'].constants.VBoxEventType_OnGuestMouse:
    395395             mev = ctx['global'].queryInterface(ev, 'IGuestMouseEvent')
    396396             if mev:
    397397                 l = "%d: m %d %d %d %d %d %d\n" %(stamp(), mev.absolute, mev.x, mev.y, mev.z, mev.w, mev.buttons)
    398398                 demo.write(l)
    399          elif type == ctx['global'].constants.VBoxEventType_OnGuestKeyboardEvent:
     399         elif type == ctx['global'].constants.VBoxEventType_OnGuestKeyboard:
    400400             kev = ctx['global'].queryInterface(ev, 'IGuestKeyboardEvent')
    401401             if kev:
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette