Skip to content
Snippets Groups Projects
Commit e7f202d0 authored by Fatih Uzunoğlu's avatar Fatih Uzunoğlu Committed by Steve Lhomme
Browse files

qt: set transient parent in QVLCFrame if it is a window

parent 3bf4d48c
No related branches found
No related tags found
No related merge requests found
...@@ -196,6 +196,17 @@ bool QVLCTools::restoreWidgetPosition(qt_intf_t *p_intf, ...@@ -196,6 +196,17 @@ bool QVLCTools::restoreWidgetPosition(qt_intf_t *p_intf,
return defaultUsed; return defaultUsed;
} }
QVLCFrame::QVLCFrame(qt_intf_t *_p_intf) : QWidget( NULL ), p_intf( _p_intf )
{
assert(_p_intf);
if (windowFlags().testFlag(Qt::Window))
{
// If window, set the transient parent:
QVLCDialog::setWindowTransientParent(this, nullptr, p_intf);
}
}
void QVLCFrame::keyPressEvent(QKeyEvent *keyEvent) void QVLCFrame::keyPressEvent(QKeyEvent *keyEvent)
{ {
if (keyEvent->key() == Qt::Key_Escape) if (keyEvent->key() == Qt::Key_Escape)
......
...@@ -72,8 +72,7 @@ class QVLCTools ...@@ -72,8 +72,7 @@ class QVLCTools
class QVLCFrame : public QWidget class QVLCFrame : public QWidget
{ {
public: public:
QVLCFrame( qt_intf_t *_p_intf ) : QWidget( NULL ), p_intf( _p_intf ) QVLCFrame( qt_intf_t *_p_intf );
{}
virtual ~QVLCFrame() {} virtual ~QVLCFrame() {}
void toggleVisible() void toggleVisible()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment