summaryrefslogtreecommitdiff
path: root/gdk
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2005-07-27 06:28:20 +0000
committerTor Lillqvist <tml@src.gnome.org>2005-07-27 06:28:20 +0000
commit23d233d9374e9a13bf1cf58182f282c11fecaf0e (patch)
treedcae60ae4ab0497f979991327a8be95651f45591 /gdk
parent23cbc3a65ba4ceb23141e26f29decb5e2e833979 (diff)
downloadgdk-pixbuf-23d233d9374e9a13bf1cf58182f282c11fecaf0e.tar.gz
Handle PS_ALTERNATE, too.
2005-07-27 Tor Lillqvist <tml@novell.com> * gdk/win32/gdkmain-win32.c (_gdk_win32_psstyle_to_string): Handle PS_ALTERNATE, too. * gdk/win32/gdkmain-win32.c (gdk_screen_get_height_mm): Fix for multi-monitor cases. (#311677, Tim Evans)
Diffstat (limited to 'gdk')
-rw-r--r--gdk/win32/gdkmain-win32.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gdk/win32/gdkmain-win32.c b/gdk/win32/gdkmain-win32.c
index 2584a2ada..66d24ff55 100644
--- a/gdk/win32/gdkmain-win32.c
+++ b/gdk/win32/gdkmain-win32.c
@@ -186,13 +186,13 @@ gdk_screen_get_height (GdkScreen *screen)
gint
gdk_screen_get_width_mm (GdkScreen *screen)
{
- return (double) GetDeviceCaps (_gdk_display_hdc, HORZRES) / GetDeviceCaps (_gdk_display_hdc, LOGPIXELSX) * 25.4;
+ return (double) gdk_screen_get_width (screen) / GetDeviceCaps (_gdk_display_hdc, LOGPIXELSX) * 25.4;
}
gint
gdk_screen_get_height_mm (GdkScreen *screen)
{
- return (double) GetDeviceCaps (_gdk_display_hdc, VERTRES) / GetDeviceCaps (_gdk_display_hdc, LOGPIXELSY) * 25.4;
+ return (double) gdk_screen_get_height (screen) / GetDeviceCaps (_gdk_display_hdc, LOGPIXELSY) * 25.4;
}
void
@@ -621,14 +621,15 @@ _gdk_win32_psstyle_to_string (DWORD pen_style)
switch (pen_style & PS_STYLE_MASK)
{
#define CASE(x) case PS_##x: return #x
+ CASE (ALTERNATE);
+ CASE (SOLID);
CASE (DASH);
+ CASE (DOT);
CASE (DASHDOT);
CASE (DASHDOTDOT);
- CASE (DOT);
- CASE (INSIDEFRAME);
CASE (NULL);
- CASE (SOLID);
CASE (USERSTYLE);
+ CASE (INSIDEFRAME);
#undef CASE
default: return static_printf ("illegal_%d", pen_style & PS_STYLE_MASK);
}
@@ -642,9 +643,9 @@ _gdk_win32_psendcap_to_string (DWORD pen_style)
switch (pen_style & PS_ENDCAP_MASK)
{
#define CASE(x) case PS_ENDCAP_##x: return #x
- CASE (FLAT);
CASE (ROUND);
CASE (SQUARE);
+ CASE (FLAT);
#undef CASE
default: return static_printf ("illegal_%d", pen_style & PS_ENDCAP_MASK);
}
@@ -658,9 +659,9 @@ _gdk_win32_psjoin_to_string (DWORD pen_style)
switch (pen_style & PS_JOIN_MASK)
{
#define CASE(x) case PS_JOIN_##x: return #x
+ CASE (ROUND);
CASE (BEVEL);
CASE (MITER);
- CASE (ROUND);
#undef CASE
default: return static_printf ("illegal_%d", pen_style & PS_JOIN_MASK);
}