Make identical to the X11 implementation. (#322264, John Ehresman)

2006-01-02  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c
	(gdk_window_impl_win32_get_visible_region): Make identical to the
	X11 implementation. (#322264, John Ehresman)
This commit is contained in:
Tor Lillqvist 2006-01-02 09:32:56 +00:00 • committed by Tor Lillqvist
commit 348ffaea19
3 changed files with 8 additions and 20 deletions

View file

@ -1,5 +1,9 @@
2006-01-02 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkwindow-win32.c
(gdk_window_impl_win32_get_visible_region): Make identical to the
X11 implementation. (#322264, John Ehresman)
* gdk/win32/gdkgeometry-win32.c (gdk_window_scroll): Get the
invalidated region from ScrollWindowEx() instead of an incorrect
attempt to calculate it ourselves. Fix by John Ehresman. (#323666)

View file

@ -1,5 +1,9 @@
2006-01-02 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkwindow-win32.c
(gdk_window_impl_win32_get_visible_region): Make identical to the
X11 implementation. (#322264, John Ehresman)
* gdk/win32/gdkgeometry-win32.c (gdk_window_scroll): Get the
invalidated region from ScrollWindowEx() instead of an incorrect
attempt to calculate it ourselves. Fix by John Ehresman. (#323666)

View file

@ -282,7 +282,6 @@ gdk_window_impl_win32_get_visible_region (GdkDrawable *drawable)
{
GdkWindowImplWin32 *impl = GDK_WINDOW_IMPL_WIN32 (drawable);
GdkRectangle result_rect;
HDC hdc;
result_rect.x = 0;
result_rect.y = 0;
@ -291,25 +290,6 @@ gdk_window_impl_win32_get_visible_region (GdkDrawable *drawable)
gdk_rectangle_intersect (&result_rect, &impl->position_info.clip_rect, &result_rect);
/* take this win32 specific part into account (smaller when obscured) */
hdc = GetDC (GDK_DRAWABLE_IMPL_WIN32_HANDLE (impl));
if (hdc)
{
RECT r;
if (SIMPLEREGION == GetClipBox (hdc, &r))
{
GdkRectangle gr;
gr.x = r.left + impl->position_info.x_offset;
gr.y = r.top + impl->position_info.y_offset;
gr.width = r.right - r.left;
gr.height = r.bottom - r.top;
gdk_rectangle_intersect (&result_rect, &gr, &result_rect);
}
ReleaseDC (GDK_DRAWABLE_IMPL_WIN32_HANDLE (drawable), hdc);
}
return gdk_region_rectangle (&result_rect);
}