Ignore:
Timestamp:
Aug 31, 2016, 5:31:04 PM (9 years ago)
Author:
Silvan Scherrer
Message:

smplayer: update trunk to version 16.8.0

Location:
smplayer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk

  • smplayer/trunk/src/myapplication.cpp

    r176 r181  
    1818
    1919#include "myapplication.h"
     20
     21#ifdef SINGLE_INSTANCE
     22MyApplication::MyApplication ( const QString & appId, int & argc, char ** argv )
     23        : QtSingleApplication(appId, argc, argv)
     24{
     25#if defined(USE_WINEVENTFILTER) && QT_VERSION >= 0x050000
     26        installNativeEventFilter(this);
     27#endif
     28};
     29
     30#else
     31
     32MyApplication::MyApplication ( const QString & appId, int & argc, char ** argv )
     33        : QApplication(argc, argv)
     34{
     35#if defined(USE_WINEVENTFILTER) && QT_VERSION >= 0x050000
     36        installNativeEventFilter(this);
     37#endif
     38};
     39
     40#endif
     41       
     42#if defined(USE_WINEVENTFILTER) && QT_VERSION >= 0x050000
     43bool MyApplication::nativeEventFilter(const QByteArray &eventType, void *message, long *result) {
     44        //qDebug() << "MyApplication::nativeEventFilter:" <<eventType;
     45       
     46        if (eventType == "windows_generic_MSG" || eventType == "windows_dispatcher_MSG") {
     47                MSG * m = static_cast<MSG *>(message);
     48                return winEventFilter(m, result);
     49        }
     50       
     51        return false;
     52}
     53#endif
    2054
    2155#ifdef USE_WINEVENTFILTER
     
    122156               
    123157                if (eat_key) {
    124                         qDebug("MyApplication::winEventFilter: ignoring key %X", msg->wParam);
     158                        qDebug() << "MyApplication::winEventFilter: ignoring key" << msg->wParam;
    125159                        last_appcommand = 0;
    126                         *result = true;
     160                        //*result = true;
    127161                        return true;
    128162                }
     
    165199                                QWidget * w = QApplication::focusWidget();
    166200                                if (w) QCoreApplication::sendEvent(w, &event);
    167                                 *result = true;
     201                                //*result = true;
    168202                                return true;
    169203                        }
Note: See TracChangeset for help on using the changeset viewer.