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);
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);
}
}