Commit c924b9be authored by rhlabs's avatar rhlabs
Browse files

<raster@redhat.com>



<raster@redhat.com>

AHA! more bugs in the get_visual and get_colormap stuff.. guarateed to barf
if the gdk window you are querying is gdk's own gdk_root_window :) Added
checks to see if this window is infact the root window.... :)

now ee doesnt barf if you set the image as the bg.. :)
parent b0a28fda
......@@ -1195,7 +1195,8 @@ gdk_window_get_visual (GdkWindow *window)
if (window_private && !window_private->destroyed)
{
if (window_private->window_type == GDK_WINDOW_FOREIGN)
if ((window_private->window_type == GDK_WINDOW_FOREIGN)||
(window_private->xwindow==DefaultRootWindow(window_private->xdisplay)))
{
XGetWindowAttributes (window_private->xdisplay,
window_private->xwindow,
......@@ -1221,7 +1222,8 @@ gdk_window_get_colormap (GdkWindow *window)
g_return_val_if_fail (window_private->window_type != GDK_WINDOW_PIXMAP, NULL);
if (!window_private->destroyed)
{
if (window_private->window_type == GDK_WINDOW_FOREIGN)
if ((window_private->window_type == GDK_WINDOW_FOREIGN)||
(window_private->xwindow==DefaultRootWindow(window_private->xdisplay)))
{
XGetWindowAttributes (window_private->xdisplay,
window_private->xwindow,
......
......@@ -1195,7 +1195,8 @@ gdk_window_get_visual (GdkWindow *window)
if (window_private && !window_private->destroyed)
{
if (window_private->window_type == GDK_WINDOW_FOREIGN)
if ((window_private->window_type == GDK_WINDOW_FOREIGN)||
(window_private->xwindow==DefaultRootWindow(window_private->xdisplay)))
{
XGetWindowAttributes (window_private->xdisplay,
window_private->xwindow,
......@@ -1221,7 +1222,8 @@ gdk_window_get_colormap (GdkWindow *window)
g_return_val_if_fail (window_private->window_type != GDK_WINDOW_PIXMAP, NULL);
if (!window_private->destroyed)
{
if (window_private->window_type == GDK_WINDOW_FOREIGN)
if ((window_private->window_type == GDK_WINDOW_FOREIGN)||
(window_private->xwindow==DefaultRootWindow(window_private->xdisplay)))
{
XGetWindowAttributes (window_private->xdisplay,
window_private->xwindow,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment