Created attachment 50817 [details] This is the popup on windows. It should appear this way on Linux too. PLATFORMS This mainly affects Linux, but the issue is also there in Windows. I am running QT 4.6.2 DESCRIPTION On click, a transparent, frameless webkit window will popup covering the screen and draw a box at the location of the click (functions much like a context menu). In Linux, this causes screen distortions (see screenshot). In Windows it largely works, but there is a flicker between every click where if you click in two separate places the box will show in the previous place it was for a second. This should not happen because every time the box leaves the screen it is made invisible via javascript. PROBLEM SUMMARY Linux: Screen distortion; Windows: Flicker TESTED SETUPS I have tested it on two windows 7 installs and multiple linux installs and so have other people. Every Linux install has compositing enabled and is able to run compizfusion, so it is not an issue with graphic drivers or the sort.
Created attachment 50818 [details] This is the screen distortion caused in Linux. It is like some sort of buffer is reused over and over again even though it is stale.
Created attachment 50819 [details] Test case. Made it as small as I could.
On Linux, left-clicking displays a black box that nearly fills the screen, and after clicking on it it's not possible to click on anything else (can't even click the icon to close the app).
Interesting, does transparency work for you with other programs? Two people have said they see a black box. I assumed that is because they don't have compositing enabled (I believe this requires it, right?). You are the first to report you cannot close the popup. It is supposed to grab the mouse and on any subsequent left-click close the box. So, is this a bug in QT Webkit? It seems like it is to me since it works in Windows and not Linux despite Linux having the capability.
Btw, code to make the webview transprent was borrowed from: http://labs.trolltech.com/blogs/2009/06/30/transparent-qwebview-or-qwebpage/ Based on the last comment on the page, even that does not work in Linux.
Okay, it is getting stranger. This is what I discovered: Nvidia + proprietary drivers / ATI + open source drivers gives the distorted screen as shown in the screen shot. ATI + proprietary drivers gives a completely black background instead of a transparent background. In all these cases linux is capable because Compizfusion opacity effect can be enabled, which makes windows transparent. Can someone confirm this as a bug in QT?
Tried to reproduce it and couldn't, the window was transparent as expected. I also got the "won't close" problem which seem to be caused by an unreleased mouse grab. The screen distortion you see is there because the window is expected to be made transparent by the composition manager but is not. You test application is too complex. If you can shrink it and corner the cause of the problem around QPalette::setBrush(QPalette::Base, Qt::transparent) and setAttribute(Qt::WA_TranslucentBackground, true), you should report this bug at http://bugreports.qt.nokia.com The bug is not related to QtWebKit so i'll resolve it as invalid.