Skip to content

Commit

Permalink
Fix keyboard shortcuts when video area has focus.
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Sep 3, 2014
1 parent daa9a97 commit d7e42e2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/glwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "glwidget.h"
#include "settings.h"
#include "qmltypes/qmlutilities.h"
#include "mainwindow.h"

#define USE_GL_SYNC // Use glFinish() if not defined.

Expand Down Expand Up @@ -374,6 +375,13 @@ void GLWidget::mouseMoveEvent(QMouseEvent* event)
drag->exec(Qt::LinkAction);
}

void GLWidget::keyPressEvent(QKeyEvent* event)
{
QQuickView::keyPressEvent(event);
if (event->isAccepted()) return;
MAIN.keyPressEvent(event);
}

void GLWidget::createThread(RenderThread **thread, thread_function_t function, void *data)
{
#ifdef Q_OS_WIN
Expand Down
1 change: 1 addition & 0 deletions src/glwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ private slots:
void resizeEvent(QResizeEvent* event);
void mousePressEvent(QMouseEvent *);
void mouseMoveEvent(QMouseEvent *);
void keyPressEvent(QKeyEvent* event);
void createShader();

static void on_frame_show(mlt_consumer, void* self, mlt_frame frame);
Expand Down

0 comments on commit d7e42e2

Please sign in to comment.