gnome-shell-extension-fullscreen-notifications
gnome-shell-extension-fullscreen-notifications copied to clipboard
Away from mouse, notifications pop-up never go away
I don't think that is an issue with your extension, but it happens because your extension. When I play a game in fullscreen with a controller, notifications never goes away (because I don't touch de mouse). Same thing with video in fullscreen.
I know that is a behavior of gnome (hide notification only when there is activities -- mouse movements for instance) and I really hate that. In fact, I really hate how gnome manages notifications, but is an other subject.
I want notification in fullscreen AND don't be pissed off when I am away from my mouse.
Is there any trick to achieve that?
I implemented this for myself today, so it's not very well tested, but seems to work as expected:
diff --git a/[email protected]/extension.js b/[email protected]/extension.js
index 0a0a6b9..3699a7c 100644
--- a/[email protected]/extension.js
+++ b/[email protected]/extension.js
@@ -74,7 +74,9 @@ function updateState() {
this._showNotification();
}
} else if (this._notificationState == State.SHOWN) {
- let expired = (this._userActiveWhileNotificationShown &&
+ // Expire notifications shown over fullscreen apps by making existence of a fullscreen app equivalent to user activity
+ // let expired = (this._userActiveWhileNotificationShown &&
+ let expired = ((this._userActiveWhileNotificationShown || Main.layoutManager.primaryMonitor.inFullscreen) &&
this._notificationTimeoutId == 0 &&
this._notification.urgency != Urgency.CRITICAL &&
!this._banner.focused &&
P.S. @soal, I can make a PR if you're fine with making this the default behavior.
@AdamantGarth It would be much appreciated.