From 1c4cf5a00eee4845f2b864eca65eaa10f3ec73dc Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Wed, 8 Sep 2010 02:10:30 +0000 Subject: [PATCH] Changed windows terminology to reduce confusion --- src/dockapp.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/src/dockapp.c b/src/dockapp.c index 70d2486..41279ff 100644 --- a/src/dockapp.c +++ b/src/dockapp.c @@ -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); } } -- 2.20.1