From 11b0e2db4b4c0aadae9077622e9e2e72bb5d737f Mon Sep 17 00:00:00 2001 From: lupoDharkael Date: Tue, 6 Jun 2017 12:38:34 +0200 Subject: [PATCH] Capture window showing when mouse events are holded --- src/capture/capturewidget.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/capture/capturewidget.cpp b/src/capture/capturewidget.cpp index 485f8362..3cfd8e0c 100644 --- a/src/capture/capturewidget.cpp +++ b/src/capture/capturewidget.cpp @@ -68,9 +68,17 @@ CaptureWidget::CaptureWidget(QWidget *parent) : << &m_LHandle << &m_THandle << &m_RHandle << &m_BHandle; // set base config of the widget move(0,0); - setWindowFlags( Qt::WindowStaysOnTopHint - | Qt::FramelessWindowHint - | Qt::Popup); + + setWindowFlags(Qt::BypassWindowManagerHint + | Qt::WindowStaysOnTopHint + | Qt::FramelessWindowHint + | Qt::Tool); + +// setWindowFlags( Qt::WindowStaysOnTopHint +// | Qt::FramelessWindowHint +// | Qt::Popup); + + setMouseTracking(true); setCursor(Qt::CrossCursor); initShortcuts(); @@ -83,9 +91,10 @@ CaptureWidget::CaptureWidget(QWidget *parent) : QSize size = m_screenshot->getScreenshot().size(); // we need to increase by 1 the size to reach to the end of the screen resize(size.width()+1, size.height()+1); - // init interface color - show(); + showFullScreen(); + + // init interface color m_colorPicker = new ColorPicker(this); }