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
Synology-Drive Icon is not correctly positioned #1679
Comments
I have the same issue here. I'm on manjaro. |
This looks very similar to #545 There the issue was that the tray icon was not actually attached to polybar. A few questions:
|
For me
|
Was able to reproduce this now. It doesn't happen with stalonetray, so this seems like a polybar bug. |
Just for confirmation too, I have the same behavior as tramhao with 'bottom = true'. |
If this helps at all, I also experience this weird behavior with qtile. Before I ran KDE, there it happend as well. |
This does not change anything for me. |
This still occurs, is there any way we could assist in fixing this? |
@moonwitch I think the greatest help here would be to dig into the code, run polybar under |
Alright. Never done that before, but this is an excellent reason and method
to learn. Will try my best.
Sent while on the road, errors may occur.
…On Thu, Jan 23, 2020, 23:55 Patrick Ziegler ***@***.***> wrote:
@moonwitch <https://github.com/moonwitch> I think the greatest help here
would be to dig into the code, run polybar under gdb and figure out where
things go wrong compared to other well-behaving tray icons. From there it
should be easier to figure out why this happens for this particular icon
and not others.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1679?email_source=notifications&email_token=AAADVV634O2IM576WMNYMBLQ7IN6XA5CNFSM4G4HE5IKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJZE3BY#issuecomment-577916295>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAADVV5ID2OCLAD7KVTT6WDQ7IN6XANCNFSM4G4HE5IA>
.
|
Ok; I have no idea if I am doing this right. Here's what I did: Since the trace only mentions hexadecimal info; I needed to know which mention was which. So I launched Cloud Drive; but the info I got from xprop isn't found in the polybar trace.
The odd thing is; if I relaunch it all; I actually do spot ONE big difference. This is xprop on relaunch:
Note the 'User specified location'. |
I've tried for a few hours to get the user specified location (which I am now certain of is the cause) to change. I fear it's coded into cloud-drive-ui, not a Polybar issue as Polybar repects the WM_SIZE_HINTS. |
@moonwitch Thanks a lot for digging deeper here. I don't think polybar ever reads any position information from the tray icon, it is the one that sets it. When adding the cloud-drive-ui tray icon, polybar doesn't get further than calling I have now read the manpage for
So it means that the tray container window has a different depth than the cloud-drive-ui tray icon window. I really have no idea how to fix this because when we just not configure the background pixmap of the tray icon, we get some weird artifacts for some windows. And just printing an error for this icon doesn't seem like a good idea either. It's getting late here and I really don't have more time to spend on this, but I'll try to come back at a later point and see what can be done and maybe compare with how stalonetray handles this. If any of you have any idea how to tackle this, please let us know ;) For reference, here is the patch I am using right now: diff --git a/src/x11/tray_manager.cpp b/src/x11/tray_manager.cpp
index da2793b4..8b7dc9c8 100644
--- a/src/x11/tray_manager.cpp
+++ b/src/x11/tray_manager.cpp
@@ -769,7 +769,7 @@ void tray_manager::process_docking_request(xcb_window_t win) {
m_log.trace("tray: Map client");
m_connection.map_window_checked(client->window());
}
- } catch (const xpp::x::error::window& err) {
+ } catch (const exception& err) {
m_log.err("Failed to setup tray client, removing... (%s)", err.what());
remove_client(win, false);
} With this the icon is no longer misplaced because it is not displayed because polybar now properly fails to setup the tray icon and removes it again. |
I am way in over my head for this, but I won't give up. I feel the issue is the XCB implementation of cloud-drive-ui, however I am not finding the source for it. Going to look at that too, but this is 100% new for me. |
I know it's been quite a while on this but I'm having this same issue. Anyone have any leads on how to fix this or a workaround for it? |
In the meantime I switched to Xmonad and use stalonetray as a systemtray. It happens to work just fine with the synology icon. |
Synology seem to have fixed the issue in version |
Same for me! |
Same for me as well! |
Same here! |
The AUR-Page https://aur.archlinux.org/packages/synology-drive/ links to .deb-Files, so I can say: works on Ubuntu 18.04 LTS as well. |
XCB_BACK_PIXMAP_PARENT_RELATIVE requires that the client has the same depth as the tray window. There was an issue with dropbox having a depth of 32 and the tray window having a depth of 24 that caused the configuration of the icon to fail. It would then be displayed outside of the bar because the catch block was not hit (different exception). We now just don't configure XCB_CW_BACK_PIXMAP. This seems to work and is also what stalonetray does. This does not fix the issue with dropbox having an arbitrary background. Fixes polybar#1679 Fixes polybar#2430
Describe the issue
I'm on Archlinux and I have installed the package "synology-drive" from AUR (https://aur.archlinux.org/packages/synology-drive/). When I started the application, the icon did not have been correctly placed on the bar. In fact, the icon floating to the left whereas my systray is positioned to the right.
Expected behavior:
The icon of this app must be placed in systray block with the correct size.
Actual behavior:
the regular icons are well placed in systray emplacement but the icon of synology-drive floating to the left.
Was it working before?
All working fine excepting that.
To Reproduce
Install synology-drive and launch the application.
Polybar Log
No log line was written during the test.
Screenshots
https://imgur.com/KEo6G4D
Environment:
polybar -vvv
:The text was updated successfully, but these errors were encountered: