summaryrefslogtreecommitdiff
path: root/gdk/win32
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2002-09-11 21:51:59 +0000
committerTor Lillqvist <tml@src.gnome.org>2002-09-11 21:51:59 +0000
commit0db40009455b22b34c557cd5ea6fbdfa6096b888 (patch)
treec32928a95bc07da8ebb3fd317338d9e3b96a88d8 /gdk/win32
parentf713eb82bfb1528c242e0088cb9a7c374ddefa65 (diff)
downloadgdk-pixbuf-0db40009455b22b34c557cd5ea6fbdfa6096b888.tar.gz
Merge from gtk-1-3-win32-production and gtk-2-0:
2002-09-12 Tor Lillqvist <tml@iki.fi> Merge from gtk-1-3-win32-production and gtk-2-0: * gdk/win32/gdkinput-win32.c (gdk_input_init): Use GetSystemMetrics (SM_C[XY]SCREEN) instead of gdk_screen_{width,height}(). * gdk/win32/gdkselection-win32.c (gdk_selection_convert): Don't use return value from GlobalSize() as length of string when calling MultiByteToWideChar(). Pass -1 instead (zero-terminated string). Thanks to Iwasa Kazmi.
Diffstat (limited to 'gdk/win32')
-rw-r--r--gdk/win32/gdkinput-win32.c4
-rw-r--r--gdk/win32/gdkselection-win32.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/gdk/win32/gdkinput-win32.c b/gdk/win32/gdkinput-win32.c
index 0084fa2cb..55e0e9d21 100644
--- a/gdk/win32/gdkinput-win32.c
+++ b/gdk/win32/gdkinput-win32.c
@@ -566,8 +566,8 @@ gdk_input_translate_coordinates (GdkDevicePrivate *gdkdev,
if (gdkdev->info.mode == GDK_MODE_SCREEN)
{
- x_scale = gdk_screen_width() / device_width;
- y_scale = gdk_screen_height() / device_height;
+ x_scale = GetSystemMetrics (SM_CXSCREEN) / device_width;
+ y_scale = GetSystemMetrics (SM_CYSCREEN) / device_height;
x_offset = - input_window->root_x;
y_offset = - input_window->root_y;
diff --git a/gdk/win32/gdkselection-win32.c b/gdk/win32/gdkselection-win32.c
index fcbd5cb59..ffe6199cf 100644
--- a/gdk/win32/gdkselection-win32.c
+++ b/gdk/win32/gdkselection-win32.c
@@ -394,7 +394,7 @@ gdk_selection_convert (GdkWindow *requestor,
}
wcs = g_new (wchar_t, length + 1);
- wclen = MultiByteToWideChar (cp, 0, ptr, length,
+ wclen = MultiByteToWideChar (cp, 0, ptr, -1,
wcs, length + 1);
/* Strip out \r */