mirror of
https://github.com/ErikReider/SwayNotificationCenter.git
synced 2024-11-22 09:43:52 +03:00
Added wayland check
This commit is contained in:
parent
f59a121478
commit
ee7b47e3ac
@ -25,6 +25,13 @@ namespace SwayNotificationCenter {
|
||||
public ControlCenter (CcDaemon cc_daemon) {
|
||||
this.cc_daemon = cc_daemon;
|
||||
|
||||
if (!GtkLayerShell.is_supported ()) {
|
||||
stderr.printf ("GTKLAYERSHELL IS NOT SUPPORTED!\n");
|
||||
stderr.printf ("Swaync only works on Wayland!\n");
|
||||
stderr.printf ("If running waylans session, try running:\n");
|
||||
stderr.printf ("\tGDK_BACKEND=wayland swaync\n");
|
||||
Process.exit (1);
|
||||
}
|
||||
GtkLayerShell.init_for_window (this);
|
||||
this.set_anchor ();
|
||||
|
||||
|
@ -44,6 +44,13 @@ namespace SwayNotificationCenter {
|
||||
public bool closed = false;
|
||||
|
||||
public NotificationWindow () {
|
||||
if (!GtkLayerShell.is_supported ()) {
|
||||
stderr.printf ("GTKLAYERSHELL IS NOT SUPPORTED!\n");
|
||||
stderr.printf ("Swaync only works on Wayland!\n");
|
||||
stderr.printf ("If running waylans session, try running:\n");
|
||||
stderr.printf ("\tGDK_BACKEND=wayland swaync\n");
|
||||
Process.exit (1);
|
||||
}
|
||||
GtkLayerShell.init_for_window (this);
|
||||
GtkLayerShell.set_layer (this, GtkLayerShell.Layer.OVERLAY);
|
||||
this.set_anchor ();
|
||||
|
Loading…
Reference in New Issue
Block a user