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.
This commit is contained in:
Tor Lillqvist 2002-09-11 21:51:59 +00:00 committed by Tor Lillqvist
parent f713eb82bf
commit 0db4000945
8 changed files with 63 additions and 9 deletions

View File

@ -48,7 +48,7 @@
(gdk_window_queue_translation,_gdk_windowing_window_queue_antiexpose):
Call gdk_window_queue_append().
Merge from gtk-1-3-win32-production branch:
Merge from gtk-1-3-win32-production and gtk-2-0:
* gdk/win32/gdkevents-win32.c (propagate): Check for parent being
NULL before trying to propagate to it, and return FALSE in that
@ -56,6 +56,15 @@
probably should have noticed that and bailed out earlier. But
better late than never.)
* 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.
Wed Sep 11 15:48:38 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreemodel.c (gtk_tree_row_reference_get_type): Make

View File

@ -48,7 +48,7 @@
(gdk_window_queue_translation,_gdk_windowing_window_queue_antiexpose):
Call gdk_window_queue_append().
Merge from gtk-1-3-win32-production branch:
Merge from gtk-1-3-win32-production and gtk-2-0:
* gdk/win32/gdkevents-win32.c (propagate): Check for parent being
NULL before trying to propagate to it, and return FALSE in that
@ -56,6 +56,15 @@
probably should have noticed that and bailed out earlier. But
better late than never.)
* 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.
Wed Sep 11 15:48:38 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreemodel.c (gtk_tree_row_reference_get_type): Make

View File

@ -48,7 +48,7 @@
(gdk_window_queue_translation,_gdk_windowing_window_queue_antiexpose):
Call gdk_window_queue_append().
Merge from gtk-1-3-win32-production branch:
Merge from gtk-1-3-win32-production and gtk-2-0:
* gdk/win32/gdkevents-win32.c (propagate): Check for parent being
NULL before trying to propagate to it, and return FALSE in that
@ -56,6 +56,15 @@
probably should have noticed that and bailed out earlier. But
better late than never.)
* 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.
Wed Sep 11 15:48:38 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreemodel.c (gtk_tree_row_reference_get_type): Make

View File

@ -48,7 +48,7 @@
(gdk_window_queue_translation,_gdk_windowing_window_queue_antiexpose):
Call gdk_window_queue_append().
Merge from gtk-1-3-win32-production branch:
Merge from gtk-1-3-win32-production and gtk-2-0:
* gdk/win32/gdkevents-win32.c (propagate): Check for parent being
NULL before trying to propagate to it, and return FALSE in that
@ -56,6 +56,15 @@
probably should have noticed that and bailed out earlier. But
better late than never.)
* 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.
Wed Sep 11 15:48:38 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreemodel.c (gtk_tree_row_reference_get_type): Make

View File

@ -48,7 +48,7 @@
(gdk_window_queue_translation,_gdk_windowing_window_queue_antiexpose):
Call gdk_window_queue_append().
Merge from gtk-1-3-win32-production branch:
Merge from gtk-1-3-win32-production and gtk-2-0:
* gdk/win32/gdkevents-win32.c (propagate): Check for parent being
NULL before trying to propagate to it, and return FALSE in that
@ -56,6 +56,15 @@
probably should have noticed that and bailed out earlier. But
better late than never.)
* 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.
Wed Sep 11 15:48:38 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreemodel.c (gtk_tree_row_reference_get_type): Make

View File

@ -48,7 +48,7 @@
(gdk_window_queue_translation,_gdk_windowing_window_queue_antiexpose):
Call gdk_window_queue_append().
Merge from gtk-1-3-win32-production branch:
Merge from gtk-1-3-win32-production and gtk-2-0:
* gdk/win32/gdkevents-win32.c (propagate): Check for parent being
NULL before trying to propagate to it, and return FALSE in that
@ -56,6 +56,15 @@
probably should have noticed that and bailed out earlier. But
better late than never.)
* 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.
Wed Sep 11 15:48:38 2002 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreemodel.c (gtk_tree_row_reference_get_type): Make

View File

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

View File

@ -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 */