Changed windows terminology to reduce confusion
authorHugo Villeneuve <hugo@hugovil.com>
Wed, 8 Sep 2010 02:10:30 +0000 (02:10 +0000)
committerHugo Villeneuve <hugo@hugovil.com>
Wed, 29 May 2013 02:37:23 +0000 (22:37 -0400)
src/dockapp.c

index 70d2486..41279ff 100644 (file)
@@ -51,8 +51,8 @@
 void
 dockapp_init(int argc, char *argv[], char *display_arg, char *geometry_arg)
 {
-       GtkWidget *window;
-       GtkWidget *clock;
+       GtkWidget *dockwin;
+       GtkWidget *iconwin;
        XWMHints wm_hints;
 
        gtk_init(&argc, &argv);
@@ -61,29 +61,24 @@ dockapp_init(int argc, char *argv[], char *display_arg, char *geometry_arg)
                dockapp.background_pixbuf =
                        gdk_pixbuf_new_from_xpm_data(wmaker_tile_60x60_xpm);
 
-       window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-       gtk_window_set_default_size(GTK_WINDOW(window), ICON_SIZE, ICON_SIZE);
+       dockwin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+       gtk_window_set_default_size(GTK_WINDOW(dockwin), ICON_SIZE, ICON_SIZE);
 
-       clock = hvclock_widget_new();
-       gtk_container_add(GTK_CONTAINER(window), clock);
+       iconwin = hvclock_widget_new();
+       gtk_container_add(GTK_CONTAINER(dockwin), iconwin);
+       gtk_container_set_border_width(GTK_CONTAINER(dockwin), BWIDTH);
+       g_signal_connect(dockwin, "destroy", G_CALLBACK(gtk_main_quit), NULL);
 
-       g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
-
-       gtk_container_set_border_width(GTK_CONTAINER(window), BWIDTH);
-
-       gtk_widget_show_all(window);
+       gtk_widget_show_all(dockwin);
 
        if (hvclock_infos.dockapp_mode == true) {
                /* Dockapp specific initialization */
-               wm_hints.flags = StateHint | IconWindowHint | IconPositionHint |
-                       WindowGroupHint;
+               wm_hints.flags = StateHint | IconWindowHint | WindowGroupHint;
                wm_hints.initial_state = WithdrawnState;
-               wm_hints.icon_window = GDK_WINDOW_XWINDOW(clock->window);
-               wm_hints.icon_x = 0;
-               wm_hints.icon_y = 0;
-               wm_hints.window_group = GDK_WINDOW_XWINDOW(window->window);
+               wm_hints.icon_window = GDK_WINDOW_XWINDOW(iconwin->window);
+               wm_hints.window_group = GDK_WINDOW_XWINDOW(dockwin->window);
 
-               XSetWMHints(GDK_DISPLAY(), GDK_WINDOW_XWINDOW(window->window),
+               XSetWMHints(GDK_DISPLAY(), GDK_WINDOW_XWINDOW(dockwin->window),
                            &wm_hints);
        }
 }