• Dmitry Kazakov's avatar
    Add workaround for handling table press correctly in WinInk mode · d684bc55
    Dmitry Kazakov authored
    Original problem: widgets do not get synthesized mouse-down and
    mouse-press events until the stylus is released
    
    Reason: if the app accepts the event, WndProc should report
    that to the system (by returning true). This is the only way to
    prevent Windows from starting some system-wide gestures, like
    click+hold -> right button click. If we ignore the event, then
    OS postpones all synthesized mouse events until the entire gesture
    is completed.
    
    The patch implements a "hackish" workaround for the original problem
    by using the following rules:
    
    1) All tablet-move events are ignored (without synthesized mouse events
       OS doesn't generate any Enter/Leave events)
    
    2) All not-accepted tablet press- and release-events and also reported as
       ignored (without it D&D doesn't work).
    
    3) All accepted tablet press- and release-events are reported as "accepted",
       **but** we artificially synthesize mouse events for them.
    
    TODO: there are still two problems:
    
    1) Perhaps this synthesizeMouseEvent() is not needed at all. But we should
       first check if Qt relies on these synthesized messages anywhere in the
       code or not.
    
    2) If we still keep synthesizeMouseEvent(), then it should fetch actual
       tablet buttons from QGuiApplicationPrivate::tabletDevicePoint(). Right
       now it always synthesizes left-click, whatever the button was pressed/
       released.
    
    CCBUG:406668
    d684bc55
Name
Last commit
Last update
..
ext_boost Loading commit data...
ext_drmingw Loading commit data...
ext_eigen3 Loading commit data...
ext_exiv2 Loading commit data...
ext_expat Loading commit data...
ext_ffmpeg Loading commit data...
ext_fftw3 Loading commit data...
ext_fontconfig Loading commit data...
ext_frameworks Loading commit data...
ext_freetype Loading commit data...
ext_gettext Loading commit data...
ext_giflib Loading commit data...
ext_gmic Loading commit data...
ext_gsl Loading commit data...
ext_heif Loading commit data...
ext_iconv Loading commit data...
ext_ilmbase Loading commit data...
ext_jpeg Loading commit data...
ext_lcms2 Loading commit data...
ext_libraw Loading commit data...
ext_lzma Loading commit data...
ext_ocio Loading commit data...
ext_openexr Loading commit data...
ext_openssl Loading commit data...
ext_patch Loading commit data...
ext_pkgconfig Loading commit data...
ext_png Loading commit data...
ext_png2ico Loading commit data...
ext_poppler Loading commit data...
ext_pyqt Loading commit data...
ext_python Loading commit data...
ext_qt Loading commit data...
ext_quazip Loading commit data...
ext_sip Loading commit data...
ext_tiff Loading commit data...
ext_vc Loading commit data...
ext_zlib Loading commit data...
CMakeLists.txt Loading commit data...
README.md Loading commit data...