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
GTK3 Support #11
Comments
Maybe we can take inspiration from wnck here? wxBitmap says this:
So maybe we just have to find a different approach to transform the X background Pixmap to that. If I understand the hints from https://developer.gnome.org/gdk2/stable/gdk2-Bitmaps-and-Pixmaps.html#gdk-pixmap-new right we need to use Cairo now:
https://github.com/lanoxx/libwnck/blob/bcfa20a542693b3baadf797795efbcb7c3afb423/libwnck/xutils.c#L1689-L1709 does about that:
That we'd also have to copy https://developer.gnome.org/gtk3/stable/ch26s02.html#id-1.6.3.4.5 (or a different section of that guide) might give additional alternatives, maybe that wnck code is not optimal. Hard stuff, documentation is minimal and code searches make it look as if simdock was the only program that ever used this code (which can't really be true). Could you help with this work? I would basically just try to copy what I found now, and there might be better options. |
Sure, I will look into it. |
This seems to have become a critical issue now. At least on my system, the GTK2 support libraries are gone. I had no luck in getting the GTK3 route to work though. @swt2c, did you succeed here? This might be the end of the route for simdock otherwise. |
No, I gave up. Admittedly, I don't use simdock - I was mainly interested in porting wxWidgets applications to GTK3 from a distribution perspective. We ended up just dropping simdock in Fedora, I believe. |
Ok, I understand :) If someone else has an idea how to solve this, please speak up! I'll give this a bit of time and otherwise mark the project as broken. |
I managed to cobble a solution together. The main commits are 9fa2956 and 0d32ab0. 9fa2956 moved the makefile to wxwidgets with GTK3 and contained the core logic to make the background detection work again. 0d32ab0 then moved the makefile to wnck-3.0, as wnck-1.0 relies on GTK2, which makes the binary not run. The commit also contains a correction: Instead of using the XID simdock gets before via wnck, this now uses a gdk helper function instead. In summary, Instead of relying on wnck, it's using gdk functions now. The replacement for
My function is then still using a wnck helper function to get the size of the display, as one needs that to define the area My initial understanding of having to use cairo here seems to have been completely wrong. Edit: Or maybe not. The problem with the approach above is that it does not select the X background, but the whole X desktop with content like the painted window. To copy the old approach it would be necessary to somehow get the X background, but wnck's For now I instead opted for a workaround via 8cadc12, to hide the app before the background is fetched. @swt2c Thank for the bugreport here. If you have the time, it would be awesome if you could help me with the Readme - I'd love to have a section about the necessary requirements to get this to build on Fedora. The ones for Ubuntu are probably outdated (and Ubuntu seems to have dropped wnck? oO). I'll add a section for void myself now. |
The GTK3 migration was done, so I'll close here already. |
GTK3 support would be appreciated. The main issue seems to be that GdkPixmap is gone, so I wasn't sure how to replace
gdk_pixmap_foreign_new()
.The text was updated successfully, but these errors were encountered: