davidedmundson / xembed-sni-proxy

Convert XEmbed system tray icons to SNI icons
GNU General Public License v2.0
32 stars 6 forks source link

Dropbox icon looks... interesting #6

Open vanoudt opened 8 years ago

vanoudt commented 8 years ago

Very useful extension for apps that don't work properly with SNI! Thank you. :-) I've got a COPR repo of this already since it's such a lot of use!

I'm having an issue with Dropbox. [Well, the first is that it's a Qt app that doesn't work with SNI... but I digress! :-)] The icon appears and can be interacted with, but is tiny and... strange! Here's a screenshot! dropboxisodd

paulolieuthier commented 8 years ago

@vanoudt Dropbox doesn't work because it is bundled with its own compiled version of the Qt libraries. It you delete $installdir/libQt5*, $installdir/qt.conf and $installdir/plugins/platforms/libqxcb.so, Dropbox will become an SNI.

vanoudt commented 8 years ago

Yep - I've been doing that for ages (on Fedora 22)! The problem is that now that I'm on Fedora 23, with Qt 5.5.0, it doesn't work. It just says:

!! (Qt:Fatal) This application failed to start because it could not find or load the Qt platform plugin "xcb".

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, xcb.

Reinstalling the application may fix this problem. Alarm clock

I've contacted Dropbox support about this - nothing much from their side yet. At the moment, for me, the xembed stuff is all that works...

On Sat, Oct 3, 2015 at 8:16 PM, Paulo Lieuthier notifications@github.com wrote:

@vanoudt https://github.com/vanoudt Dropbox doesn't work because it is bundled with its own compiled version of the Qt libraries. It you delete $installdir/libQt5*, $installdir/qt.conf and $installdir/plugins/platforms/libqxcb.so, Dropbox will become an SNI.

— Reply to this email directly or view it on GitHub https://github.com/davidedmundson/xembed-sni-proxy/issues/6#issuecomment-145243513 .

davidedmundson commented 8 years ago

You need your xcb plugin to match the Qt version that DropBox uses.

I've heard new dropbox uses a newer Qt so that gives us the automatic SNI support.

However, as for this: It's something I need to fix in here anyway, if it affects dropbox, it's doubtlessly going to affect $otherStupidApp.

vanoudt commented 8 years ago

:-) That makes sense. (From what I can tell, they're on a 5.4ish version!) If there's anything I can do to help/test/whatever - just say!

vanoudt commented 8 years ago

Looks like it might be picking up some memory somewhere. Relaunched it and got this. Note the very small icon, and also the 3 copies of a mouse cursor! dropbox-xembed

vanoudt commented 8 years ago

With the latest revision, (77d78c3daba19f039eec0a3874a87cb006c235ef), the icon is now the right size, but the background is still corrupted. (Sometimes black, sometimes not, sometimes grabbing other bits of screen real-estate from memory)

tehnick commented 8 years ago

@vanoudt

Yep - I've been doing that for ages (on Fedora 22)! The problem is that now that I'm on Fedora 23, with Qt 5.5.0, it doesn't work.

You may download Qt 5.4.2 libraries from official Qt website and replace libraries from Dropbox package by them.

tehnick commented 8 years ago

@davidedmundson

However, as for this: It's something I need to fix in here anyway, if it affects dropbox, it's doubtlessly going to affect $otherStupidApp.

I think you are mistaken here. Have you heard about any other proprietary program which uses Qt5 libraries in the same way as Dropbox?

tehnick commented 8 years ago

@vanoudt

but the background is still corrupted. (Sometimes black, sometimes not, sometimes grabbing other bits of screen real-estate from memory)

I failed to see how such bugs in Qt5 xembed systray may be fixed in xembed-sni-proxy. (The size of icon completely is another issue.)

minlexx commented 8 years ago

Have you heard about any other proprietary program which uses Qt5 libraries in the same way as Dropbox?

Teamspeak 3 client, for example (no systray icon by default). But if you remove libQt5*.so shipped with it or symlink them to system ones, it will suddenly show systray icon ;) sni-qt working.

Crazy-Hopper commented 8 years ago

@tehnick

I failed to see how such bugs in Qt5 xembed systray may be fixed in xembed-sni-proxy.

Note has to be taken that wmsystemtray (pure xembed) works correctly with dropbox. So does libappindicator.

davidedmundson commented 8 years ago

I know why Dropbox looks "interesting".

Qt tries to be clever and take a snapshot of the container window before it paints on top of it. It's to give the illusion of alpha in older rubbish systrays.

For me generally I "solve" this alpha problem by only copying the embedded window, not the full container - but Qt trying to be clever ends up hurting itself.

Will try turning my container into a QRasterWindow and paint known contents in there.

Crazy-Hopper commented 8 years ago

That behaviour was probably introduced in Qt5, because neither Psi, nor Skype exhibit this.

davidedmundson commented 8 years ago

it seems it's been here for a while, but it depends on how the sys tray widget is created

Dropbox must be doing something weird.

davidedmundson commented 8 years ago

Bah, made that change in a branch. Didn't do anything. Wish I could see Dropbox code, could solve this in minutes.

vanoudt commented 8 years ago

:-) Then again, if we could see the dropbox code we'd just enable the SNI support!