Commit c9b2958b authored by Tor Lillqvist's avatar Tor Lillqvist

Don't draw anything if width or height is zero. Don't print a warning if

	* gdk/win32/gdkdraw.c (gdk_draw_arc): Don't draw anything if width
 	or height is zero. Don't print a warning if Pie or Arc fails, they
	always fail (?) for very narrow ellipses.

	* gdk/win32/gdkdraw.c (gdk_draw_pixmap): Call InvalidateRgn for
 	the part or the destination window corresponding to source area
 	outside of the source drawable's boundary.

	* gdk/win32/gdkdraw.c (gdk_draw_lines, gdk_draw_polygon): Don't do
 	anything if less than two points.

	* gdk/win32/gdkselection.c (gdk_selection_owner_get): Always
 	return NULL. Gtk cut-and-paste inside a single program works
 	better this way. (It always gets the clipboard contents from
 	Windows, not from its own copy, which is cleared anyway. I can't
 	say I fully understand what happens... Emulating the X selection
 	and property stuff is a bit of a mess.)

	* gdk/win32/gdkevents.c
	* gdk/win32/gdkproperty.c: A bt more verbose logging.

	* gdk/win32/gdkregion.c: Fix some memory leaks (temporary regions
 	that never got deleted). Revamp gdk_region_shrink.

	* gdk/win32/gdkregion.c: Fix memory leak, delete temporary regions
 	after use.

	* gtk/gtk.def: Add some missing entry points.

	* gtk/gtkrc.c: Strip trailing directory separator from pixmap path
 	component.
