[gtk+/client-side-windows] Some win32 cleanups
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+/client-side-windows] Some win32 cleanups
- Date: Wed, 1 Jul 2009 11:46:50 +0000 (UTC)
commit b1df568239e17622f62af52c9f08d63e45d36a8c
Author: Alexander Larsson <alexl redhat com>
Date: Wed Jul 1 12:06:57 2009 +0200
Some win32 cleanups
gdk/win32/gdkdrawable-win32.c | 13 +------------
gdk/win32/gdkevents-win32.c | 31 ++-----------------------------
gdk/win32/gdkgeometry-win32.c | 20 --------------------
gdk/win32/gdkprivate-win32.h | 3 ---
gdk/win32/gdkwindow-win32.c | 1 +
5 files changed, 4 insertions(+), 64 deletions(-)
---
diff --git a/gdk/win32/gdkdrawable-win32.c b/gdk/win32/gdkdrawable-win32.c
index 18997ad..8c0d026 100644
--- a/gdk/win32/gdkdrawable-win32.c
+++ b/gdk/win32/gdkdrawable-win32.c
@@ -1883,19 +1883,9 @@ _gdk_windowing_create_cairo_surface (GdkDrawable *drawable,
gint width,
gint height)
{
- GdkDrawableImplWin32 *impl = GDK_DRAWABLE_IMPL_WIN32 (drawable);
- RECT rect;
-
HDC hdc = _gdk_win32_drawable_acquire_dc (drawable);
if (!hdc)
- {
- return NULL;
- }
-
- GetClipBox (hdc, &rect);
- g_print ("create_cairo_surface(): [%d %d %d %d]\n",
- rect.left, rect.top, rect.right, rect.bottom);
-
+ return NULL;
return cairo_win32_surface_create (hdc);
}
@@ -1939,7 +1929,6 @@ _gdk_windowing_set_cairo_surface_size (cairo_surface_t *surface,
gint height)
{
// Do nothing. The surface size is determined by the DC
- g_print ("*** set_cairo_surface_size()\n");
}
static gint
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index c919f60..38ad79c 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -1557,29 +1557,6 @@ handle_wm_paint (MSG *msg,
EndPaint (msg->hwnd, &paintstruct);
- /* HB: don't generate GDK_EXPOSE events for InputOnly
- * windows -> backing store now works!
- */
- if (((GdkWindowObject *) window)->input_only)
- {
- DeleteObject (hrgn);
- return;
- }
-
- if (!(((GdkWindowObject *) window)->event_mask & GDK_EXPOSURE_MASK))
- {
- GDK_NOTE (EVENTS, g_print (" (ignored)"));
- DeleteObject (hrgn);
- return;
- }
-
-#if 0 /* we need to process exposes even with GDK_NO_BG
- * Otherwise The GIMP canvas update is broken ....
- */
- if (((GdkWindowObject *) window)->bg_pixmap == GDK_NO_BG)
- break;
-#endif
-
if ((paintstruct.rcPaint.right == paintstruct.rcPaint.left) ||
(paintstruct.rcPaint.bottom == paintstruct.rcPaint.top))
{
@@ -1621,12 +1598,8 @@ handle_wm_paint (MSG *msg,
}
update_region = _gdk_win32_hrgn_to_region (hrgn);
-
-
- //_gdk_win32_windowing_window_get_offsets (window, &xoffset, &yoffset);
- //gdk_region_offset (update_region, xoffset, yoffset);
-
- _gdk_window_process_expose (window, update_region);
+ if (!gdk_region_empty (update_region))
+ _gdk_window_invalidate_for_expose (window, update_region);
gdk_region_destroy (update_region);
DeleteObject (hrgn);
diff --git a/gdk/win32/gdkgeometry-win32.c b/gdk/win32/gdkgeometry-win32.c
index 833fc5b..fb2b363 100644
--- a/gdk/win32/gdkgeometry-win32.c
+++ b/gdk/win32/gdkgeometry-win32.c
@@ -115,26 +115,6 @@ _gdk_window_move_resize_child (GdkWindow *window,
}
void
-_gdk_window_process_expose (GdkWindow *window,
- GdkRegion *invalidate_region)
-{
- GdkWindowImplWin32 *impl;
- //GdkRegion *clip_region;
- impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl);
-
- GDK_NOTE (EVENTS, g_print ("_gdk_window_process_expose: %p %s\n",
- GDK_WINDOW_HWND (window),
- _gdk_win32_gdkregion_to_string (invalidate_region)));
-
- if (!gdk_region_empty (invalidate_region))
- _gdk_window_invalidate_for_expose (window, invalidate_region);
- else
- g_print ("process_expose(), empty region\n");
-
- //gdk_region_destroy (invalidate_region);
-}
-
-void
_gdk_win32_window_tmp_unset_bg (GdkWindow *window,
gboolean recurse)
{
diff --git a/gdk/win32/gdkprivate-win32.h b/gdk/win32/gdkprivate-win32.h
index 84284a8..edd1e06 100644
--- a/gdk/win32/gdkprivate-win32.h
+++ b/gdk/win32/gdkprivate-win32.h
@@ -234,9 +234,6 @@ void _gdk_win32_windowing_window_get_offsets (GdkWindow *window,
gint *y_offset);
-void _gdk_window_process_expose (GdkWindow *window,
- GdkRegion *invalidate_region);
-
void _gdk_win32_selection_init (void);
void _gdk_win32_dnd_exit (void);
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index 96f89e8..894b070 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -3609,6 +3609,7 @@ _gdk_win32_window_queue_translation (GdkWindow *window,
gint dx,
gint dy)
{
+ /* TODO: Get current updateregion, move any part of it that intersects area by dx,dy */
g_print ("queue_translation\n");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]