-
Notifications
You must be signed in to change notification settings - Fork 572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux: Dark window when dragging if compositing is disabled in window manager #95
Comments
Could you please elaborate what the exact issue is? Is the problem reproducible with the demo application. Which QT version do you use and what are your global dock manager configuration flags? |
Hi, Yes, the issue is reproducible with the latest binary available here (AppImage). Qt version is 5.12.3. I do not use any specific global dock manager configuration flags, I just ise the library as shipped by the github repo (it is actually included in the project as a Git submodule). Best, |
I mean, is the problem reproducible with thr ADS demo app.? |
I would need to deploy it. Will come back to you on that. |
@githubuser0xFFFF I can reproduce this issue with the latest code and demo app. |
It is not a generic Linux issue. I tested it on Ubuntu 19.10 an Kubuntu 18.04 and it works. According to another user this problem occurs, if compositing is deactivated in Linux. @hhslepicka Which Linux distro do you use? |
@juangburgos Can you please tell me which Lubuntu version you use? |
I use RHEL 6 & 7 |
This issue is caused by disabled compositing via the window manager.
My current setup is running Xfwm4 as a window manager, because it allows me to easily enable/disable compositing via the following command: Qt allows for checking if compositing is running or not with
For now I came up with two workarounds for the disabled compositing issue:
|
Sorry, I was AFK on holidays. My experience looks the same as for @iam-peter on Lubuntu 19.10. |
@iam-peter Thank you for the detailed analysis and the two proposed solutions. The second solution sounds good. Because docking is possible in all floating widgets, I think taking a sceenshot of the
For the floating |
I have thought about the topic again and I think the solution I suggested above does not work that way. Because the overlay is in front of the dragged widget, the floating widget will be behind the overlay and because the overlay will display a screenshot of the An option would be, to dynamically make the QFrame* Overlay = new QFrame(this);
QColor color = this->palette().highlight().color();
color.setAlpha(64);
Overlay->setStyleSheet(QString("background: %1; border: 1px solid %2;").arg(color.name(QColor::HexArgb)).arg(color.name()));
Overlay->setGeometry(0, 0, this->width() / 2, this->height());
Overlay->show(); This works without Here comes the problem of this solution: the |
@githubuser0xFFFF this seems like a good escape route in case composition is not available for the OS. |
@hhslepicka @iam-peter I create a new branch
So to summarize the results: making the dock overlay a child of the target dock area works partly but has to many issues to be a good workaround for linux systems with compositing disabled. |
@githubuser0xFFFF thank you for pursuing the fix for this issue. Good Findings:
Bad Findings:
Other than the two items above the fix seems to be moving in the right direction I would say. |
@githubuser0xFFFF did you have a chance to look at this issue some more? |
This issue ist not easy fixable and requires a lot of work. At the moment I do not have the time to fix this and I'm also not really happy to spend that much time because somewhere in some Linux distribution is compositing disabled. |
I find that understandable. Maybe just mention a caveat in the main README of the repo for Linux mentioning that compositing must be enabled with some links on where to find information about enabling? Then leave the issue open for help if somebody steps up with a contribution. |
This is a good idea. But I cannot tell, how to enable compositing because I don'k know it and because I think it is different for different Linux distributions - or is there a generic way? |
@githubuser0xFFFF I completely understand your point. No problem at all. We will look at our side how to enable Compositing. Feel free to close the issue. |
Hi I have the same issue with black screen on CentOS 6. The problem is because the overlay window is created as a borderless top level system window. It is probably the reason you rely on composite extension. Actually, I think the better approach is to create the overlay window (and cross window) as a child of the parent window. In this case parent window contents will appear as the background of the overlay window like it seems to be transparent. I tried to do it in my project and it seems I suceeded to fix it. |
Hi, great to hear that you suceeded fixing the issue. Would be great, if you could create a pull request for your changes so that I can test it. I already tested several solutions by myself like you can see in the messages above. |
Hi, Yes, but I have to fix a positional issue related to the change the parent of overlay widget. I briefly went through some comments. What you are proposed to use the screenshot of the background - it is a good way but you shouldn't do it yourself. Actually Qt already does it and there will be no issue with static background. |
Merge request, merge request, merge request! 🙂 |
@juangburgos Vitaly created pull request #217 to fix this issue. Could you please test his fix? @vitcpp Thank you Vitaly for the pull request |
@juangburgos Have you tested the changes from Vitaly? |
@iam-peter Hi Henning. Vitaly created pull request #217 to fix this issue. Would be great, if you could test this and give me some feedback if his solution works. |
@githubuser0xFFFF I pulled the fork from Vitaly, deactivated compositing and it works. |
I compiled QUaModbusClient with the master branch, and it is still rather un-usable in most Linux virtual machines: |
Yes, I know. Vitaly promised to fix this, but obviously he didn't succeed. |
I close this issue because I'm not able to fix this and it does not seem important for other people to fix this. |
This is unfortunately still an issue plaguing many of us daily :( |
@Tectu Yes, it's a shame that not a single Linux user could fix this issue or even tried it. |
You're assuming we know how to write C++ and aren't just PyQt plebs. |
@githubuser0xFFFF It's a bit disconcerting if the author / maintainer of the project is saying that it's a difficult problem to fix. You wrote:
What exactly is preventing you from fixing this? (I don't mean that in a bad/negative/offensive way !!!) In any case, as others have mentioned, it is 100% fine - without questions or judgement - if you don't feel like spending time on "supporting Linux" or tackling this problem in general. But don't mistake lack of contribution for lack of severity/interest :) If this is a personal dislike against Linux, there are other operating systems / platforms out there that are affected by this issue. While Linux might be "a mess" (to quote you from #451), this does not seem to be a Linux specific problem from what I can tell but rather an X related issue. |
@Tectu This is an open source project and any user or developer can fix issues. There are a lot of issues that have been fixed by ADS users. Most ADS users work on Windows but most issues are on Linux. I'm neigther a Linux expert nor do I have the time to fiddle around with each Linux window manager. Therefore I hoped, that a Linux user will fix this - but no one fixed this for some years. Another option would be some kind of commercial support. How much money would you spend, to see this fixed? |
Hi,
I am using the library in the QUaModbusClient open source project. I have tested on Windows ans CentOS and all fine. I have tried on Lubuntu and it seems there is some issue when dragging over a detached dock into a Layout.
Has something similar happened to anybody? Is it an OS issue or a library issue?
Thanks
The text was updated successfully, but these errors were encountered: