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)
This commit is contained in:
Tor Lillqvist 2005-07-27 06:28:20 +00:00 committed by Tor Lillqvist
parent 23cbc3a65b
commit 23d233d937
4 changed files with 32 additions and 7 deletions

View File

@ -1,3 +1,11 @@
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)
2005-07-26 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): Fix to be

View File

@ -1,3 +1,11 @@
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)
2005-07-26 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): Fix to be

View File

@ -1,3 +1,11 @@
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)
2005-07-26 Owen Taylor <otaylor@redhat.com>
* gtk/gtknotebook.c (gtk_notebook_page_allocate): Fix to be

View File

@ -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);
}