Do not call gtk_window_set_decorated, gtk_window_set_resizable
authorJoachim Breitner <mail@joachim-breitner.de>
Thu, 22 May 2014 21:51:28 +0000 (21:51 +0000)
committerJoachim Breitner <mail@joachim-breitner.de>
Thu, 22 May 2014 21:51:28 +0000 (21:51 +0000)
does not go well with using GTK's fullscreen code.

sm.c

diff --git a/sm.c b/sm.c
index f7ff899..697ecb2 100644 (file)
--- a/sm.c
+++ b/sm.c
@@ -354,8 +354,6 @@ int main(int argc, char **argv) {
        gtk_init(&argc, &argv);
 
        window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-       gtk_window_set_decorated(GTK_WINDOW(window), FALSE);
-       gtk_window_set_resizable(GTK_WINDOW(window), FALSE);
        gtk_window_set_icon_name (GTK_WINDOW (window), "sm");
        gtk_window_fullscreen(GTK_WINDOW(window));
 
@@ -462,10 +460,10 @@ int main(int argc, char **argv) {
        g_signal_connect(G_OBJECT(tb), "changed", G_CALLBACK(newtext), NULL);
        g_signal_connect(G_OBJECT(tv), "move-cursor", G_CALLBACK(move_cursor), NULL);
 
-       if (!input_provided)
-               show_entry();
-       else
+       if (input_provided)
                hide_entry(NULL);
+       else
+               show_entry();
 
        gtk_main();