parent 68f895bd
1999-07-09 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdraw.c (gdk_draw_arc): Don't draw anything if width
or height is zero. Don't print a warning if Pie or Arc fails, they
always fail (?) for very narrow ellipses.
* gdk/win32/gdkdraw.c (gdk_draw_pixmap): Call InvalidateRgn for
the part or the destination window corresponding to source area
outside of the source drawable's boundary.
* gdk/win32/gdkdraw.c (gdk_draw_lines, gdk_draw_polygon): Don't do
anything if less than two points.
* gdk/win32/gdkselection.c (gdk_selection_owner_get): Always
return NULL. Gtk cut-and-paste inside a single program works
better this way. (It always gets the clipboard contents from
Windows, not from its own copy, which is cleared anyway. I can't
say I fully understand what happens... Emulating the X selection
and property stuff is a bit of a mess.)
* gdk/win32/gdkevents.c
* gdk/win32/gdkproperty.c: A bt more verbose logging.
* gdk/win32/gdkregion.c: Fix some memory leaks (temporary regions
that never got deleted). Revamp gdk_region_shrink.
* gdk/win32/gdkregion.c: Fix memory leak, delete temporary regions
after use.
* gtk/gtk.def: Add some missing entry points.
* gtk/gtkrc.c: Strip trailing directory separator from pixmap path
component.
1999-07-04 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Handle
......
1999-07-09 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdraw.c (gdk_draw_arc): Don't draw anything if width
or height is zero. Don't print a warning if Pie or Arc fails, they
always fail (?) for very narrow ellipses.
* gdk/win32/gdkdraw.c (gdk_draw_pixmap): Call InvalidateRgn for
the part or the destination window corresponding to source area
outside of the source drawable's boundary.
* gdk/win32/gdkdraw.c (gdk_draw_lines, gdk_draw_polygon): Don't do
anything if less than two points.
* gdk/win32/gdkselection.c (gdk_selection_owner_get): Always
return NULL. Gtk cut-and-paste inside a single program works
better this way. (It always gets the clipboard contents from
Windows, not from its own copy, which is cleared anyway. I can't
say I fully understand what happens... Emulating the X selection
and property stuff is a bit of a mess.)
* gdk/win32/gdkevents.c
* gdk/win32/gdkproperty.c: A bt more verbose logging.
* gdk/win32/gdkregion.c: Fix some memory leaks (temporary regions
that never got deleted). Revamp gdk_region_shrink.
* gdk/win32/gdkregion.c: Fix memory leak, delete temporary regions
after use.
* gtk/gtk.def: Add some missing entry points.
* gtk/gtkrc.c: Strip trailing directory separator from pixmap path
component.
1999-07-04 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Handle
......
1999-07-09 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdraw.c (gdk_draw_arc): Don't draw anything if width
or height is zero. Don't print a warning if Pie or Arc fails, they
always fail (?) for very narrow ellipses.
* gdk/win32/gdkdraw.c (gdk_draw_pixmap): Call InvalidateRgn for
the part or the destination window corresponding to source area
outside of the source drawable's boundary.
* gdk/win32/gdkdraw.c (gdk_draw_lines, gdk_draw_polygon): Don't do
anything if less than two points.
* gdk/win32/gdkselection.c (gdk_selection_owner_get): Always
return NULL. Gtk cut-and-paste inside a single program works
better this way. (It always gets the clipboard contents from
Windows, not from its own copy, which is cleared anyway. I can't
say I fully understand what happens... Emulating the X selection
and property stuff is a bit of a mess.)
* gdk/win32/gdkevents.c
* gdk/win32/gdkproperty.c: A bt more verbose logging.
* gdk/win32/gdkregion.c: Fix some memory leaks (temporary regions
that never got deleted). Revamp gdk_region_shrink.
* gdk/win32/gdkregion.c: Fix memory leak, delete temporary regions
after use.
* gtk/gtk.def: Add some missing entry points.
* gtk/gtkrc.c: Strip trailing directory separator from pixmap path
component.
1999-07-04 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Handle
......
1999-07-09 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdraw.c (gdk_draw_arc): Don't draw anything if width
or height is zero. Don't print a warning if Pie or Arc fails, they
always fail (?) for very narrow ellipses.
* gdk/win32/gdkdraw.c (gdk_draw_pixmap): Call InvalidateRgn for
the part or the destination window corresponding to source area
outside of the source drawable's boundary.
* gdk/win32/gdkdraw.c (gdk_draw_lines, gdk_draw_polygon): Don't do
anything if less than two points.
* gdk/win32/gdkselection.c (gdk_selection_owner_get): Always
return NULL. Gtk cut-and-paste inside a single program works
better this way. (It always gets the clipboard contents from
Windows, not from its own copy, which is cleared anyway. I can't
say I fully understand what happens... Emulating the X selection
and property stuff is a bit of a mess.)
* gdk/win32/gdkevents.c
* gdk/win32/gdkproperty.c: A bt more verbose logging.
* gdk/win32/gdkregion.c: Fix some memory leaks (temporary regions
that never got deleted). Revamp gdk_region_shrink.
* gdk/win32/gdkregion.c: Fix memory leak, delete temporary regions
after use.
* gtk/gtk.def: Add some missing entry points.
* gtk/gtkrc.c: Strip trailing directory separator from pixmap path
component.
1999-07-04 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Handle
......
1999-07-09 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdraw.c (gdk_draw_arc): Don't draw anything if width
or height is zero. Don't print a warning if Pie or Arc fails, they
always fail (?) for very narrow ellipses.
* gdk/win32/gdkdraw.c (gdk_draw_pixmap): Call InvalidateRgn for
the part or the destination window corresponding to source area
outside of the source drawable's boundary.
* gdk/win32/gdkdraw.c (gdk_draw_lines, gdk_draw_polygon): Don't do
anything if less than two points.
* gdk/win32/gdkselection.c (gdk_selection_owner_get): Always
return NULL. Gtk cut-and-paste inside a single program works
better this way. (It always gets the clipboard contents from
Windows, not from its own copy, which is cleared anyway. I can't
say I fully understand what happens... Emulating the X selection
and property stuff is a bit of a mess.)
* gdk/win32/gdkevents.c
* gdk/win32/gdkproperty.c: A bt more verbose logging.
* gdk/win32/gdkregion.c: Fix some memory leaks (temporary regions
that never got deleted). Revamp gdk_region_shrink.
* gdk/win32/gdkregion.c: Fix memory leak, delete temporary regions
after use.
* gtk/gtk.def: Add some missing entry points.
* gtk/gtkrc.c: Strip trailing directory separator from pixmap path
component.
1999-07-04 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Handle
......
1999-07-09 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdraw.c (gdk_draw_arc): Don't draw anything if width
or height is zero. Don't print a warning if Pie or Arc fails, they
always fail (?) for very narrow ellipses.
* gdk/win32/gdkdraw.c (gdk_draw_pixmap): Call InvalidateRgn for
the part or the destination window corresponding to source area
outside of the source drawable's boundary.
* gdk/win32/gdkdraw.c (gdk_draw_lines, gdk_draw_polygon): Don't do
anything if less than two points.
* gdk/win32/gdkselection.c (gdk_selection_owner_get): Always
return NULL. Gtk cut-and-paste inside a single program works
better this way. (It always gets the clipboard contents from
Windows, not from its own copy, which is cleared anyway. I can't
say I fully understand what happens... Emulating the X selection
and property stuff is a bit of a mess.)
* gdk/win32/gdkevents.c
* gdk/win32/gdkproperty.c: A bt more verbose logging.
* gdk/win32/gdkregion.c: Fix some memory leaks (temporary regions
that never got deleted). Revamp gdk_region_shrink.
* gdk/win32/gdkregion.c: Fix memory leak, delete temporary regions
after use.
* gtk/gtk.def: Add some missing entry points.
* gtk/gtkrc.c: Strip trailing directory separator from pixmap path
component.
1999-07-04 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Handle
......
1999-07-09 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdraw.c (gdk_draw_arc): Don't draw anything if width
or height is zero. Don't print a warning if Pie or Arc fails, they
always fail (?) for very narrow ellipses.
* gdk/win32/gdkdraw.c (gdk_draw_pixmap): Call InvalidateRgn for
the part or the destination window corresponding to source area
outside of the source drawable's boundary.
* gdk/win32/gdkdraw.c (gdk_draw_lines, gdk_draw_polygon): Don't do
anything if less than two points.
* gdk/win32/gdkselection.c (gdk_selection_owner_get): Always
return NULL. Gtk cut-and-paste inside a single program works
better this way. (It always gets the clipboard contents from
Windows, not from its own copy, which is cleared anyway. I can't
say I fully understand what happens... Emulating the X selection
and property stuff is a bit of a mess.)
* gdk/win32/gdkevents.c
* gdk/win32/gdkproperty.c: A bt more verbose logging.
* gdk/win32/gdkregion.c: Fix some memory leaks (temporary regions
that never got deleted). Revamp gdk_region_shrink.
* gdk/win32/gdkregion.c: Fix memory leak, delete temporary regions
after use.
* gtk/gtk.def: Add some missing entry points.
* gtk/gtkrc.c: Strip trailing directory separator from pixmap path
component.
1999-07-04 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkevents.c (gdk_event_translate): Handle
......
......@@ -203,26 +203,27 @@ gdk_draw_arc (GdkDrawable *drawable,
if (height == -1)
height = drawable_private->height;
hdc = gdk_gc_predraw (drawable_private, gc_private);
nXStartArc = x + width/2 + (int) (sin(angle1/64.*M_TWOPI)*width);
nYStartArc = y + height/2 + (int) (cos(angle1/64.*M_TWOPI)*height);
nXEndArc = x + width/2 + (int) (sin(angle2/64.*M_TWOPI)*width);
nYEndArc = y + height/2 + (int) (cos(angle2/64.*M_TWOPI)*height);
if (filled)
if (width != 0 && height != 0)
{
if (!Pie (hdc, x, y, x+width, y+height,
nXStartArc, nYStartArc, nXEndArc, nYEndArc))
g_warning ("gdk_draw_arc: Pie failed");
}
else
{
if (!Arc (hdc, x, y, x+width, y+height,
nXStartArc, nYStartArc, nXEndArc, nYEndArc))
g_warning ("gdk_draw_arc: Arc failed");
hdc = gdk_gc_predraw (drawable_private, gc_private);
nXStartArc = x + width/2 + (int) (sin(angle1/64.*M_TWOPI)*width);
nYStartArc = y + height/2 + (int) (cos(angle1/64.*M_TWOPI)*height);
nXEndArc = x + width/2 + (int) (sin(angle2/64.*M_TWOPI)*width);
nYEndArc = y + height/2 + (int) (cos(angle2/64.*M_TWOPI)*height);
if (filled)
{
Pie (hdc, x, y, x+width, y+height,
nXStartArc, nYStartArc, nXEndArc, nYEndArc);
}
else
{
Arc (hdc, x, y, x+width, y+height,
nXStartArc, nYStartArc, nXEndArc, nYEndArc);
}
gdk_gc_postdraw (drawable_private, gc_private);
}
gdk_gc_postdraw (drawable_private, gc_private);
}
void
......@@ -246,13 +247,16 @@ gdk_draw_polygon (GdkDrawable *drawable,
return;
gc_private = (GdkGCPrivate*) gc;
hdc = gdk_gc_predraw (drawable_private, gc_private);
pts = g_malloc ((npoints+1) * sizeof (POINT));
GDK_NOTE (MISC, g_print ("gdk_draw_polygon: %#x (%d) %d\n",
drawable_private->xwindow, gc_private,
npoints));
if (npoints < 2)
return;
hdc = gdk_gc_predraw (drawable_private, gc_private);
pts = g_malloc ((npoints+1) * sizeof (POINT));
for (i = 0; i < npoints; i++)
{
pts[i].x = points[i].x;
......@@ -424,6 +428,8 @@ gdk_draw_pixmap (GdkDrawable *drawable,
HDC hdc;
HDC srcdc;
HGDIOBJ hgdiobj;
HRGN src_rgn, draw_rgn, outside_rgn;
RECT r;
g_return_if_fail (drawable != NULL);
g_return_if_fail (src != NULL);
......@@ -436,17 +442,70 @@ gdk_draw_pixmap (GdkDrawable *drawable,
gc_private = (GdkGCPrivate*) gc;
if (width == -1)
width = src_private->width;
width = src_private->width; /* Or should we subtract xsrc? */
if (height == -1)
height = src_private->height;
hdc = gdk_gc_predraw (drawable_private, gc_private);
height = src_private->height; /* Ditto? */
GDK_NOTE (MISC, g_print ("gdk_draw_pixmap: dest: %#x destdc: (%d) %#x "
"src: %#x %dx%d@+%d+%d\n",
"src: %#x %dx%d@+%d+%d"
" dest: %#x @+%d+%d\n",
drawable_private->xwindow, gc_private, hdc,
src_private->xwindow,
width, height, xdest, ydest));
width, height, xsrc, ysrc,
drawable_private->xwindow, xdest, ydest));
hdc = gdk_gc_predraw (drawable_private, gc_private);
src_rgn = CreateRectRgn (0, 0, src_private->width + 1, src_private->height + 1);
draw_rgn = CreateRectRgn (xsrc, ysrc, xsrc + width + 1, ysrc + height + 1);
SetRectEmpty (&r);
outside_rgn = CreateRectRgnIndirect (&r);
if (drawable_private->window_type != GDK_WINDOW_PIXMAP)
{
/* If we are drawing on a window, calculate the region that is
* outside the source pixmap, and invalidate that, causing it to
* be cleared. XXX
*/
if (CombineRgn (outside_rgn, draw_rgn, src_rgn, RGN_DIFF) != NULLREGION)
{
OffsetRgn (outside_rgn, xdest, ydest);
GDK_NOTE (MISC, (GetRgnBox (outside_rgn, &r),
g_print ("...calling InvalidateRgn, "
"bbox: %dx%d@+%d+%d\n",
r.right - r.left - 1, r.bottom - r.top - 1,
r.left, r.top)));
InvalidateRgn (drawable_private->xwindow, outside_rgn, TRUE);
}
}
#if 1 /* Don't know if this is necessary */
if (CombineRgn (draw_rgn, draw_rgn, src_rgn, RGN_AND) == COMPLEXREGION)
g_warning ("gdk_draw_pixmap: CombineRgn returned a COMPLEXREGION");
GetRgnBox (draw_rgn, &r);
if (r.left != xsrc
|| r.top != ysrc
|| r.right != xsrc + width + 1
|| r.bottom != ysrc + height + 1)
{
xdest += r.left - xsrc;
xsrc = r.left;
ydest += r.top - ysrc;
ysrc = r.top;
width = r.right - xsrc - 1;
height = r.bottom - ysrc - 1;
GDK_NOTE (MISC, g_print ("... restricted to src: %dx%d@+%d+%d, "
"dest: @+%d+%d\n",
width, height, xsrc, ysrc,
xdest, ydest));
}
#endif
DeleteObject (src_rgn);
DeleteObject (draw_rgn);
DeleteObject (outside_rgn);
/* Strangely enough, this function is called also to bitblt
* from a window.
......@@ -602,7 +661,7 @@ gdk_draw_lines (GdkDrawable *drawable,
POINT *pts;
int i;
if (npoints <= 0)
if (npoints < 2)
return;
g_return_if_fail (drawable != NULL);
......@@ -623,7 +682,7 @@ gdk_draw_lines (GdkDrawable *drawable,
}
if (!Polyline (hdc, pts, npoints))
g_warning ("gdk_draw_lines: Polyline failed");
g_warning ("gdk_draw_lines: Polyline(,,%d) failed", npoints);
g_free (pts);
......
......@@ -203,26 +203,27 @@ gdk_draw_arc (GdkDrawable *drawable,
if (height == -1)
height = drawable_private->height;
hdc = gdk_gc_predraw (drawable_private, gc_private);
nXStartArc = x + width/2 + (int) (sin(angle1/64.*M_TWOPI)*width);
nYStartArc = y + height/2 + (int) (cos(angle1/64.*M_TWOPI)*height);
nXEndArc = x + width/2 + (int) (sin(angle2/64.*M_TWOPI)*width);
nYEndArc = y + height/2 + (int) (cos(angle2/64.*M_TWOPI)*height);
if (filled)
if (width != 0 && height != 0)
{
if (!Pie (hdc, x, y, x+width, y+height,
nXStartArc, nYStartArc, nXEndArc, nYEndArc))
g_warning ("gdk_draw_arc: Pie failed");
}
else
{
if (!Arc (hdc, x, y, x+width, y+height,
nXStartArc, nYStartArc, nXEndArc, nYEndArc))
g_warning ("gdk_draw_arc: Arc failed");
hdc = gdk_gc_predraw (drawable_private, gc_private);
nXStartArc = x + width/2 + (int) (sin(angle1/64.*M_TWOPI)*width);
nYStartArc = y + height/2 + (int) (cos(angle1/64.*M_TWOPI)*height);
nXEndArc = x + width/2 + (int) (sin(angle2/64.*M_TWOPI)*width);
nYEndArc = y + height/2 + (int) (cos(angle2/64.*M_TWOPI)*height);
if (filled)
{
Pie (hdc, x, y, x+width, y+height,
nXStartArc, nYStartArc, nXEndArc, nYEndArc);
}
else
{
Arc (hdc, x, y, x+width, y+height,
nXStartArc, nYStartArc, nXEndArc, nYEndArc);
}
gdk_gc_postdraw (drawable_private, gc_private);
}
gdk_gc_postdraw (drawable_private, gc_private);
}
void
......@@ -246,13 +247,16 @@ gdk_draw_polygon (GdkDrawable *drawable,
return;
gc_private = (GdkGCPrivate*) gc;
hdc = gdk_gc_predraw (drawable_private, gc_private);
pts = g_malloc ((npoints+1) * sizeof (POINT));
GDK_NOTE (MISC, g_print ("gdk_draw_polygon: %#x (%d) %d\n",
drawable_private->xwindow, gc_private,
npoints));
if (npoints < 2)
return;
hdc = gdk_gc_predraw (drawable_private, gc_private);
pts = g_malloc ((npoints+1) * sizeof (POINT));
for (i = 0; i < npoints; i++)
{
pts[i].x = points[i].x;
......@@ -424,6 +428,8 @@ gdk_draw_pixmap (GdkDrawable *drawable,
HDC hdc;
HDC srcdc;
HGDIOBJ hgdiobj;
HRGN src_rgn, draw_rgn, outside_rgn;
RECT r;
g_return_if_fail (drawable != NULL);
g_return_if_fail (src != NULL);
......@@ -436,17 +442,70 @@ gdk_draw_pixmap (GdkDrawable *drawable,
gc_private = (GdkGCPrivate*) gc;
if (width == -1)
width = src_private->width;
width = src_private->width; /* Or should we subtract xsrc? */
if (height == -1)
height = src_private->height;
hdc = gdk_gc_predraw (drawable_private, gc_private);
height = src_private->height; /* Ditto? */
GDK_NOTE (MISC, g_print ("gdk_draw_pixmap: dest: %#x destdc: (%d) %#x "
"src: %#x %dx%d@+%d+%d\n",
"src: %#x %dx%d@+%d+%d"
" dest: %#x @+%d+%d\n",
drawable_private->xwindow, gc_private, hdc,
src_private->xwindow,
width, height, xdest, ydest));
width, height, xsrc, ysrc,
drawable_private->xwindow, xdest, ydest));
hdc = gdk_gc_predraw (drawable_private, gc_private);
src_rgn = CreateRectRgn (0, 0, src_private->width + 1, src_private->height + 1);
draw_rgn = CreateRectRgn (xsrc, ysrc, xsrc + width + 1, ysrc + height + 1);
SetRectEmpty (&r);
outside_rgn = CreateRectRgnIndirect (&r);
if (drawable_private->window_type != GDK_WINDOW_PIXMAP)
{
/* If we are drawing on a window, calculate the region that is
* outside the source pixmap, and invalidate that, causing it to
* be cleared. XXX
*/
if (CombineRgn (outside_rgn, draw_rgn, src_rgn, RGN_DIFF) != NULLREGION)
{
OffsetRgn (outside_rgn, xdest, ydest);
GDK_NOTE (MISC, (GetRgnBox (outside_rgn, &r),
g_print ("...calling InvalidateRgn, "
"bbox: %dx%d@+%d+%d\n",
r.right - r.left - 1, r.bottom - r.top - 1,
r.left, r.top)));
InvalidateRgn (drawable_private->xwindow, outside_rgn, TRUE);
}
}
#if 1 /* Don't know if this is necessary */
if (CombineRgn (draw_rgn, draw_rgn, src_rgn, RGN_AND) == COMPLEXREGION)
g_warning ("gdk_draw_pixmap: CombineRgn returned a COMPLEXREGION");
GetRgnBox (draw_rgn, &r);
if (r.left != xsrc
|| r.top != ysrc
|| r.right != xsrc + width + 1
|| r.bottom != ysrc + height + 1)
{
xdest += r.left - xsrc;
xsrc = r.left;
ydest += r.top - ysrc;
ysrc = r.top;
width = r.right - xsrc - 1;
height = r.bottom - ysrc - 1;
GDK_NOTE (MISC, g_print ("... restricted to src: %dx%d@+%d+%d, "
"dest: @+%d+%d\n",
width, height, xsrc, ysrc,
xdest, ydest));
}
#endif
DeleteObject (src_rgn);
DeleteObject (draw_rgn);
DeleteObject (outside_rgn);
/* Strangely enough, this function is called also to bitblt
* from a window.
......@@ -602,7 +661,7 @@ gdk_draw_lines (GdkDrawable *drawable,
POINT *pts;
int i;
if (npoints <= 0)
if (npoints < 2)
return;
g_return_if_fail (drawable != NULL);
......@@ -623,7 +682,7 @@ gdk_draw_lines (GdkDrawable *drawable,
}
if (!Polyline (hdc, pts, npoints))
g_warning ("gdk_draw_lines: Polyline failed");
g_warning ("gdk_draw_lines: Polyline(,,%d) failed", npoints);
g_free (pts);
......
......@@ -2325,9 +2325,12 @@ gdk_event_translate (GdkEvent *event,
if (window_private->bg_type == GDK_WIN32_BG_PIXEL)
{
COLORREF bg;
GDK_NOTE (EVENTS, g_print ("...BG_PIXEL %s\n",
gdk_color_to_string (&window_private->bg_pixel)));
GetClipBox (hdc, &rect);
GDK_NOTE (EVENTS, g_print ("...%dx%d@+%d+%d BG_PIXEL %s\n",
rect.right - rect.left,
rect.bottom - rect.top,
rect.left, rect.top,
gdk_color_to_string (&window_private->bg_pixel)));
#ifdef MULTIPLE_WINDOW_CLASSES
bg = PALETTEINDEX (window_private->bg_pixel.pixel);
#else
......
......@@ -2325,9 +2325,12 @@ gdk_event_translate (GdkEvent *event,
if (window_private->bg_type == GDK_WIN32_BG_PIXEL)
{
COLORREF bg;
GDK_NOTE (EVENTS, g_print ("...BG_PIXEL %s\n",
gdk_color_to_string (&window_private->bg_pixel)));
GetClipBox (hdc, &rect);
GDK_NOTE (EVENTS, g_print ("...%dx%d@+%d+%d BG_PIXEL %s\n",
rect.right - rect.left,
rect.bottom - rect.top,
rect.left, rect.top,
gdk_color_to_string (&window_private->bg_pixel)));
#ifdef MULTIPLE_WINDOW_CLASSES
bg = PALETTEINDEX (window_private->bg_pixel.pixel);
#else
......
......@@ -165,6 +165,8 @@ gdk_property_change (GdkWindow *window,
if (*ptr++ == '\n')
length++;
#if 1
GDK_NOTE (SELECTION, g_print ("...OpenClipboard(%#x)\n",
private->xwindow));
if (!OpenClipboard (private->xwindow))
{
g_warning ("gdk_property_change: OpenClipboard failed");
......@@ -183,10 +185,13 @@ gdk_property_change (GdkWindow *window,
}
*ptr++ = '\0';
GlobalUnlock (