MousePressEvent not triggered if QWidget on top of Gnome left panel on Ubuntu 18.04
-
Hello,
Context : migrating from qt5.5 to qt 5.13.1
As described on the title, I don't receive mouse press if I click on the part of the QWidget that is overlapping the gnome left panel. If I click just on the right part that is not exactly on top of the gnome panel, the mousePressEvent is triggered (as shown below)
Any Idea of what I'm missing in terms of WindowFlags ?
Here's what is set for the QgraphicsView the QWidget is attached to :
mTransparentDrawingView->setAttribute(Qt::WA_TranslucentBackground, true); #ifdef Q_OS_OSX mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true); #endif mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint | Qt::Window | Qt::NoDropShadowWindowHint); mTransparentDrawingView->setCacheMode(QGraphicsView::CacheNone); mTransparentDrawingView->resize(UBApplication::desktop()->width(), UBApplication::desktop()->height()); mTransparentDrawingView->setMouseTracking(true); mTransparentDrawingView->setAcceptDrops(true);
-
@kamui said in MousePressEvent not triggered if QWidget on top of Gnome left panel on Ubuntu 18.04:
Context : migrating from qt5.5 to qt 5.13.1
But the GNOME version has stayed the same across your migration of Qt versions? Because it feels like it might be GNOME behaviour?
-
To be honest I never tried to compile my app with Qt 5.5 on Ubuntu 18.04.
The issue was not showing on Ubuntu 16.04 (unity) on Qt 5.5, but is showing on Ubuntu 18.04 (gnome) (but OK in KUbuntu 18.04 as no left panel is under my QWidget) with Qt 5.9, 5.13.
With Qt::X11BypassWindowManagerHint set, I'm not sure I can say it is a bad gnome behavior, or an unexpected one on Qt-side as the Window manager is supposed to be bypassed...
At least, I think it is comfortable to say it is gnome-related...