Ignore:
Timestamp:
May 27, 2013, 3:28:05 PM (12 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: update trunk to 0.8.5

Location:
smplayer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk

  • smplayer/trunk/src/mplayerwindow.cpp

    r139 r142  
    11/*  smplayer, GUI front-end for mplayer.
    2     Copyright (C) 2006-2012 Ricardo Villalba <rvm@users.sourceforge.net>
     2    Copyright (C) 2006-2013 Ricardo Villalba <rvm@users.sourceforge.net>
    33
    44    This program is free software; you can redistribute it and/or modify
     
    4848        setMinimumSize( QSize(0,0) );
    4949
    50 #if NEW_MOUSE_CHECK_POS
    5150        mouse_last_position = QPoint(0,0);
    52 #else
    53         cursor_pos = QPoint(0,0);
    54         last_cursor_pos = QPoint(0,0);
    55 #endif
    5651
    5752        check_mouse_timer = new QTimer(this);
    5853        connect( check_mouse_timer, SIGNAL(timeout()), this, SLOT(checkMousePos()) );
    59 #if !NEW_MOUSE_CHECK_POS
    60         check_mouse_timer->start(2000);
    61 #endif
    6254
    6355        // Change attributes
     
    6961        //setAttribute(Qt::WA_PaintOutsidePaintEvent);
    7062
    71 #if NEW_MOUSE_CHECK_POS
    7263        setAutoHideInterval(1000);
    7364        setAutoHideCursor(false);
    74 #endif
    7565}
    7666
     
    8575}
    8676
    87 #if NEW_MOUSE_CHECK_POS
    8877void Screen::setAutoHideCursor(bool b) {
    8978        qDebug("Screen::setAutoHideCursor: %d", b);
     
    117106        mouse_last_position = pos;
    118107}
    119 #else
    120 void Screen::checkMousePos() {
    121         //qDebug("Screen::checkMousePos");
    122        
    123         if ( cursor_pos == last_cursor_pos ) {
    124                 //qDebug(" same pos");
    125                 if (cursor().shape() != Qt::BlankCursor) {
    126                         //qDebug(" hiding mouse cursor");
    127                         setCursor(QCursor(Qt::BlankCursor));
    128                 }
    129         } else {
    130                 last_cursor_pos = cursor_pos;
    131         }
    132 }
    133108
    134109void Screen::mouseMoveEvent( QMouseEvent * e ) {
    135         //qDebug("Screen::mouseMoveEvent");
    136         //qDebug(" pos: x: %d y: %d", e->pos().x(), e->pos().y() );
    137         cursor_pos = e->pos();
    138 
    139110        if (cursor().shape() != Qt::ArrowCursor) {
    140111                //qDebug(" showing mouse cursor" );
     
    142113        }
    143114}
    144 #endif
    145115
    146116void Screen::playingStarted() {
    147 #if NEW_MOUSE_CHECK_POS
    148117        qDebug("Screen::playingStarted");
    149118        setAutoHideCursor(true);
    150 #endif
    151119}
    152120
    153121void Screen::playingStopped() {
    154 #if NEW_MOUSE_CHECK_POS
    155122        qDebug("Screen::playingStopped");
    156123        setAutoHideCursor(false);
    157 #endif
    158124}
    159125
Note: See TracChangeset for help on using the changeset viewer.