Skip to content

Commit 3503e31

Browse files
committed
Made the floating notification monitor name non-static
1 parent 8582a47 commit 3503e31

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/notificationWindow/notificationWindow.vala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace SwayNotificationCenter {
1010
Gee.HashMap<uint32, unowned Notification> notification_ids
1111
= new Gee.HashMap<uint32, unowned Notification> ();
1212

13-
private static string ?monitor_name = null;
13+
private string ?monitor_name = null;
1414

1515
private const int MAX_HEIGHT = 600;
1616

@@ -39,8 +39,8 @@ namespace SwayNotificationCenter {
3939
string monitor_name = config.notification_window_preferred_output;
4040
if (old == null
4141
|| old.notification_window_preferred_output != monitor_name
42-
|| NotificationWindow.monitor_name != monitor_name) {
43-
NotificationWindow.monitor_name = null;
42+
|| this.monitor_name != monitor_name) {
43+
this.monitor_name = null;
4444
set_anchor ();
4545
}
4646
});
@@ -138,8 +138,8 @@ namespace SwayNotificationCenter {
138138

139139
// Set the preferred monitor
140140
string ?monitor_name = ConfigModel.instance.notification_window_preferred_output;
141-
if (NotificationWindow.monitor_name != null) {
142-
monitor_name = NotificationWindow.monitor_name;
141+
if (this.monitor_name != null) {
142+
monitor_name = this.monitor_name;
143143
}
144144
set_monitor (Functions.try_get_monitor (monitor_name));
145145
}
@@ -375,7 +375,7 @@ namespace SwayNotificationCenter {
375375
public void set_monitor (Gdk.Monitor ?monitor) {
376376
debug ("Setting monitor for Floating Notifications: %s",
377377
Functions.monitor_to_string (monitor) ?? "Monitor Picked by Compositor");
378-
NotificationWindow.monitor_name = monitor == null ? null : monitor.connector;
378+
this.monitor_name = monitor == null ? null : monitor.connector;
379379
GtkLayerShell.set_monitor (this, monitor);
380380

381381
set_input_region ();

0 commit comments

Comments
 (0)