-
Notifications
You must be signed in to change notification settings - Fork 663
Add maximize button to FloatingWidgetTitleBar [Revived 2] #230
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
Add maximize button to FloatingWidgetTitleBar [Revived 2] #230
Conversation
|
Thank you for the pull request. I just tested it on Ubuntu 20.04 with Qt 5.12.8 and it does not work. The maximize button does not do anything. The icon changes but the window does not change. I think Removing |
|
Args, X11 why do you have to be so annoying. Everything works fine on XFCE from QT 12.5 to QT 15.0 including being able to drag outside of screen boundaries. Before removing WA_X11NetWmWindowTypeDock showMaximized also did not work on my system btw. |
|
I could reproduce your described behavior with Mate 1.16.2. I am still not sure why temporary setting Please let me know if it works for you and if you insist on the WA_X11NetWmWindowTypeDock flag (In which case i'd investigate some more why that breaks on XFCE). |
|
@SleepProgger I tested your latest changes on Ubuntu 20.04 (Qt 5.12) and Ubuntu 18.04 (Qt 5.9) and cannot see any difference: the maximize button is not working and it is not possible to drag the floating widgets out of the screen borders which feels kind of wired. I do not insist on Thanks for all your efforts - these are the things that drive me crazy on linux. Maybe you can check the QDockWidget source code to see how Qt handles this problem? |
|
Ahh annoying, had my hopes up for this one. Will try to get it running tomorrow on ubuntu too. The main problem with "WA_X11NetWmWindowTypeDock" is that i really don't see why it breaks on XFCE AFTER disabling it again. On my Mate test system QDockWidget can't be maximized too (tested with wmctrl) which makes sense since they are of the tool type too. Quick question tho: ADS is extending QDockWidgets for the FloatingContainer. Is there a reason for this i missed or is this just like it always was and never was changed ? |
|
@SleepProgger I had trouble to get the floating widgets working on Linux without QDockWidget. Initially the code was the same on Windows and Linux - QWidget. But with QWidget I could not get the floating widgets to work properly. If I remember correctly I had issues with the stacking, that means a dragged widget appeared behind the main window or above the drop icons, so it was not possible to see the drop indicators anymore. Then I switched to QDockWidget because I thought: they made docking work on Linux and Windows so it should also work for me. And indeed, switching to QDockWidget fixed all my troubles I had so far. But maybe there are other X11 window flags that could also fix this. Because I mainly work on Windows and because my application that uses ADS also runs on Windows, I did not spent too much time on the Linux implementation. I also only use Ubuntu here, so this is my only Linux test environment. |
|
I see. Thanks for the info. (Trivia (kinda): Strangely it doesn't work when using xForwarding on the XFCE machine to itself but works with xForwarding from the XFCE machine to the mate one oO) |
|
@githubuser0xFFFF Now the maximize button works - thank you. If I set the attribute Therefore I would like to keep |
|
Ok it took me some time and required to dig into xcb and X specs (no fun), but here we go... There are some problems with using Qt::Window instead of Qt::Tool.
I think i solved all of these issues. I also completely got rid of the custom titlebar and used the native one. This means whatever the windowmanager of the user supports is now supported (same as on the other systems). Tested on different versions of Mate (Based on GNOME2), Ubuntu 20.04 (GNOME3), Kubuntu 20.04 (KDE) and XFCE plus X forwarding on all of them. Additional info about the changes: I solved the taskbar/pager issue by sending I solved the "always on top" issue by setting all floating windows to be always on top as soon as the main application window gets activated and remove it again when deactivated. This leads to it behaving like a Qt::Tool window. By simply hiding all floating windows when the main WIndow is being minimized that one was easy to solve. |
|
Wow, that sounds really great and like a lot of work. I'm on holidays right now for the next two weeks and will review and test the patch as soon as I'm back. Thank you |
|
I am planing on using this library, so its in my own interest too ;) Enjoy your holiday |
|
I just merged your pull request with some changes. I added support for styling the maximize button via CSS and provided some default icons. Thank you. |
|
@githubuser0xFFFF Wait, no. This branch is messed up. https://github.com/SleepProgger/Qt-Advanced-Docking-System/tree/native_floating_titlebar_on_linux I'd suggest reverting this merge to be honest. |
|
Reverted the change. Feel free to open a new pull request if you are ready. |
|
I just tested your implementation with native linux titlebar. I looks very promising - I like it a lot. I hope you can sort out all issues quickly. |
|
Thanks. So atm. i see 3 possible ways:
If 3. fails i'd suggest going with 1. which would be done in some days and i would likely just move the relevant stuff from the native_titlebar branch into this on. Did i mention that the whole X11 WindowManager area is a freakin mess ;) |
Continuation from #228
I switched back to using
showNormaland Co. This simplified the code by a good bit and also allows to benefit from possible future updates in QTsshowNormaland especiallyshowMaximizefunctions.Everything seem to be fine, but further tests especially on other window manager might be a good idea.
Fixed from last state:
The only thing i am not really sure about is that i had to remove
setAttribute(Qt::WA_X11NetWmWindowTypeDock, true);because that brokeshowMaximizedfor some reason.I don't see any change on my System tho, but this may be different on other systems .?