Force fullscreen on some WM
authormail <mail@joachim-breitner.de>
Sun, 21 Oct 2007 19:18:34 +0000 (19:18 +0000)
committermail <mail@joachim-breitner.de>
Sun, 21 Oct 2007 19:18:34 +0000 (19:18 +0000)
This might not be nice, but it makes sm work with xmonad. I hope
this does not hurt other users.

sm.c

diff --git a/sm.c b/sm.c
index b1c07c8..780a58a 100644 (file)
--- a/sm.c
+++ b/sm.c
@@ -130,6 +130,10 @@ int main(int argc, char **argv) {
 
        window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
        gtk_window_set_decorated(GTK_WINDOW(window), FALSE);
+       gtk_window_set_resizable(GTK_WINDOW(window), FALSE);
+       GdkScreen *screen = gtk_window_get_screen(GTK_WINDOW(window));
+       gtk_widget_set_size_request(window, gdk_screen_get_width(screen),
+                                           gdk_screen_get_height(screen));
        gtk_window_fullscreen(GTK_WINDOW(window));
        g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL);