deskcandy/src/desktop_window.vala

28 lines
828 B
Vala

namespace Deskcandy {
[GtkTemplate(ui = "/moe/solarpunk/Deskcandy/desktop_window.ui")]
public class DesktopWindow : Gtk.Window {
public DesktopWindow(Gtk.Application app) {
Object(application: app);
Gdk.Rectangle rect = this.get_display().get_primary_monitor().get_geometry();
this.set_default_size(rect.width, rect.height);
this.set_keep_below(true);
this.refresh_socket();
}
public void refresh_socket() {
Gtk.Socket socket = new Gtk.Socket();
socket.set_visible(true);
this.add(socket);
var id = (uint)socket.get_id();
try {
Subprocess proc = new Subprocess(SubprocessFlags.NONE, "/usr/lib64/misc/xscreensaver/unknownpleasures", "-window-id", id.to_string());
} catch (GLib.Error e) {
error(e.message);
}
}
}
}