=== modified file 'src/gtkutil.c' --- src/gtkutil.c 2014-07-27 13:21:30 +0000 +++ src/gtkutil.c 2014-07-30 11:01:55 +0000 @@ -3660,6 +3660,15 @@ /* Set the cursor to an arrow. */ xg_set_cursor (webox, FRAME_DISPLAY_INFO (f)->xg_cursor); + /* Realize so we can ask for underlying resources. */ + gtk_widget_realize (wscroll); + fprintf (stderr, "Vertical scroll bar's X window: %d\n", +#ifdef HAVE_GTK3 + (int) gdk_x11_window_get_xid (gtk_widget_get_window (wscroll))); +#else + (int) gdk_x11_drawable_get_xid (gtk_widget_get_window (wscroll))); +#endif + bar->x_window = scroll_id; bar->horizontal = 0; } @@ -3727,6 +3736,15 @@ /* Set the cursor to an arrow. */ xg_set_cursor (webox, FRAME_DISPLAY_INFO (f)->xg_cursor); + /* Realize so we can ask for underlying resources. */ + gtk_widget_realize (wscroll); + fprintf (stderr, "Horizontal scroll bar's X window: %d\n", +#ifdef HAVE_GTK3 + (int) gdk_x11_window_get_xid (gtk_widget_get_window (wscroll))); +#else + (int) gdk_x11_drawable_get_xid (gtk_widget_get_window (wscroll))); +#endif + bar->x_window = scroll_id; bar->horizontal = 1; }