summaryrefslogtreecommitdiff
path: root/gdk/win32
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2004-03-13 22:26:05 +0000
committerTor Lillqvist <tml@src.gnome.org>2004-03-13 22:26:05 +0000
commitf6d1307a016fabcb2b39d258aa476d4d71ea9755 (patch)
treeee7baf62521ccdb98f8be5564d9b2904dbbbaebc /gdk/win32
parent8d6bd2b5d010eddbd035ca01e564a90052f1c98d (diff)
downloadgtk+-f6d1307a016fabcb2b39d258aa476d4d71ea9755.tar.gz
Don't undefine HAVE_MONITOR_INFO when compiling with gcc. Mingw's headers
2004-03-13 Tor Lillqvist <tml@iki.fi> * gdk/win32/gdkdisplay-win32.c: Don't undefine HAVE_MONITOR_INFO when compiling with gcc. Mingw's headers do have the required definitions. * gdk/win32/gdkdrawable-win32.c (draw_polygon): When drawing filled polygons, don't draw the outline, similarily as draw_rectangle(). Apparently GTK and GIMP don't use gdk_draw_polygon() much (or always draw the outline, too), as this has gone undetected for so long. Thanks to Bruce Hochstetler.
Diffstat (limited to 'gdk/win32')
-rw-r--r--gdk/win32/gdkdisplay-win32.c2
-rw-r--r--gdk/win32/gdkdrawable-win32.c10
2 files changed, 10 insertions, 2 deletions
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index 4ecd1bb8ec..28510dd155 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -26,7 +26,7 @@
#if defined(_MSC_VER) && (WINVER < 0x500) && (WINVER > 0x0400)
#include <multimon.h>
-#elif (WINVER <= 0x0400)
+#elif defined(_MSC_VER) && (WINVER <= 0x0400)
#undef HAVE_MONITOR_INFO
#endif
diff --git a/gdk/win32/gdkdrawable-win32.c b/gdk/win32/gdkdrawable-win32.c
index a0ebf5e564..026e1ac2d2 100644
--- a/gdk/win32/gdkdrawable-win32.c
+++ b/gdk/win32/gdkdrawable-win32.c
@@ -906,6 +906,7 @@ draw_polygon (GdkGCWin32 *gcwin32,
{
gboolean filled;
POINT *pts;
+ HPEN old_pen;
gint npoints;
gint i;
@@ -921,7 +922,14 @@ draw_polygon (GdkGCWin32 *gcwin32,
}
if (filled)
- GDI_CALL (Polygon, (hdc, pts, npoints));
+ {
+ old_pen = SelectObject (hdc, GetStockObject (NULL_PEN));
+ if (old_pen == NULL)
+ WIN32_GDI_FAILED ("SelectObject");
+ GDI_CALL (Polygon, (hdc, pts, npoints));
+ if (old_pen != NULL)
+ GDI_CALL (SelectObject, (hdc, old_pen));
+ }
else
GDI_CALL (Polyline, (hdc, pts, npoints));
}