Skip to content
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

"Close to taskbar" should be disabled if no taskbar is available #28646

Closed
WhyNotHugo opened this issue Nov 13, 2024 · 10 comments
Closed

"Close to taskbar" should be disabled if no taskbar is available #28646

WhyNotHugo opened this issue Nov 13, 2024 · 10 comments

Comments

@WhyNotHugo
Copy link
Contributor

Steps to reproduce

  1. Make sure that no taskbar implementation is running
  2. Start telegram-desktop
  3. Go to Settings > Advanced > System Integration
  4. The Close to taskbar option is available. Toggling it makes the main window non-closable.

Expected behaviour

The Close to taskbar option should be unchecked and disabled if there is no taskbar.

Actual behaviour

The Close to taskbar option is enabled, even if there is no taskbar. If it is checked, attempting to close the main window does nothing; the window can no longer be closed.

Operating system

Alpine Linux (edge)

Version of Telegram Desktop

telegram-desktop-5.7.2-r1

Installation source

Other (unofficial) source

Crash ID

n/a

Logs

n/a
@WhyNotHugo WhyNotHugo added the bug label Nov 13, 2024
@WhyNotHugo WhyNotHugo changed the title "Close to taskbar" should be disabled if no taskbar is running "Close to taskbar" should be disabled if no taskbar is available Nov 13, 2024
@ilya-fedin
Copy link
Contributor

ilya-fedin commented Nov 13, 2024

This is impossible to implement, there's no API to know whether it's available

@WhyNotHugo
Copy link
Contributor Author

You're logging an error in cases where it is not available:

QDBusTrayIcon encountered a D-Bus error: QDBusError("org.freedesktop.DBus.Error.ServiceUnknown", "org.freedesktop.DBus.Error.ServiceUnknown")

You're trying to connect to a service. If the connection fails, then you know that it is not available.

@ilya-fedin
Copy link
Contributor

It's Qt, not me and it's about tray, not taskbar. You can have a taskbar while not having tray.

@WhyNotHugo
Copy link
Contributor Author

You can have a taskbar while not having tray.

Sorry, I haven't used Windows in many years. Isn't the taskbar the entire bar, and the tray the portion of the bar where icons are rendered?

What's the difference here? Wouldn't "close to taskbar" show an icon in the tray?

@ilya-fedin
Copy link
Contributor

Isn't the taskbar the entire bar, and the tray the portion of the bar where icons are rendered?

No. Taskbar (or sometimes dock - when it looks like the macos thing) is the list of open windows. On Windows, it's also the entire panel IIRC. Tray is the area with those icons providing status for things like network connection, volume level, status icons of various apps (thus also referred to as status area or notification area).

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Nov 14, 2024

When the system has tray and the tray icon is active, the "Close to taskbar" checkbox is hidden. It's here to provide a way to run in background even without tray.

@WhyNotHugo
Copy link
Contributor Author

If I understand correctly, "Close to taskbar" is functionally "Minimise instead of closing".

I guess that closing is a no-op for me because my desktop doesn't implement minimisation.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Nov 14, 2024

If I understand correctly, "Close to taskbar" is functionally "Minimise instead of closing".

That's right.

I guess that closing is a no-op for me because my desktop doesn't implement minimisation.

You mean clicking on the cross does nothing? If it's that then sounds like a real issue indeed. But then I don't see a way to fix it given that I don't want to talk to native Wayland APIs directly.

@ilya-fedin
Copy link
Contributor

I guess what you actually want is #8941 (a separate option to run in background, without side effects of using tray or taskbar)?

@ilya-fedin
Copy link
Contributor

There's also a hack for GNOME users, that if org.gnome.desktop.wm.preferences button-layout has close button but no minimize button, Close to taskbar gets hidden and tdesktop just always runs in background.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants