[Question] Reading root windows



I'm trying to read contents of root window into a widget, but failed.
Followings are some codes from my source.

GdkWindow *root;

root = gdk_window_get_parent(widget->window); // widget is TOP_LEVELWINDOW
gdk_window_get_geometry(widget->window, &x, &y, &width, &height, &depth);
gdk_window_copy_area(widget->window,
widget->style->fg_gc[GTK_WIDGET_STATE(widget)], \
            0, 0, root, x, y, width, height);

I've tried to use above code to "map_event", "configure_event", etc... But
nothing happens.
I think fg_gc may be the cause of the problem.
Your help would be appreciated. Thanks for reading.

Suhku Huh



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]