-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Cannot minimize Mumble with bHideInTray=true on Ubuntu 16.10/Unity 7.5.0 #3028
Comments
Even worse: Once minimized like this, the menu is inacessible. |
I can minimise but it somehow disappears from the sidebar (but remains working). Relaunching makes the GUI visible but not the menu items. |
Not the case on KDE Neon (Ubuntu based). However we have #3977 which is also very ugly. |
Hartmnt
added a commit
to Hartmnt/mumble
that referenced
this issue
Jul 7, 2024
The old tray icon implementation was very old and contained a lot of workaround for things that probably are no longer an issue. Furthermore, the event loop was modified in a way such that it could end up in an infinite loop draining CPU time and rendering Mumble unusable. Based on the new Qt5 implementation, this commit introduces a complete rewrite of the tray icon. The following things should be noted: * We assume the information in the Qt documentation [1] is valid. This means that all versions of Windows, all Linux window managers/compositors that implement the d-bus StatusNotifierItem specification, and all versions of macos support the functionality of QSystemTrayIcon and its notification system. That means we can drop the platform-specific code branches and handle messages directly with QSystemTrayIcon::sendMessage. This should for example also be true for recent versions of Gnome, which do not have an actual system tray, but implement the d-bus StatusNotifierItem specification. Therefore, we can actually merge and simplify the notification code for Windows and Unix*. * With regards to the bullet point above, we only limit the "hide to tray" functionality behind QSystemTrayIcon::isSystemTrayAvailable (because otherwise you would not get the Mumble window back without binding a shortcut first). Other code branches that were previously limited when isSystemTrayAvailable returned false were removed. According to Qt, the QSystemTrayIcon code does not actually care if a system tray is available and will even retroactively add itself if a tray becomes available after the application was started. * On (X)Wayland, the minimize button in the window frame does not trigger a minimize change event. This means that users with such a system may only be able to "hide to tray" by 1) pressing the close button in the window frame and enabling "minimize instead of close" 2) clicking the tray icon or the tray icon hide action or 3) binding a shortcut to hide the window. This is either a bug or a deliberate decision by Qt or Wayland and we have no way to do anything about that. (QTBUG-74310) * The "messageClicked" event is buggy in Qt on some platforms. That means that clicking the system notification spawned by Mumble via QSystemTrayIcon::sendMessage will (on some systems) never trigger anything especially not showing and activating the window. This is a long-standing bug in Qt (QTBUG-87329), but we have absolutely no way to work around this. The event is correctly hooked up in Mumble and if this is ever fixed in Qt, this will start working again automatically. * The tray icon has been redesigned according to state-of-the-art tray icon design guidelines [2]. Which basically just means: 1) d9a2d47 has been reverted to provide the user with a consistent menu 2) The main action of the tray icon (toggle show/hide) is the first entry in the context menu and the default action when the icon is clicked and 3) the TalkingUI toggle action was added. Actions for double and middle mouse clicks were removed as they might have contributed to infinite loops. * There is no way in Windows to show and activate a window that is not part of the current active process. If you have Mumble running in the background and receive a message, we can not raise the Window without you clicking the Mumble taskbar item or tray icon yourself. This is deliberate by Microsoft and can and should not be circumvented. (mumble-voip#5701) * This also fixes the case where the Mumble MainWindow would disappear when pressing "OK" in the settings dialog. This happened because users would have "minimize to tray" and "minimize on close" enabled. [1] https://doc.qt.io/qt-5/qsystemtrayicon.html#details https://doc.qt.io/qt-6/qsystemtrayicon.html#details [2] https://learn.microsoft.com/en-us/windows/win32/uxguide/winenv-notification Fixes mumble-voip#1486 Fixes mumble-voip#3028 Fixes mumble-voip#3722 Fixes mumble-voip#3977 Fixes mumble-voip#3999 Fixes mumble-voip#5012
Hartmnt
added a commit
to Hartmnt/mumble
that referenced
this issue
Jul 8, 2024
The old tray icon implementation was very old and contained a lot of workaround for things that probably are no longer an issue. Furthermore, the event loop was modified in a way such that it could end up in an infinite loop draining CPU time and rendering Mumble unusable. Based on the new Qt5 implementation, this commit introduces a complete rewrite of the tray icon. The following things should be noted: * We assume the information in the Qt documentation [1] is valid. This means that all versions of Windows, all Linux window managers/compositors that implement the d-bus StatusNotifierItem specification, and all versions of macos support the functionality of QSystemTrayIcon and its notification system. That means we can drop the platform-specific code branches and handle messages directly with QSystemTrayIcon::sendMessage. This should for example also be true for recent versions of Gnome, which do not have an actual system tray, but implement the d-bus StatusNotifierItem specification. Therefore, we can actually merge and simplify the notification code for Windows and Unix*. * With regards to the bullet point above, we only limit the "hide to tray" functionality behind QSystemTrayIcon::isSystemTrayAvailable (because otherwise you would not get the Mumble window back without binding a shortcut first). Other code branches that were previously limited when isSystemTrayAvailable returned false were removed. According to Qt, the QSystemTrayIcon code does not actually care if a system tray is available and will even retroactively add itself if a tray becomes available after the application was started. * On (X)Wayland, the minimize button in the window frame does not trigger a minimize change event. This means that users with such a system may only be able to "hide to tray" by 1) pressing the close button in the window frame and enabling "minimize instead of close" 2) clicking the tray icon or the tray icon hide action or 3) binding a shortcut to hide the window. This is either a bug or a deliberate decision by Qt or Wayland and we have no way to do anything about that. (QTBUG-74310) * The "messageClicked" event is buggy in Qt on some platforms. That means that clicking the system notification spawned by Mumble via QSystemTrayIcon::sendMessage will (on some systems) never trigger anything especially not showing and activating the window. This is a long-standing bug in Qt (QTBUG-87329), but we have absolutely no way to work around this. The event is correctly hooked up in Mumble and if this is ever fixed in Qt, this will start working again automatically. * The tray icon has been redesigned according to state-of-the-art tray icon design guidelines [2]. Which basically just means: 1) d9a2d47 has been reverted to provide the user with a consistent menu 2) The main action of the tray icon (toggle show/hide) is the first entry in the context menu and the default action when the icon is clicked and 3) the TalkingUI toggle action was added. Actions for double and middle mouse clicks were removed as they might have contributed to infinite loops. * There is no way in Windows to show and activate a window that is not part of the current active process. If you have Mumble running in the background and receive a message, we can not raise the Window without you clicking the Mumble taskbar item or tray icon yourself. This is deliberate by Microsoft and can and should not be circumvented. (mumble-voip#5701) * This also fixes the case where the Mumble MainWindow would disappear when pressing "OK" in the settings dialog. This happened because users would have "minimize to tray" and "minimize on close" enabled. [1] https://doc.qt.io/qt-5/qsystemtrayicon.html#details https://doc.qt.io/qt-6/qsystemtrayicon.html#details [2] https://learn.microsoft.com/en-us/windows/win32/uxguide/winenv-notification Fixes mumble-voip#1486 Fixes mumble-voip#3028 Fixes mumble-voip#3722 Fixes mumble-voip#3977 Fixes mumble-voip#3999 Fixes mumble-voip#5012
Hartmnt
added a commit
to Hartmnt/mumble
that referenced
this issue
Jul 8, 2024
The old tray icon implementation was very old and contained a lot of workaround for things that probably are no longer an issue. Furthermore, the event loop was modified in a way such that it could end up in an infinite loop draining CPU time and rendering Mumble unusable. Based on the new Qt5 implementation, this commit introduces a complete rewrite of the tray icon. The following things should be noted: * We assume the information in the Qt documentation [1] is valid. This means that all versions of Windows, all Linux window managers/compositors that implement the d-bus StatusNotifierItem specification, and all versions of macos support the functionality of QSystemTrayIcon and its notification system. That means we can drop the platform-specific code branches and handle messages directly with QSystemTrayIcon::sendMessage. This should for example also be true for recent versions of Gnome, which do not have an actual system tray, but implement the d-bus StatusNotifierItem specification. Therefore, we can actually merge and simplify the notification code for Windows and Unix*. * With regards to the bullet point above, we only limit the "hide to tray" functionality behind QSystemTrayIcon::isSystemTrayAvailable (because otherwise you would not get the Mumble window back without binding a shortcut first). Other code branches that were previously limited when isSystemTrayAvailable returned false were removed. According to Qt, the QSystemTrayIcon code does not actually care if a system tray is available and will even retroactively add itself if a tray becomes available after the application was started. * On (X)Wayland, the minimize button in the window frame does not trigger a minimize change event. This means that users with such a system may only be able to "hide to tray" by 1) pressing the close button in the window frame and enabling "minimize instead of close" 2) clicking the tray icon or the tray icon hide action or 3) binding a shortcut to hide the window. This is either a bug or a deliberate decision by Qt or Wayland and we have no way to do anything about that. (QTBUG-74310) * The "messageClicked" event is buggy in Qt on some platforms. That means that clicking the system notification spawned by Mumble via QSystemTrayIcon::sendMessage will (on some systems) never trigger anything especially not showing and activating the window. This is a long-standing bug in Qt (QTBUG-87329), but we have absolutely no way to work around this. The event is correctly hooked up in Mumble and if this is ever fixed in Qt, this will start working again automatically. * The tray icon has been redesigned according to state-of-the-art tray icon design guidelines [2]. Which basically just means: 1) d9a2d47 has been reverted to provide the user with a consistent menu 2) The main action of the tray icon (toggle show/hide) is the first entry in the context menu and the default action when the icon is clicked and 3) the TalkingUI toggle action was added. Actions for double and middle mouse clicks were removed as they might have contributed to infinite loops. * There is no way in Windows to show and activate a window that is not part of the current active process. If you have Mumble running in the background and receive a message, we can not raise the Window without you clicking the Mumble taskbar item or tray icon yourself. This is deliberate by Microsoft and can and should not be circumvented. (mumble-voip#5701) * This also fixes the case where the Mumble MainWindow would disappear when pressing "OK" in the settings dialog. This happened because users would have "minimize to tray" and "minimize on close" enabled. [1] https://doc.qt.io/qt-5/qsystemtrayicon.html#details https://doc.qt.io/qt-6/qsystemtrayicon.html#details [2] https://learn.microsoft.com/en-us/windows/win32/uxguide/winenv-notification Fixes mumble-voip#1486 Fixes mumble-voip#3028 Fixes mumble-voip#3722 Fixes mumble-voip#3977 Fixes mumble-voip#3999 Fixes mumble-voip#5012
Hartmnt
added a commit
to Hartmnt/mumble
that referenced
this issue
Jul 8, 2024
The old tray icon implementation was very old and contained a lot of workaround for things that probably are no longer an issue. Furthermore, the event loop was modified in a way such that it could end up in an infinite loop draining CPU time and rendering Mumble unusable. Based on the new Qt5 implementation, this commit introduces a complete rewrite of the tray icon. The following things should be noted: * We assume the information in the Qt documentation [1] is valid. This means that all versions of Windows, all Linux window managers/compositors that implement the d-bus StatusNotifierItem specification, and all versions of macos support the functionality of QSystemTrayIcon and its notification system. That means we can drop the platform-specific code branches and handle messages directly with QSystemTrayIcon::sendMessage. This should for example also be true for recent versions of Gnome, which do not have an actual system tray, but implement the d-bus StatusNotifierItem specification. Therefore, we can actually merge and simplify the notification code for Windows and Unix*. * With regards to the bullet point above, we only limit the "hide to tray" functionality behind QSystemTrayIcon::isSystemTrayAvailable (because otherwise you would not get the Mumble window back without binding a shortcut first). Other code branches that were previously limited when isSystemTrayAvailable returned false were removed. According to Qt, the QSystemTrayIcon code does not actually care if a system tray is available and will even retroactively add itself if a tray becomes available after the application was started. * On (X)Wayland, the minimize button in the window frame does not trigger a minimize change event. This means that users with such a system may only be able to "hide to tray" by 1) pressing the close button in the window frame and enabling "minimize instead of close" 2) clicking the tray icon or the tray icon hide action or 3) binding a shortcut to hide the window. This is either a bug or a deliberate decision by Qt or Wayland and we have no way to do anything about that. (QTBUG-74310) * The "messageClicked" event is buggy in Qt on some platforms. That means that clicking the system notification spawned by Mumble via QSystemTrayIcon::sendMessage will (on some systems) never trigger anything especially not showing and activating the window. This is a long-standing bug in Qt (QTBUG-87329), but we have absolutely no way to work around this. The event is correctly hooked up in Mumble and if this is ever fixed in Qt, this will start working again automatically. * The tray icon has been redesigned according to state-of-the-art tray icon design guidelines [2]. Which basically just means: 1) d9a2d47 has been reverted to provide the user with a consistent menu 2) The main action of the tray icon (toggle show/hide) is the first entry in the context menu and the default action when the icon is clicked and 3) the TalkingUI toggle action was added. Actions for double and middle mouse clicks were removed as they might have contributed to infinite loops. * There is no way in Windows to show and activate a window that is not part of the current active process. If you have Mumble running in the background and receive a message, we can not raise the Window without you clicking the Mumble taskbar item or tray icon yourself. This is deliberate by Microsoft and can and should not be circumvented. (mumble-voip#5701) * This also fixes the case where the Mumble MainWindow would disappear when pressing "OK" in the settings dialog. This happened because users would have "minimize to tray" and "minimize on close" enabled. [1] https://doc.qt.io/qt-5/qsystemtrayicon.html#details https://doc.qt.io/qt-6/qsystemtrayicon.html#details [2] https://learn.microsoft.com/en-us/windows/win32/uxguide/winenv-notification Fixes mumble-voip#1486 Fixes mumble-voip#3028 Fixes mumble-voip#3722 Fixes mumble-voip#3977 Fixes mumble-voip#3999 Fixes mumble-voip#5012
Hartmnt
added a commit
to Hartmnt/mumble
that referenced
this issue
Sep 14, 2024
The old tray icon implementation was very old and contained a lot of workaround for things that probably are no longer an issue. Furthermore, the event loop was modified in a way such that it could end up in an infinite loop draining CPU time and rendering Mumble unusable. Based on the new Qt5 implementation, this commit introduces a complete rewrite of the tray icon. The following things should be noted: * We assume the information in the Qt documentation [1] is valid. This means that all versions of Windows, all Linux window managers/compositors that implement the d-bus StatusNotifierItem specification, and all versions of macos support the functionality of QSystemTrayIcon and its notification system. That means we can drop the platform-specific code branches and handle messages directly with QSystemTrayIcon::sendMessage. This should for example also be true for recent versions of Gnome, which do not have an actual system tray, but implement the d-bus StatusNotifierItem specification. Therefore, we can actually merge and simplify the notification code for Windows and Unix*. * With regards to the bullet point above, we only limit the "hide to tray" functionality behind QSystemTrayIcon::isSystemTrayAvailable (because otherwise you would not get the Mumble window back without binding a shortcut first). Other code branches that were previously limited when isSystemTrayAvailable returned false were removed. According to Qt, the QSystemTrayIcon code does not actually care if a system tray is available and will even retroactively add itself if a tray becomes available after the application was started. * On (X)Wayland, the minimize button in the window frame does not trigger a minimize change event. This means that users with such a system may only be able to "hide to tray" by 1) pressing the close button in the window frame and enabling "minimize instead of close" 2) clicking the tray icon or the tray icon hide action or 3) binding a shortcut to hide the window. This is either a bug or a deliberate decision by Qt or Wayland and we have no way to do anything about that. (QTBUG-74310) * The "messageClicked" event is buggy in Qt on some platforms. That means that clicking the system notification spawned by Mumble via QSystemTrayIcon::sendMessage will (on some systems) never trigger anything especially not showing and activating the window. This is a long-standing bug in Qt (QTBUG-87329), but we have absolutely no way to work around this. The event is correctly hooked up in Mumble and if this is ever fixed in Qt, this will start working again automatically. * The tray icon has been redesigned according to state-of-the-art tray icon design guidelines [2]. Which basically just means: 1) d9a2d47 has been reverted to provide the user with a consistent menu 2) The main action of the tray icon (toggle show/hide) is the first entry in the context menu and the default action when the icon is clicked and 3) the TalkingUI toggle action was added. Actions for double and middle mouse clicks were removed as they might have contributed to infinite loops. * There is no way in Windows to show and activate a window that is not part of the current active process. If you have Mumble running in the background and receive a message, we can not raise the Window without you clicking the Mumble taskbar item or tray icon yourself. This is deliberate by Microsoft and can and should not be circumvented. (mumble-voip#5701) * This also fixes the case where the Mumble MainWindow would disappear when pressing "OK" in the settings dialog. This happened because users would have "minimize to tray" and "minimize on close" enabled. [1] https://doc.qt.io/qt-5/qsystemtrayicon.html#details https://doc.qt.io/qt-6/qsystemtrayicon.html#details [2] https://learn.microsoft.com/en-us/windows/win32/uxguide/winenv-notification Fixes mumble-voip#1486 Fixes mumble-voip#3028 Fixes mumble-voip#3722 Fixes mumble-voip#3977 Fixes mumble-voip#3999 Fixes mumble-voip#5012
Hartmnt
added a commit
to Hartmnt/mumble
that referenced
this issue
Sep 16, 2024
The old tray icon implementation was very old and contained a lot of workaround for things that probably are no longer an issue. Furthermore, the event loop was modified in a way such that it could end up in an infinite loop draining CPU time and rendering Mumble unusable. Based on the new Qt5 implementation, this commit introduces a complete rewrite of the tray icon. The following things should be noted: * We assume the information in the Qt documentation [1] is valid. This means that all versions of Windows, all Linux window managers/compositors that implement the d-bus StatusNotifierItem specification, and all versions of macos support the functionality of QSystemTrayIcon and its notification system. That means we can drop the platform-specific code branches and handle messages directly with QSystemTrayIcon::sendMessage. This should for example also be true for recent versions of Gnome, which do not have an actual system tray, but implement the d-bus StatusNotifierItem specification. Therefore, we can actually merge and simplify the notification code for Windows and Unix*. * With regards to the bullet point above, we only limit the "hide to tray" functionality behind QSystemTrayIcon::isSystemTrayAvailable (because otherwise you would not get the Mumble window back without binding a shortcut first). Other code branches that were previously limited when isSystemTrayAvailable returned false were removed. According to Qt, the QSystemTrayIcon code does not actually care if a system tray is available and will even retroactively add itself if a tray becomes available after the application was started. * On (X)Wayland, the minimize button in the window frame does not trigger a minimize change event. This means that users with such a system may only be able to "hide to tray" by 1) pressing the close button in the window frame and enabling "minimize instead of close" 2) clicking the tray icon or the tray icon hide action or 3) binding a shortcut to hide the window. This is either a bug or a deliberate decision by Qt or Wayland and we have no way to do anything about that. (QTBUG-74310) * The "messageClicked" event is buggy in Qt on some platforms. That means that clicking the system notification spawned by Mumble via QSystemTrayIcon::sendMessage will (on some systems) never trigger anything especially not showing and activating the window. This is a long-standing bug in Qt (QTBUG-87329), but we have absolutely no way to work around this. The event is correctly hooked up in Mumble and if this is ever fixed in Qt, this will start working again automatically. * The tray icon has been redesigned according to state-of-the-art tray icon design guidelines [2]. Which basically just means: 1) d9a2d47 has been reverted to provide the user with a consistent menu 2) The main action of the tray icon (toggle show/hide) is the first entry in the context menu and the default action when the icon is clicked and 3) the TalkingUI toggle action was added. Actions for double and middle mouse clicks were removed as they might have contributed to infinite loops. * There is no way in Windows to show and activate a window that is not part of the current active process. If you have Mumble running in the background and receive a message, we can not raise the Window without you clicking the Mumble taskbar item or tray icon yourself. This is deliberate by Microsoft and can and should not be circumvented. (mumble-voip#5701) * This also fixes the case where the Mumble MainWindow would disappear when pressing "OK" in the settings dialog. This happened because users would have "minimize to tray" and "minimize on close" enabled. [1] https://doc.qt.io/qt-5/qsystemtrayicon.html#details https://doc.qt.io/qt-6/qsystemtrayicon.html#details [2] https://learn.microsoft.com/en-us/windows/win32/uxguide/winenv-notification Fixes mumble-voip#1486 Fixes mumble-voip#3028 Fixes mumble-voip#3722 Fixes mumble-voip#3977 Fixes mumble-voip#3999 Fixes mumble-voip#5012
Hartmnt
added a commit
to Hartmnt/mumble
that referenced
this issue
Sep 16, 2024
The old tray icon implementation was very old and contained a lot of workaround for things that probably are no longer an issue. Furthermore, the event loop was modified in a way such that it could end up in an infinite loop draining CPU time and rendering Mumble unusable. Based on the new Qt5 implementation, this commit introduces a complete rewrite of the tray icon. The following things should be noted: * We assume the information in the Qt documentation [1] is valid. This means that all versions of Windows, all Linux window managers/compositors that implement the d-bus StatusNotifierItem specification, and all versions of macos support the functionality of QSystemTrayIcon and its notification system. That means we can drop the platform-specific code branches and handle messages directly with QSystemTrayIcon::sendMessage. This should for example also be true for recent versions of Gnome, which do not have an actual system tray, but implement the d-bus StatusNotifierItem specification. Therefore, we can actually merge and simplify the notification code for Windows and Unix*. * With regards to the bullet point above, we only limit the "hide to tray" functionality behind QSystemTrayIcon::isSystemTrayAvailable (because otherwise you would not get the Mumble window back without binding a shortcut first). Other code branches that were previously limited when isSystemTrayAvailable returned false were removed. According to Qt, the QSystemTrayIcon code does not actually care if a system tray is available and will even retroactively add itself if a tray becomes available after the application was started. * On (X)Wayland, the minimize button in the window frame does not trigger a minimize change event. This means that users with such a system may only be able to "hide to tray" by 1) pressing the close button in the window frame and enabling "minimize instead of close" 2) clicking the tray icon or the tray icon hide action or 3) binding a shortcut to hide the window. This is either a bug or a deliberate decision by Qt or Wayland and we have no way to do anything about that. (QTBUG-74310) * The "messageClicked" event is buggy in Qt on some platforms. That means that clicking the system notification spawned by Mumble via QSystemTrayIcon::sendMessage will (on some systems) never trigger anything especially not showing and activating the window. This is a long-standing bug in Qt (QTBUG-87329), but we have absolutely no way to work around this. The event is correctly hooked up in Mumble and if this is ever fixed in Qt, this will start working again automatically. * The tray icon has been redesigned according to state-of-the-art tray icon design guidelines [2]. Which basically just means: 1) d9a2d47 has been reverted to provide the user with a consistent menu 2) The main action of the tray icon (toggle show/hide) is the first entry in the context menu and the default action when the icon is clicked and 3) the TalkingUI toggle action was added. Actions for double and middle mouse clicks were removed as they might have contributed to infinite loops. * There is no way in Windows to show and activate a window that is not part of the current active process. If you have Mumble running in the background and receive a message, we can not raise the Window without you clicking the Mumble taskbar item or tray icon yourself. This is deliberate by Microsoft and can and should not be circumvented. (mumble-voip#5701) * This also fixes the case where the Mumble MainWindow would disappear when pressing "OK" in the settings dialog. This happened because users would have "minimize to tray" and "minimize on close" enabled. [1] https://doc.qt.io/qt-5/qsystemtrayicon.html#details https://doc.qt.io/qt-6/qsystemtrayicon.html#details [2] https://learn.microsoft.com/en-us/windows/win32/uxguide/winenv-notification Fixes mumble-voip#1486 Fixes mumble-voip#3028 Fixes mumble-voip#3722 Fixes mumble-voip#3977 Fixes mumble-voip#3999 Fixes mumble-voip#5012
Hartmnt
added a commit
to Hartmnt/mumble
that referenced
this issue
Sep 16, 2024
The old tray icon implementation was very old and contained a lot of workaround for things that probably are no longer an issue. Furthermore, the event loop was modified in a way such that it could end up in an infinite loop draining CPU time and rendering Mumble unusable. Based on the new Qt5 implementation, this commit introduces a complete rewrite of the tray icon. The following things should be noted: * We assume the information in the Qt documentation [1] is valid. This means that all versions of Windows, all Linux window managers/compositors that implement the d-bus StatusNotifierItem specification, and all versions of macos support the functionality of QSystemTrayIcon and its notification system. That means we can drop the platform-specific code branches and handle messages directly with QSystemTrayIcon::sendMessage. This should for example also be true for recent versions of Gnome, which do not have an actual system tray, but implement the d-bus StatusNotifierItem specification. Therefore, we can actually merge and simplify the notification code for Windows and Unix*. * With regards to the bullet point above, we only limit the "hide to tray" functionality behind QSystemTrayIcon::isSystemTrayAvailable (because otherwise you would not get the Mumble window back without binding a shortcut first). Other code branches that were previously limited when isSystemTrayAvailable returned false were removed. According to Qt, the QSystemTrayIcon code does not actually care if a system tray is available and will even retroactively add itself if a tray becomes available after the application was started. * On (X)Wayland, the minimize button in the window frame does not trigger a minimize change event. This means that users with such a system may only be able to "hide to tray" by 1) pressing the close button in the window frame and enabling "minimize instead of close" 2) clicking the tray icon or the tray icon hide action or 3) binding a shortcut to hide the window. This is either a bug or a deliberate decision by Qt or Wayland and we have no way to do anything about that. (QTBUG-74310) * The "messageClicked" event is buggy in Qt on some platforms. That means that clicking the system notification spawned by Mumble via QSystemTrayIcon::sendMessage will (on some systems) never trigger anything especially not showing and activating the window. This is a long-standing bug in Qt (QTBUG-87329), but we have absolutely no way to work around this. The event is correctly hooked up in Mumble and if this is ever fixed in Qt, this will start working again automatically. * The tray icon has been redesigned according to state-of-the-art tray icon design guidelines [2]. Which basically just means: 1) d9a2d47 has been reverted to provide the user with a consistent menu 2) The main action of the tray icon (toggle show/hide) is the first entry in the context menu and the default action when the icon is clicked and 3) the TalkingUI toggle action was added. Actions for double and middle mouse clicks were removed as they might have contributed to infinite loops. * There is no way in Windows to show and activate a window that is not part of the current active process. If you have Mumble running in the background and receive a message, we can not raise the Window without you clicking the Mumble taskbar item or tray icon yourself. This is deliberate by Microsoft and can and should not be circumvented. (mumble-voip#5701) * This also fixes the case where the Mumble MainWindow would disappear when pressing "OK" in the settings dialog. This happened because users would have "minimize to tray" and "minimize on close" enabled. [1] https://doc.qt.io/qt-5/qsystemtrayicon.html#details https://doc.qt.io/qt-6/qsystemtrayicon.html#details [2] https://learn.microsoft.com/en-us/windows/win32/uxguide/winenv-notification Fixes mumble-voip#1486 Fixes mumble-voip#3028 Fixes mumble-voip#3722 Fixes mumble-voip#3977 Fixes mumble-voip#3999 Fixes mumble-voip#5012
Hartmnt
added a commit
to Hartmnt/mumble
that referenced
this issue
Sep 16, 2024
The old tray icon implementation was very old and contained a lot of workaround for things that probably are no longer an issue. Furthermore, the event loop was modified in a way such that it could end up in an infinite loop draining CPU time and rendering Mumble unusable. Based on the new Qt5 implementation, this commit introduces a complete rewrite of the tray icon. The following things should be noted: * We assume the information in the Qt documentation [1] is valid. This means that all versions of Windows, all Linux window managers/compositors that implement the d-bus StatusNotifierItem specification, and all versions of macos support the functionality of QSystemTrayIcon and its notification system. That means we can drop the platform-specific code branches and handle messages directly with QSystemTrayIcon::sendMessage. This should for example also be true for recent versions of Gnome, which do not have an actual system tray, but implement the d-bus StatusNotifierItem specification. Therefore, we can actually merge and simplify the notification code for Windows and Unix*. * With regards to the bullet point above, we only limit the "hide to tray" functionality behind QSystemTrayIcon::isSystemTrayAvailable (because otherwise you would not get the Mumble window back without binding a shortcut first). Other code branches that were previously limited when isSystemTrayAvailable returned false were removed. According to Qt, the QSystemTrayIcon code does not actually care if a system tray is available and will even retroactively add itself if a tray becomes available after the application was started. * On (X)Wayland, the minimize button in the window frame does not trigger a minimize change event. This means that users with such a system may only be able to "hide to tray" by 1) pressing the close button in the window frame and enabling "minimize instead of close" 2) clicking the tray icon or the tray icon hide action or 3) binding a shortcut to hide the window. This is either a bug or a deliberate decision by Qt or Wayland and we have no way to do anything about that. (QTBUG-74310) * The "messageClicked" event is buggy in Qt on some platforms. That means that clicking the system notification spawned by Mumble via QSystemTrayIcon::sendMessage will (on some systems) never trigger anything especially not showing and activating the window. This is a long-standing bug in Qt (QTBUG-87329), but we have absolutely no way to work around this. The event is correctly hooked up in Mumble and if this is ever fixed in Qt, this will start working again automatically. * The tray icon has been redesigned according to state-of-the-art tray icon design guidelines [2]. Which basically just means: 1) d9a2d47 has been reverted to provide the user with a consistent menu 2) The main action of the tray icon (toggle show/hide) is the first entry in the context menu and the default action when the icon is clicked and 3) the TalkingUI toggle action was added. Actions for double and middle mouse clicks were removed as they might have contributed to infinite loops. * There is no way in Windows to show and activate a window that is not part of the current active process. If you have Mumble running in the background and receive a message, we can not raise the Window without you clicking the Mumble taskbar item or tray icon yourself. This is deliberate by Microsoft and can and should not be circumvented. (mumble-voip#5701) * This also fixes the case where the Mumble MainWindow would disappear when pressing "OK" in the settings dialog. This happened because users would have "minimize to tray" and "minimize on close" enabled. [1] https://doc.qt.io/qt-5/qsystemtrayicon.html#details https://doc.qt.io/qt-6/qsystemtrayicon.html#details [2] https://learn.microsoft.com/en-us/windows/win32/uxguide/winenv-notification Fixes mumble-voip#1486 Fixes mumble-voip#3028 Fixes mumble-voip#3722 Fixes mumble-voip#3977 Fixes mumble-voip#3999 Fixes mumble-voip#5012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When you minimize Mumble, it attempts to minimize, and quickly jumps back to its visible state.
See attached animated GIF for an example.
The text was updated successfully, but these errors were encountered: