-
Notifications
You must be signed in to change notification settings - Fork 816
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
Fix macOS bug where tray window causes spaces to switch #2677
Fix macOS bug where tray window causes spaces to switch #2677
Conversation
2adeab5
to
b5b4def
Compare
/rebase |
b5b4def
to
a6b9621
Compare
src/gui/systray.h
Outdated
@@ -29,6 +29,7 @@ namespace OCC { | |||
#ifdef Q_OS_OSX | |||
bool canOsXSendUserNotification(); | |||
void sendOsXUserNotification(const QString &title, const QString &message); | |||
void setTrayWindowLevelAndVisibleOnAllSpaces(QQuickWindow *qtWindow); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rename the parameter from qtWindow to window. Also seeing how it's used please change the type to QWindow.
src/gui/systray.mm
Outdated
@@ -1,4 +1,5 @@ | |||
#include <QString> | |||
#include <QQuickWindow> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please include QWindow instead.
src/gui/systray.mm
Outdated
@@ -41,4 +42,13 @@ void sendOsXUserNotification(const QString &title, const QString &message) | |||
[notification release]; | |||
} | |||
|
|||
void setTrayWindowLevelAndVisibleOnAllSpaces(QQuickWindow *qtWindow) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename the parameter and change its type please.
src/gui/systray.mm
Outdated
void setTrayWindowLevelAndVisibleOnAllSpaces(QQuickWindow *qtWindow) | ||
{ | ||
NSView *view = (NSView *)qtWindow->winId(); | ||
NSPanel *window = (NSPanel *)[view window]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change window here to nativeWindow.
a6b9621
to
9fef8b4
Compare
Okay I made the requested changes. (And fixed my usage of |
/rebase |
Signed-off-by: Brian Kendall <[email protected]>
9fef8b4
to
f9991e1
Compare
AppImage file: Nextcloud-PR-2677-f9991e180ca1cb7d88d773e61c1fe914f31d1791-x86_64.AppImage |
Closes #2332
Let me know if there's any changes you need to the PR and I'll be happy to update my commit