diff --git a/QtScrcpy/toolform.cpp b/QtScrcpy/toolform.cpp index ec6de4c..835e49f 100644 --- a/QtScrcpy/toolform.cpp +++ b/QtScrcpy/toolform.cpp @@ -1,4 +1,7 @@ #include +#include +#include +#include #include "toolform.h" #include "ui_toolform.h" @@ -58,6 +61,16 @@ void ToolForm::mouseMoveEvent(QMouseEvent *event) } } +void ToolForm::showEvent(QShowEvent *event) +{ + qDebug() << "show event"; +} + +void ToolForm::hideEvent(QHideEvent *event) +{ + qDebug() << "hide event"; +} + void ToolForm::on_fullScreenBtn_clicked() { if (m_videoForm) { diff --git a/QtScrcpy/toolform.h b/QtScrcpy/toolform.h index 2c09f37..5e2ace6 100644 --- a/QtScrcpy/toolform.h +++ b/QtScrcpy/toolform.h @@ -24,6 +24,9 @@ protected: void mouseReleaseEvent(QMouseEvent *event); void mouseMoveEvent(QMouseEvent *event); + void showEvent(QShowEvent *event); + void hideEvent(QHideEvent *event); + private slots: void on_fullScreenBtn_clicked(); diff --git a/QtScrcpy/videoform.cpp b/QtScrcpy/videoform.cpp index b98fe5e..3d02f49 100644 --- a/QtScrcpy/videoform.cpp +++ b/QtScrcpy/videoform.cpp @@ -432,7 +432,9 @@ void VideoForm::paintEvent(QPaintEvent *paint) void VideoForm::showEvent(QShowEvent *event) { Q_UNUSED(event); - showToolFrom(); + if (!isFullScreen()) { + showToolFrom(); + } } void VideoForm::dragEnterEvent(QDragEnterEvent *event)